-
Notifications
You must be signed in to change notification settings - Fork 603
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
Allow abstract Boolean measurement results as a parameter to qml.sample #5673
Conversation
... qml.sample for Catalyst.
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 @@
## master #5673 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 416 416
Lines 39049 38812 -237
==========================================
- Hits 38925 38687 -238
- Misses 124 125 +1 ☔ View full report in Codecov by Sentry. |
Thanks @dime10! Would you mind linking the associated SC story? |
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.
I'm on board with these changes. Will approve after tests are added.
This PR can be merged after PennyLaneAI/pennylane#5673. Introduce support for `m = measure(0); qml.sample(m)` in Catalyst programs. In conjunction with ongoing work on MCM support, this will allow returning `shots` number of MCM samples from a quantum program. [sc-62096]
This PR allows
qml.sample
(and implicitly other measurement processes) to accept a Boolean tracer in the observable parameter, similar to what is already done for theMeasurementValue
value object. Thewires
attribute will be empty in this case.[sc-62096]