-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update lightning qubit memory management #601
Update lightning qubit memory management #601
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #601 +/- ##
==========================================
+ Coverage 98.52% 98.68% +0.15%
==========================================
Files 168 169 +1
Lines 24566 24344 -222
==========================================
- Hits 24204 24023 -181
+ Misses 362 321 -41 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few suggestions, but otherwise looks good. A few CI failure fixes and we'll be good to go!
pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubitManaged.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubitManaged.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/bindings/LQubitBindings.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/bindings/LQubitBindings.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/bindings/LQubitBindings.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/tests/Test_StateVectorLQubitManaged.cpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/tests/Test_StateVectorLQubitManaged.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple comments, but looking good. Thanks @AmintorDusko .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch @AmintorDusko
A few follow on questions. Also, since there seems to be a few reports from codecov about missing test-coverage, do we want to add it for these cases?
pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubitManaged.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/bindings/LQubitBindings.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/bindings/LQubitBindings.hpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Co-authored-by: Lee James O'Riordan <mlxd@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @AmintorDusko .
Observed increase in performance with a simple parameter-shift circuit: dev = qml.device("lightning.qubit", wires=n_wires)
@qml.qnode(dev, diff_method="parameter-shift")
def circuit(params):
qml.RX(params[0], wires=0)
qml.RY(params[1], wires=0)
qml.RX(params[2], wires=0)
return qml.expval(qml.PauliZ(0))
params = qnp.array([0.1, 0.2, 0.3], requires_grad=True)
qml.jacobian(circuit)(params) |
Description of the Change:
Update Lightning qubit memory management to LightningQubitManaged.
Related Shotcut Stories:
[sc-53796]
[sc-51664]