-
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.
Fixing Operator.from_circuit for circuits with final layouts and a no…
…n-trivial initial layout (#12057) * reno, format, test changes * fix Operator.from_circuit and add failing test case * Update test_operator.py * Update operator.py * Update releasenotes/notes/operator-from-circuit-bugfix-5dab5993526a2b0a.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * selective merge of 11399 * reimplementing from_circuit --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: AlexanderIvrii <alexi@il.ibm.com>
- Loading branch information
1 parent
a4f272f
commit a65c9e6
Showing
3 changed files
with
86 additions
and
21 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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/operator-from-circuit-bugfix-5dab5993526a2b0a.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: | ||
- | | ||
Fixed an issue with the :meth:`.Operator.from_circuit` constructor method where it would incorrectly | ||
interpret the final layout permutation resulting in an invalid `Operator` being constructed. | ||
Previously, the final layout was processed without regards for the initial layout, i.e. the | ||
initialization was incorrect for all quantum circuits that have a non-trivial initial layout. |
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