-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add json serialization to diagonal gates #5356
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
Conversation
Summoning @mpharrigan the json master. |
@@ -0,0 +1 @@ | |||
cirq.DiagonalGate(diag_angles_radians=[0.0, 1.0, -1.0, 0.0]) |
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.
it's strange that the repr turns the values to a list instead of keeping it a tuple, but I see that's how it's always been and isn't from this PR.
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.
the not_yet_serializable
list grows ever smaller.
Automerge cancelled: A required status check is not present. Missing statuses: ['Misc check', 'Pytest Ubuntu (3.7)', 'Pytest Ubuntu (3.8)', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage'] |
Also a small change in type annotations to
cirq.ThreeQubitDiagonalGate
. The argument type is more general so this should be backwards compatible. This change aligns with the other diagonal gates for consistency.Part of #5353