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.
Correctly updating global phase when removing gates that are identity…
… up to a global phase (Qiskit#13785) * correctly updating global phase when removing -I gates from the circuit * similar fix for specialized rotation gates * Correctly updating global phase when removing gates that are equivalent to identity up to a global phase * also handling UnitaryGates after the unitary gates PR was merged * applying review suggestions * removing code duplication
- Loading branch information
1 parent
1b6fccf
commit 7995cab
Showing
4 changed files
with
65 additions
and
29 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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/fix-phase-in-remove-id-equivalent-6480da0c62f20df1.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,8 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed a bug in the :class:`.RemoveIdentityEquivalent` transpiler pass, where gates close | ||
to identity up to a global phase were removed from the circuit, | ||
but the global phase of the circuit was not updated. In particular, | ||
:class:`.RemoveIdentityEquivalent` now removes non-parameterized :class:`.GlobalPhaseGate` | ||
gates. |
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