-
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 SetState and SetBasisState to kokkos #861
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #861 +/- ##
==========================================
- Coverage 98.29% 91.94% -6.36%
==========================================
Files 114 70 -44
Lines 19112 11359 -7753
==========================================
- Hits 18787 10444 -8343
- Misses 325 915 +590 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
We're calling the wrong setStateVector
I believe. This isn't caught because the test is a bit too simple, but also because setStateVector
doesn't do any check like validating that indices
and values
have the same length. This is technically not required (values
should be greater than indices
for sure, not sufficient to catch this error however), but it would be safer to add a check that indices.size() == values.size()
. Would you mind doing that @erick-xanadu ?
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Outdated
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.
LGTM, thanks @erick-xanadu .
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.
Thank you @erick-xanadu! I made a super small suggestion, but I'm happy to approve.
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Outdated
Show resolved
Hide resolved
…yst/LightningKokkosSimulator.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.hpp
Outdated
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.
🙌
**Context:** The kokkos simulator needs to override the default implementation for setting the state and basis state. **Description of the Change:** Override the default implementation for setting the state and basis state. --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
Context: The kokkos simulator needs to override the default implementation for setting the state and basis state.
Description of the Change: Override the default implementation for setting the state and basis state.