-
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.
- Loading branch information
Showing
3 changed files
with
23 additions
and
9 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
9 changes: 5 additions & 4 deletions
9
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
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. | ||
Fix a bug in the :class:`~qiskit.opflow.PauliSumOp` which previously stored the | ||
:class:`~qiskit.quantum_info.SparsePauliOp` it was instantiated with by reference and not | ||
by value. This led to several bugs, where e.g. the ``PauliSumOp`` was affected by changes in the | ||
original ``SparsePauliOp`` or methods such as :meth:`~qiskit.opflow.PauliSumOp.permute` modified | ||
the object they are called on instead of leaving them 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