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

make CompositeOp.eigendecomposition jit-compatible #5207

Merged
merged 5 commits into from
Feb 15, 2024

Conversation

timmysilv
Copy link
Contributor

@timmysilv timmysilv commented Feb 14, 2024

Context:
Similar to #5206 - state_diagonalizing_gates depends on the eigendecomposition which is not jit-compatible.

Description of the Change:
use qml.math throughout eigval computation in order for it to be jit-compatible

Benefits:
Anything depending on the eigendecomposition (eg. measuring an observable with abstract data) will now work with jit

Possible Drawbacks:
The solution in #5206 might be more performant? I have closed that PR, but pls lmk if you think I should re-open it.

[sc-56801]

@timmysilv timmysilv marked this pull request as ready for review February 14, 2024 18:25
@timmysilv timmysilv requested review from Qottmann and a team February 14, 2024 18:26
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (256b1cc) 99.68% compared to head (d95dff8) 99.68%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5207      +/-   ##
==========================================
- Coverage   99.68%   99.68%   -0.01%     
==========================================
  Files         396      396              
  Lines       36640    36366     -274     
==========================================
- Hits        36526    36251     -275     
- Misses        114      115       +1     

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

Copy link
Contributor

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

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

Thanks @timmysilv

Could still be worth looking into the other solution and using dot products whenever there is a matrix representation of the observable available

# Conflicts:
#	doc/releases/changelog-dev.md
@timmysilv timmysilv enabled auto-merge (squash) February 15, 2024 15:05
@timmysilv timmysilv enabled auto-merge (squash) February 15, 2024 15:06
@timmysilv timmysilv merged commit 1ed7311 into master Feb 15, 2024
36 checks passed
@timmysilv timmysilv deleted the composite-eigvals-jit-compatible branch February 15, 2024 15:18
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.

3 participants