forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make commutative_cancellation basis aware (Qiskit#5672)
* fixes Qiskit#5644 * move change to commutation analysis to new pr. * Update qiskit/transpiler/passes/optimization/commutative_cancellation.py Co-authored-by: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/transpiler/passes/optimization/commutative_cancellation.py Co-authored-by: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/transpiler/passes/optimization/commutative_cancellation.py Co-authored-by: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/transpiler/passes/optimization/commutative_cancellation.py Co-authored-by: Kevin Krsulich <kevin@krsulich.net> * check global phase * minor fix * preserve global phase in commutative_cancellation * Update test/python/transpiler/test_commutative_cancellation.py Co-authored-by: Kevin Krsulich <kevin@krsulich.net> * add blank line * add release note Co-authored-by: Kevin Krsulich <kevin@krsulich.net> Co-authored-by: Luciano Bello <bel@zurich.ibm.com> Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
- Loading branch information
1 parent
a4604cb
commit 0d85759
Showing
5 changed files
with
146 additions
and
12 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
13 changes: 13 additions & 0 deletions
13
releasenotes/notes/basis_aware_commutative_cancellation-9f3b4924b0fa478d.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,13 @@ | ||
--- | ||
upgrade: | ||
- | | ||
This makes it optionally possible to tell the | ||
:class:`qiskit.transpiler.passes.optimization.CommutativeCancellation` | ||
pass about target basis. Previously the pass would automatically | ||
replace consecutive gates which commute with ZGate with the | ||
U1Gate. Functionally the target basis is the union of the gates in | ||
the circuit and the target basis. If no variable z-rotation gate | ||
exists no commutative cancellation will occur. This change may | ||
lead to different behavior if using this pass without specifying a | ||
basis and supplying a circuit with no variable z-rotation gate so | ||
a basis gate should be explicitly supplied. |
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