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

Fix the typo in clifford_gate_test::test_commutes_pauli #4149

Merged
merged 3 commits into from
Jun 4, 2021

Conversation

bichengying
Copy link
Collaborator

@bichengying bichengying commented May 29, 2021

Although the original test is still theoretically correct, it doesn't make sense to make the expected result with an exponent but call the actual commutes function without an exponent. And I guess 0.1 was a typo for 1.0.

There was another error revealed when I tried to fix it -- cirq.allclose_up_to_global_phase(mat, mat_swap). "Up to gloabl phase" means both commutive and anti-commutive operators return ture, which is not desired.

@bichengying bichengying requested review from cduck, vtomole and a team as code owners May 29, 2021 06:34
@bichengying bichengying requested a review from maffoo May 29, 2021 06:34
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label May 29, 2021
@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 4, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 4, 2021
@CirqBot CirqBot merged commit 66b2102 into quantumlib:master Jun 4, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jun 4, 2021
@bichengying bichengying deleted the fix_clifford_test branch November 6, 2021 04:11
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
)

Although the original test is still theoretically correct, it doesn't make sense to make the expected result with an exponent but call the actual `commutes` function without an exponent. And I guess 0.1 was a typo for 1.0.

There was another error revealed when I tried to fix it -- `cirq.allclose_up_to_global_phase(mat, mat_swap)`. "Up to gloabl phase" means both commutive and anti-commutive operators return ture, which is not desired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants