-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
qml.draw/_mpl
to work with deferred measurements circuits that …
…use MCMs in measurements (#5610) **Context:** `defer_measurements` leaves `MeasurementValue`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 using `defer_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 any `MeasurementValue`s present in the tape after applying `defer_measurements` with wires. This transform is only applied in `tape_text` and `tape_mpl`. **Benefits:** Drawer works better with MCMs **Possible Drawbacks:** Hacky fix, technical debt to implement cleaner fix later **Related GitHub Issues:** #5588
- Loading branch information
Showing
5 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters