-
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
PauliSumOp.permute
to not change the original object (#7339)
* fix PauliSumOp.permute * black! * extend fix to general PauliSumOp * Revert "extend fix to general PauliSumOp" This reverts commit 6c4fa32. Co-authored-by: Ikko Hamamura <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
299d03b
commit 497811a
Showing
3 changed files
with
28 additions
and
13 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/fix-pauli-sum-op-permute-a9b742f3a2fad934.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: | ||
- | | ||
Fix a bug in :meth:`qiskit.opflow.PauliSumOp.permute` where the original object on which | ||
the method is called is permuted, instead of only returning a new, permuted copy. | ||
This bug only occured for permutations that left the number of qubits in the operator | ||
unchanged. |
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