-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcry circuit requires an exponential number of cx gates #9741
Labels
bug
Something isn't working
Comments
This was referenced Mar 6, 2023
1ucian0
pushed a commit
that referenced
this issue
Apr 2, 2023
…ry (#9688) * efficient multicontrolled su2 gate decomposition Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * removed optimization flag Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * 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 * review 3 * Update multi_control_rotation_gates.py * Update multi_control_rotation_gates.py * Revert "Update multi_control_rotation_gates.py" This reverts commit e371ef8. * Revert "Update multi_control_rotation_gates.py" This reverts commit b4c3fe4. --------- Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> Co-authored-by: Adenilton Silva <ajsilva@cin.ufpe.br>
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this issue
Apr 5, 2023
… in mcry (Qiskit#9688) * efficient multicontrolled su2 gate decomposition Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * removed optimization flag Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * 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 * review 3 * Update multi_control_rotation_gates.py * Update multi_control_rotation_gates.py * Revert "Update multi_control_rotation_gates.py" This reverts commit e371ef8. * Revert "Update multi_control_rotation_gates.py" This reverts commit b4c3fe4. --------- Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> Co-authored-by: Adenilton Silva <ajsilva@cin.ufpe.br>
giacomoRanieri
pushed a commit
to giacomoRanieri/qiskit-terra
that referenced
this issue
Apr 16, 2023
… in mcry (Qiskit#9688) * efficient multicontrolled su2 gate decomposition Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * removed optimization flag Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * 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 * review 3 * Update multi_control_rotation_gates.py * Update multi_control_rotation_gates.py * Revert "Update multi_control_rotation_gates.py" This reverts commit e371ef8. * Revert "Update multi_control_rotation_gates.py" This reverts commit b4c3fe4. --------- Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> Co-authored-by: Adenilton Silva <ajsilva@cin.ufpe.br>
king-p3nguin
pushed a commit
to king-p3nguin/qiskit-terra
that referenced
this issue
May 22, 2023
… in mcry (Qiskit#9688) * efficient multicontrolled su2 gate decomposition Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * removed optimization flag Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> * 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 * review 3 * Update multi_control_rotation_gates.py * Update multi_control_rotation_gates.py * Revert "Update multi_control_rotation_gates.py" This reverts commit e371ef8. * Revert "Update multi_control_rotation_gates.py" This reverts commit b4c3fe4. --------- Co-authored-by: thiagom123 <thiagomdazevedo@hotmail.com> Co-authored-by: IsmaelCesar <leamscesar@gmail.com> Co-authored-by: Israel F. Araujo <israelferrazaraujo@hotmail.com> Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com> Co-authored-by: Adenilton Silva <ajsilva@cin.ufpe.br>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
What is happening?
QuantumCircuit.mcry
creates a circuit with a exponential number of cx gates.How can we reproduce the issue?
The number of cx gates doubles after adding a control. For example, with 6 and 7 controls, the number of cx is 92 and 188.
What should happen?
The number of cx gates should be 16k-40 [Section 3.1, https://arxiv.org/pdf/2302.06377.pdf].
Disclaimer: I am an author of this paper.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: