Skip to content
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

Merged
merged 11 commits into from
Aug 23, 2024

Conversation

erick-xanadu
Copy link
Contributor

@erick-xanadu erick-xanadu commented Aug 21, 2024

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.

@erick-xanadu erick-xanadu marked this pull request as ready for review August 21, 2024 18:13
@erick-xanadu erick-xanadu requested a review from vincentmr August 21, 2024 18:17
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.94%. Comparing base (7c38c96) to head (0298e1a).
Report is 78 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (7c38c96) and HEAD (0298e1a). Click for more details.

HEAD has 31 uploads less than BASE
Flag BASE (7c38c96) HEAD (0298e1a)
39 8
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.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@erick-xanadu erick-xanadu marked this pull request as draft August 21, 2024 18:23
@erick-xanadu erick-xanadu marked this pull request as ready for review August 21, 2024 18:58
Copy link
Contributor

@vincentmr vincentmr left a 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 ?

Copy link
Contributor

@vincentmr vincentmr left a 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 .

Copy link
Contributor

@AmintorDusko AmintorDusko left a 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.

…yst/LightningKokkosSimulator.cpp

Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@vincentmr vincentmr added ci:use-multi-gpu-runner Enable usage of Multi-GPU runner for this Pull Request ci:build_wheels Activate wheel building. and removed ci:use-multi-gpu-runner Enable usage of Multi-GPU runner for this Pull Request labels Aug 23, 2024
@vincentmr vincentmr merged commit ae735d6 into master Aug 23, 2024
92 of 93 checks passed
@vincentmr vincentmr deleted the eochoa/2024-08-21/kokkos-set-basis branch August 23, 2024 13:28
multiphaseCFD pushed a commit that referenced this pull request Sep 8, 2024
**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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants