-
Notifications
You must be signed in to change notification settings - Fork 990
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
Adds cirq.num_cnots_required and cirq.to_special #2892
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
Argh, I pushed this from my personal computer, I'll fix the CLA soon. |
df4326e
to
0bc4959
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
18a3b9a
to
28faacc
Compare
28faacc
to
1f2ed01
Compare
Automerge cancelled: No approved review. |
note - I'm just testing automerge |
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.
Why is this in contrib and not in cirq.optimizers
? The original bug suggests this is going to be very useful.
cirq/contrib/shannon_decomposition/three_qubit_decomposition.py
Outdated
Show resolved
Hide resolved
cirq/contrib/shannon_decomposition/three_qubit_decomposition.py
Outdated
Show resolved
Hide resolved
cirq/contrib/shannon_decomposition/three_qubit_decomposition.py
Outdated
Show resolved
Hide resolved
cirq/contrib/shannon_decomposition/three_qubit_decomposition.py
Outdated
Show resolved
Hide resolved
cirq/contrib/shannon_decomposition/three_qubit_decomposition.py
Outdated
Show resolved
Hide resolved
cirq/contrib/shannon_decomposition/three_qubit_decomposition_test.py
Outdated
Show resolved
Hide resolved
@viathor, thank you for the thorough review - awesome suggestions! |
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.
Nice! LGTM with a few minor comments.
Automerge cancelled: A required status check is not present. Missing statuses: ['Build docs', 'Build protos', 'Changed files test', 'Coverage check', 'Doc test', 'Format check', 'Lint check', 'Misc check', 'Pytest MacOS (3.6)', 'Pytest MacOS (3.7)', 'Pytest Ubuntu (3.6)', 'Pytest Ubuntu (3.7)', 'Pytest Windows (3.6)', 'Pytest Windows (3.7)', 'Type check'] |
… 3qdecomp/is_three_cnot
Adds cirq.num_two_qubit_gates_required and cirq.to_special.
cirq.num_cnots_required
: Based on simple linear algebra users can calculate the minimum required two-qubit gates (CZ, CNOT) to implement a two-qubit unitary.cirq.to_special
: converts a unitary to a special unitaryContext: this is the first PR breaking up #2873.
For an overview of the high level design decisions of the whole project see: https://drive.google.com/open?id=1SDEtttIAaTwfV9AUs7XAxeW3AUd0qLoY.