-
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.
Browse files
Browse the repository at this point in the history
* Fix wrong relative phase of MCRZ (#9836) * efficient multicontrolled su2 gate decomposition Co-authored-by: thiagom123 <[email protected]> Co-authored-by: IsmaelCesar <[email protected]> Co-authored-by: Israel F. Araujo <[email protected]> Co-authored-by: Adenilton Silva <[email protected]> * removed optimization flag Co-authored-by: thiagom123 <[email protected]> Co-authored-by: IsmaelCesar <[email protected]> Co-authored-by: Israel F. Araujo <[email protected]> Co-authored-by: Adenilton Silva <[email protected]> * tox -eblack * updated docstrings * Adds `MCSU2Gate` to `__init__` * fixed circular import * defined control and inverse methods * changed MCSU2Gate from Gate to ControlledGate * adjusted some tests for controlled gates * reformatting * Fix regarding the integer `ctrl_state` parameter * Tests to check the CX count upper bound * Gate's `label` in the `control` function * Upd. Qiskit tests to include cases for MCSU2Gate * Upd. Qiskit tests to include cases for MCSU2Gate * Revert "Upd. Qiskit tests to include cases for MCSU2Gate" This reverts commit c1ceaf6. * Revert "Upd. Qiskit tests to include cases for MCSU2Gate" This reverts commit 7c75611. * Revert "Tests to check the CX count upper bound" This reverts commit 100a690. * Update test_controlled_gate.py * Update test_circuit_operations.py * remove mcsu2gate class * remove mcsu2gate class * fix mcry * lint * fix mcrx * add reference * Create `s_gate` directly * Revert "Create `s_gate` directly" This reverts commit b762b39. * review * release notes * review 2 * backwards compat * function signature and number of controls * fix mcrz * Update multi_control_rotation_gates.py * review * Update test_qpy.py * Revert "Update test_qpy.py" This reverts commit fab1c80. * Update test_qpy.py * Update multi_control_rotation_gates.py * Fix `use_basis_gates=True` case * lint --------- Co-authored-by: rafaella-vale <[email protected]> Co-authored-by: thiagom123 <[email protected]> Co-authored-by: IsmaelCesar <[email protected]> Co-authored-by: Israel F. Araujo <[email protected]> Co-authored-by: Rafaella Vale <[email protected]> Co-authored-by: Julien Gacon <[email protected]> (cherry picked from commit 7b677ed) # Conflicts: # qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py * fix conflicts --------- Co-authored-by: Adenilton Silva <[email protected]> Co-authored-by: Julien Gacon <[email protected]>
- Loading branch information
1 parent
ab40959
commit c9656b2
Showing
5 changed files
with
97 additions
and
53 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
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/fix-mcrz-relative-phase-6ea81a369f8bda38.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,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed the gate decomposition of multi-controlled Z rotation gates added via | ||
:meth:`.QuantumCircuit.mcrz`. Previously, this method implemented a multi-controlled | ||
phase gate, which has a relative phase difference to the Z rotation. To obtain the | ||
previous :meth:`.QuantumCircuit.mcrz` behaviour, use :meth:`.QuantumCircuit.mcp`. |
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