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 sign error in PhasedXZGate._canonical #2744

Merged
merged 1 commit into from
Feb 6, 2020
Merged

Fix sign error in PhasedXZGate._canonical #2744

merged 1 commit into from
Feb 6, 2020

Conversation

Strilanc
Copy link
Contributor

@Strilanc Strilanc commented Feb 6, 2020

No description provided.

@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Feb 6, 2020
cirq.testing.random_unitary(2),
cirq.testing.random_unitary(2),
cirq.testing.random_unitary(2),
np.array([[0, 1], [1j, 0]]),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This case used to fail.

@@ -120,7 +121,11 @@ def f(x, z, a):
t = f(1, 0.25, 0.5)._canonical()
assert t.x_exponent == 1
assert t.z_exponent == 0
assert t.axis_phase_exponent == 0.375
assert t.axis_phase_exponent == -0.375
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The sign in this test was wrong.

@dstrain115 dstrain115 merged commit 1e5bf55 into master Feb 6, 2020
@mpharrigan
Copy link
Collaborator

Could this have caused any incorrect results? Or is this just a failure to adhere to the canonicalization convention?

@dabacon dabacon deleted the sign_error branch May 15, 2020 22:21
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

4 participants