-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Issue 11026: SparsePauliOp.apply_layout should do nothing if gi…
…ven None (#11041) * fixed issue 11026 by adding condition in apply_layout and implemented test * fixed formatting * added expansion of operator if num_qubits is provided and added tests * fixed finding * added release note
- Loading branch information
1 parent
3c1a87c
commit 8707699
Showing
3 changed files
with
37 additions
and
4 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
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/allow-none-layout-for-sparse_pauli_op-212470d5b5b307a0.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 @@ | ||
--- | ||
features: | ||
- | | ||
The function :meth:`~.SparsePauliOp.apply_layout` from :class:`.SparsePauliOp` now allows for the | ||
layout argument to also be None. That is, the method can now also be used for circuits where no transpilation/routing | ||
took place (for example when transpiling for a simulator). |
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