-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
QuantumCircuit.mcrz not correct #9202
Comments
Hi @AlexisRalli, thanks for reporting this! Indeed the MCRZ looks wrong, it's not equivalent to the multicontrolled phase gates, as which it is implemented. Do you have a reference to the multicontrolled Pauli rotations you're using? We could definitely add those as default decomposition to Qiskit if they use less CNOTS (or have shallower depth) 🙂 |
Hi @Cryoris , I was using Theorem 8 of https://arxiv.org/pdf/quant-ph/0406176.pdf to build these circuits. |
Thanks for the reference! Would you be interested in fixing this in Qiskit? 🙂 We can of course have a discussion on how to tackle this, if that would be helpful. |
@Cryoris Sorry for the late reply. I'd be happy to fix this. I guess I should just fork the repo and make a pull request |
@AlexisRalli I have assigned you the issue. You can find instructions on how to setup your local development environment in the contributing guide. If you need any help, please let me know! |
Environment
What is happening?
multicontrol Rz rotation not correctly being built - see example below.
(Also multicontrol Rz, Ry, Rx gates can all be implemented using fewer nonlocal (two) qubit gates... See solution below)
How can we reproduce the issue?
What should happen?
mcrz method in
QuantumCircuit
should implement the correct quantum circuit. Solution provided below.Any suggestions?
This code fixes the problem and acutally reduces the depth of all multicontrol rotation Rz,Ry,Rz gates:
We can check this is working via:
The new approach gives an improvement to the correctly implemented mutlicontrol rotation gates currently coded in qiskit:
The text was updated successfully, but these errors were encountered: