-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Context:** Mid-circuit measurements cannot be drawn with `qml.draw`. This is the first PR to support drawing mid-circuit measurements **Description of the Change:** * Added label to `MidMeasureMP`, including cases of qubit reset and postselection. * Minor changes to `qml.drawer.tape_text` to support drawing measurements in the ops queue. Measurements without a defined `label` method (which is all measurements except MidMeasureMP`) will still break the drawer, which is what we want. **Benefits:** We can now draw mid-circuit measurements! `qml.cond` is still not supported. That will come in future PRs **Possible Drawbacks:** **Related GitHub Issues:**
- Loading branch information
Showing
5 changed files
with
98 additions
and
1 deletion.
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