-
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
Expr
support to the control-flow builders
This is generally relatively straightforwards; anywhere where we examine the resources used by an operation, we need to update to account for classical resources potentially being tied up in `ControlFlowOp` fields in `Expr` nodes as well. This also has the side effect of fixing a bug where a nested `SwitchCaseOp.target` wasn't considered in the scope building for _all_ control-flow operations, which could incorrectly cause some registers to be missed in outer scopes.
- Loading branch information
1 parent
0abfb1f
commit 487a0f7
Showing
6 changed files
with
420 additions
and
27 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
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/fix-controlflow-builder-nested-switch-008b8c43b2153a1f.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,6 @@ | ||
--- | ||
fixes: | ||
- | | ||
The control-flow builder interface will now correctly include :class:`.ClassicalRegister` | ||
resources from nested switch statements in their containing circuit scopes. See `#10398 | ||
<https://github.com/Qiskit/qiskit-terra/issues/10398>`__. |
Oops, something went wrong.