-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal support for standalone
Var
to visualisers (#12307)
* Add minimal support for standalone `Var` to visualisers This adds best-effort only support to the visualisers for handling stand-alone `Var` nodes. Most of the changes are actually in `qasm3`, since the visualisers use internal details of that to handle the nodes. This commit decouples the visualisers _slightly_ more from the inner workings of the OQ3 exporter by having them manage their own variable-naming contexts and using the encapsulated `_ExprBuilder`, rather than poking into random internals of the full circuit exporter. This is necessary to allow the OQ3 exporter to expand to support these variables itself, and also for the visualisers, since variables may now be introduced in inner scopes. This commit does not attempt to solve many of the known problems around zero-operand "gates", of which `Store` is one, just leaving it un-drawn. Printing to OpenQASM 3 is possibly a better visualisation strategy for large dynamic circuits for the time being. * Fix typos Co-authored-by: Matthew Treinish <[email protected]> --------- Co-authored-by: Matthew Treinish <[email protected]>
- Loading branch information
1 parent
6b73b58
commit a78c941
Showing
9 changed files
with
243 additions
and
42 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
Oops, something went wrong.