Skip to content
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

Create consistency check for unitary with ancilla #6196

Merged
merged 3 commits into from Jul 14, 2023

Conversation

NoureldinYosri
Copy link
Collaborator

This PR:

  1. Creates assert_unitary_is_consistent to check that the unitary computed by falling back to decompose in the presence of ancilla is correct.
  2. Updates assert_decompose_is_consistent_with_unitary to support gates with ancillas.
  3. Fixes the gates in sample_gate to actually use ancillas rather than named qubits.

This completes #6101 and #6182

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nits

cirq-core/cirq/testing/consistent_unitary.py Outdated Show resolved Hide resolved
cirq-core/cirq/testing/consistent_unitary.py Show resolved Hide resolved
cirq-core/cirq/testing/consistent_unitary.py Outdated Show resolved Hide resolved
cirq-core/cirq/testing/consistent_unitary.py Show resolved Hide resolved
cirq-core/cirq/testing/consistent_unitary.py Outdated Show resolved Hide resolved
cirq-core/cirq/testing/consistent_unitary.py Show resolved Hide resolved
@NoureldinYosri NoureldinYosri merged commit cb05a69 into master Jul 14, 2023
30 checks passed
@NoureldinYosri NoureldinYosri deleted the unitary_consistancy_check branch July 14, 2023 13:37
@mpharrigan mpharrigan added the area/cirq-ft Issues related to the Cirq-FT sub-package label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cirq-ft Issues related to the Cirq-FT sub-package size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants