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

Qiskit / qiskit / 13688561003

06 Mar 2025 12:41AM UTC coverage: 88.093% (-0.004%) from 88.097%
13688561003

push

github

web-flow
Add representation of `box` (#13869)

* Add representation of `box`

This adds in the base `box` control-flow construction, with support for
containing instructions and having a literal delay, like the `Delay`
instruction.

This supports basic output to OpenQASM 3, QPY and some rudimentary
support in the text and mpl drawers.  The transpiler largely handles
things already, since control flow is handled generically in most
places.

Known issues:

- We expect this to be able to accept stretches in its duration, just as
  `Delay` can, which will need a follow-up.
- We expect `Box` to support "annotations" in a future release of
  Qiskit.
- There is currently no way in OpenQASM 3 to represent a qubit that is
  idle during a `box` without inserting a magic instruction on it.
- IBM backends don't claim support for `box` yet, so `transpile` against
  a backend will fail, though you can modify the `Target` to add the
  instruction manually.

Add tests of box

* Add QPY backwards-compatibility test

* Add `BoxOp.body` getter and tests

111 of 118 new or added lines in 11 files covered. (94.07%)

18 existing lines in 3 files now uncovered.

75228 of 85396 relevant lines covered (88.09%)

334350.47 hits per line

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

48.96
/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