• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 8915957975

01 May 2024 10:49PM UTC coverage: 89.549% (-0.008%) from 89.557%
8915957975

push

github

web-flow
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 <mtreinish@kortar.org>

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

31 of 61 new or added lines in 5 files covered. (50.82%)

4 existing lines in 3 files now uncovered.

61606 of 68796 relevant lines covered (89.55%)

216446.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

49.33
/qiskit/visualization/circuit/matplotlib.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc