-
Notifications
You must be signed in to change notification settings - Fork 49
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
Decompositions of CnX gates with ancilla qubits #1805
Conversation
Strange, it seems it only fails on MacOS, and there is a mysterious "bus error" appearing. This reminds me of an issue @sjdilkes encountered recently, which I'm not sure he got to the bottom of... |
Still trying to understand the problem. For now I have moved the relevant part of the test to Python. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Everything looks good to me
Thanks @jpacold ! Just need to update from |
Description
Implements CnX decompositions from Maslov (2015). Related to #1725.
Opening this as a draft because there is a problem with the new test that I don't understand, and I wanted to check if it is reproducible in CI. The test passes if I run it withI'm still not sure why this is happening; the same check seems to be OK on the Python side../test-tket "Scenario: Test CnX_vchain_decomp"
. If I run the whole suite with./test-tket
, it fails when checking the unitary matrix of the synthesized circuit.The paper includes two decompositions (given in Proposition 4 and Proposition 5), both using ancilla qubits to implement a gate with controls. Qiskit seems to have a simplified version of the one described in Proposition 4, using roughly the same gate counts but more ancillas ( ).