-
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.
Infer
cregbundle
for all drawers (#9133)
* Infer `cregbundle` for all drawers This swaps the default behaviour for the `cregbundle` to always bundle if possible, but not to emit a warning if the bundles are expanded and no concrete value was given for the parameter. Previously, this sort of logic was only done for the text drawer. * Update tests for new default behaviour Many tests use the internal `_text_circuit_drawer` function, which has different defaults to the standard `circuit_drawer` function. Since this commit chain made this default the same all the way through the tree, several tests changed their output, or needed the keyword arguments updating. * Fix missing warning test * Revert unrelated expectedFailure changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
324c875
commit 35733a5
Showing
7 changed files
with
216 additions
and
250 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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-cregbundle-warning-d3c991bb6276761d.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
The circuit drawers (:meth:`.QuantumCircuit.draw` and :func:`.circuit_drawer`) will no | ||
longer emit a warning about the ``cregbundle`` parameter when using the default arguments, | ||
if the content of the circuit requires all bits to be drawn individually. This was most | ||
likely to appear when trying to draw circuits with new-style control-flow operations. |
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.