-
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
Add MidMeasureMP Kokkos #658
Conversation
@vincentmr you may have a look on the C++ implementation, especially about the functor for Kokkos. I'll add the bindings later. |
pennylane_lightning/core/src/simulators/lightning_kokkos/gates/GateFunctorsGenerator.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
* Add MCM bindings and tests for L-Kokkos. * Auto update version * Refactor collapse. * Try parallelizing tests. * Only run test_native_mcm once amongst all workflows since it takes quite a bit of time. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/MeasurementsKokkos.hpp
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #658 +/- ##
==========================================
+ Coverage 90.91% 97.12% +6.20%
==========================================
Files 64 150 +86
Lines 9243 19515 +10272
==========================================
+ Hits 8403 18953 +10550
+ Misses 840 562 -278 ☔ 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.
Nice work!
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/bindings/LKokkosBindings.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp
Show resolved
Hide resolved
…ngs/LKokkosBindings.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…VectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…VectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…VectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…VectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…he device but not Catalyst.
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 fellas! 💯
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.
Nice job!
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp
Outdated
Show resolved
Hide resolved
…/Test_StateVectorLKokkos.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
…VectorKokkos.hpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Thanks for the suggestions @AmintorDusko . |
* collapse() and normalized() with Kokkos * Auto update version * CodeFactor * normalize() abort if norm is zero * unittest for normalize() * Auto update version * unittest for normalize() in LighningQubit * Auto update version * Add MCM bindings and tests for L-Kokkos. (#672) * Add MCM bindings and tests for L-Kokkos. * Auto update version * Refactor collapse. * Try parallelizing tests. * Only run test_native_mcm once amongst all workflows since it takes quite a bit of time. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Do not run test_native_mcm with LK-GPU. * Auto update version * trigger ci * Update pennylane_lightning/core/src/simulators/lightning_kokkos/bindings/LKokkosBindings.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Auto update version * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Increase shotsfor flaky test_composite_mcm_single_measure_obs * Create separate device_allowed_operations list for ops supported by the device but not Catalyst. * Use isinstance instead of name comparison. * Check projector. * Update operations at device init. * Modify stopping condition in LK. * Cannot use instance with Hamiltonian check. * Update pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Remove obsolete comment. * Auto update version * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
* collapse() and normalized() with Kokkos * Auto update version * CodeFactor * normalize() abort if norm is zero * unittest for normalize() * Auto update version * unittest for normalize() in LighningQubit * Auto update version * Add MCM bindings and tests for L-Kokkos. (#672) * Add MCM bindings and tests for L-Kokkos. * Auto update version * Refactor collapse. * Try parallelizing tests. * Only run test_native_mcm once amongst all workflows since it takes quite a bit of time. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Do not run test_native_mcm with LK-GPU. * Auto update version * trigger ci * Update pennylane_lightning/core/src/simulators/lightning_kokkos/bindings/LKokkosBindings.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Auto update version * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Increase shotsfor flaky test_composite_mcm_single_measure_obs * Create separate device_allowed_operations list for ops supported by the device but not Catalyst. * Use isinstance instead of name comparison. * Check projector. * Update operations at device init. * Modify stopping condition in LK. * Cannot use instance with Hamiltonian check. * Update pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Remove obsolete comment. * Auto update version * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
* Init commit * Auto update version * Add MidMeasureMP Kokkos (#658) * collapse() and normalized() with Kokkos * Auto update version * CodeFactor * normalize() abort if norm is zero * unittest for normalize() * Auto update version * unittest for normalize() in LighningQubit * Auto update version * Add MCM bindings and tests for L-Kokkos. (#672) * Add MCM bindings and tests for L-Kokkos. * Auto update version * Refactor collapse. * Try parallelizing tests. * Only run test_native_mcm once amongst all workflows since it takes quite a bit of time. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Do not run test_native_mcm with LK-GPU. * Auto update version * trigger ci * Update pennylane_lightning/core/src/simulators/lightning_kokkos/bindings/LKokkosBindings.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Auto update version * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Increase shotsfor flaky test_composite_mcm_single_measure_obs * Create separate device_allowed_operations list for ops supported by the device but not Catalyst. * Use isinstance instead of name comparison. * Check projector. * Update operations at device init. * Modify stopping condition in LK. * Cannot use instance with Hamiltonian check. * Update pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Remove obsolete comment. * Auto update version * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Trigger CI * make format * Auto update version * Trigger CIs * Auto update version * Trigger CI * Auto update version * add more docstring * add changelog * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/utils/cuda_utils/cuError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Trigger CI * make format * quick fix * fix --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Germain <115888357+tomlqc@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
Same as #621 for Lightning-Kokkos
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:
Related Shortcut Story:
[sc-58334]
[sc-60946]