-
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.
Fix nested
FlowController
instances forgetting passes
gh-6962 added support for nested `FlowController` instances. It did not, however, propagate any `DAGCircuit` output by its internal passes into the transpilation loop, which meant that if a pass returned a new DAG rather than mutating the input, the changes would be thrown away. Similar behaviour was occuring with the pass "normalisation" step; incorrect classes would raise an error, but if the normalisation needed to raise a single pass to a list, the result would not be re-bound into the nested controller.
- Loading branch information
1 parent
b935ae9
commit a363da7
Showing
3 changed files
with
15 additions
and
3 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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/fix-nested-flow-controllers-a2a5f03eed482fa2.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,8 @@ | ||
--- | ||
fixes: | ||
- | | ||
Nesting a :class:`.FlowController` inside another in a :class:`.PassManager` | ||
could previously cause some transpiler passes to become "forgotten" during | ||
transpilation, if the passes returned a new :class:`.DAGCircuit` rather than | ||
mutating their input. Nested :class:`.FlowController`\ s will now affect | ||
the transpilation correctly. |