-
Notifications
You must be signed in to change notification settings - Fork 643
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
[BUGFIX] Qubit reuse for terminal measurements on wires with mid-circuit measurements #4787
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4787 +/- ##
==========================================
- Coverage 99.64% 99.63% -0.02%
==========================================
Files 381 381
Lines 34302 34048 -254
==========================================
- Hits 34181 33924 -257
- Misses 121 124 +3
☔ 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.
beautifully simple!
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.
Looks good to me! 🚀
…uit measurements (#4787) **Context:** When making terminal measurements on wires with mid-circuit measurements, the circuit was not being transformed correctly. This PR fixes that. **Description of the Change:** Wires are considered to be reused by `defer_measurements` when a measured wire has operators *and* terminal measurements applied to it after mid-circuit measurements. **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** [sc-49507]
**Context:** These three bugs were identified as good to be released in a bugfix. **Description of the Change:** Cherry-pick the 3 commits to master onto this branch for the 0.33.1 bugfix release **Benefits:** Fixed bugs pushed out! **Possible Drawbacks:** Extra work in a critical time. **Related GitHub Issues:** #4768, #4781, #4787 --------- Co-authored-by: Christina Lee <christina@xanadu.ai> Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com> Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
Context:
When making terminal measurements on wires with mid-circuit measurements, the circuit was not being transformed correctly. This PR fixes that.
Description of the Change:
Wires are considered to be reused by
defer_measurements
when a measured wire has operators and terminal measurements applied to it after mid-circuit measurements.Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-49507]