-
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.
Update PhaseGate.control(n) to return MCPhaseGate (#4994)
* Fix PhaseGate.control to return an MCPhaseGate if multiple controls. * Update test/python/circuit/test_controlled_gate.py Co-authored-by: Julien Gacon <gaconju@gmail.com> (cherry picked from commit 81e73da)
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 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
10 changes: 10 additions & 0 deletions
10
releasenotes/notes/4989-Fixes-MCPhaseGate-definition-cbe5e14992116e67.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,10 @@ | ||
--- | ||
fixes: | ||
- | | ||
Previously, when creating a multiply controlled phase gate via | ||
``PhaseGate.control``, an ``MCU1Gate`` gate had been returned. This has been | ||
had corrected so that an ``MCPhaseGate`` is returned. | ||
- | | ||
Previously, attempting to decompose a circuit containing an | ||
``MCPhaseGate`` would raise an error due to an inconsistency in the | ||
definition of the ``MCPhaseGate``. This has been corrected. |
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