-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Frontend] Split non-commuting observables #821
Conversation
[sc-60186] |
**Context:** Catalyst is adding `non_commuting_observables` as a flag in the TOML file, and conditionally applying the `split_non_commuting` transform in the QJIT device preprocessing if the backend doesn't allow non-commuting observables. **Description of the Change:** Update the lightning TOML files to indicate that non-commuting observables are supported. **Benefits:** Lightning stays consistent with the changes in [this PR](PennyLaneAI/catalyst#821) --------- Co-authored-by: ringo-but-quantum <[email protected]>
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
=======================================
Coverage 97.95% 97.96%
=======================================
Files 71 71
Lines 10244 10248 +4
Branches 902 903 +1
=======================================
+ Hits 10035 10039 +4
Misses 167 167
Partials 42 42 ☔ 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.
Hi Lillian, I think this looks great! I think one small thing that is missing is a cuda quantum circuit with non commuting observables.
… into split-non-commuting
Edit: wrong story ID |
[sc-60188] |
Did we add the flag to lightning as well? :) |
Yes! |
Context:
State-based simulators can generally get the values for non-commuting observables together on a single execution. Hardware and some simulators require non-commuting observables to be separated into different executions.
Description of the Change:
We add a
non_commuting_observables
flag to the TOML file. IfTrue
, the device can deal with non-commuting observables.We check the
non_commuting_observables_flag
indevice.preprocess
, and add thesplit_non_commuting
transform to the transform_program if it'sFalse
.