-
Notifications
You must be signed in to change notification settings - Fork 586
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
Fix qml.draw/_mpl
to work with deferred measurements circuits that use MCMs in measurements
#5610
Conversation
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 @@
## v0.36.0-rc0 #5610 +/- ##
==============================================
Coverage ? 99.69%
==============================================
Files ? 412
Lines ? 38302
Branches ? 0
==============================================
Hits ? 38184
Misses ? 118
Partials ? 0 ☔ View full report in Codecov by Sentry. |
[sc-62204] |
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.
Nice, thanks for the quick fix @mudit2812 :)
Just one suggestion to cover the uncovered line within a test you added.
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.
Thanks!
Context:
defer_measurements
leavesMeasurementValue
s in the terminal measurement processes if they are present. This is not friendly with the drawer as the classical wires for those measurement values do not exist when usingdefer_measurements
. This PR adds a "hack" fix so that the drawer/MPL drawer work with this scenario.Description of the Change:
Add
transform_deferred_measurements_tape
util function, which replaces anyMeasurementValue
s present in the tape after applyingdefer_measurements
with wires. This transform is only applied intape_text
andtape_mpl
.Benefits:
Drawer works better with MCMs
Possible Drawbacks:
Hacky fix, technical debt to implement cleaner fix later
Related GitHub Issues:
#5588