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 Projector Obs to LGPU #894

Merged
merged 9 commits into from
Sep 10, 2024
Merged

Add Projector Obs to LGPU #894

merged 9 commits into from
Sep 10, 2024

Conversation

maliasadi
Copy link
Member

@maliasadi maliasadi commented Sep 6, 2024

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 the
    change, 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:
Add support for Projector observable via diagonalization to LGPU.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

Fixes #883
[sc-72652]

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 58.82353% with 7 lines in your changes missing coverage. Please review.

Project coverage is 82.97%. Comparing base (a36fe22) to head (6e6472c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pennylane_lightning/lightning_gpu/lightning_gpu.py 56.25% 7 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a36fe22) and HEAD (6e6472c). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (a36fe22) HEAD (6e6472c)
15 8
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #894       +/-   ##
===========================================
- Coverage   96.25%   82.97%   -13.29%     
===========================================
  Files         212       24      -188     
  Lines       28020     2162    -25858     
===========================================
- Hits        26972     1794    -25178     
+ Misses       1048      368      -680     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maliasadi maliasadi added the ci:build_wheels Activate wheel building. label Sep 6, 2024
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.

Nice @maliasadi . Could we just remove this condition and instead filter only on the device name (like LTensor)? I think it would make it more obvious whether the device should support the feature or not.

@maliasadi
Copy link
Member Author

@vincentmr Nice catch! We can actually remove this condition from those unit tests.

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Thanks @maliasadi ! Looks good to me.

tests/test_expval.py Show resolved Hide resolved
Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks @maliasadi !

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, nice short and sweet change. Thanks @maliasadi .

@maliasadi maliasadi removed the ci:build_wheels Activate wheel building. label Sep 9, 2024
@maliasadi maliasadi merged commit 75dfecb into master Sep 10, 2024
79 of 81 checks passed
@maliasadi maliasadi deleted the add_projector_lgpu branch September 10, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

“Observable Projector not supported on device lightning.gpu”
4 participants