Skip to content

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

Merged
merged 7 commits into from
May 17, 2022
Merged

Conversation

dabacon
Copy link
Collaborator

@dabacon dabacon commented May 12, 2022

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

@dabacon dabacon requested review from a team, vtomole and cduck as code owners May 12, 2022 04:17
@dabacon dabacon requested a review from maffoo May 12, 2022 04:17
@CirqBot CirqBot added the size: M 50< lines changed <250 label May 12, 2022
@dabacon dabacon requested a review from mpharrigan May 16, 2022 18:32
@dabacon
Copy link
Collaborator Author

dabacon commented May 16, 2022

Summoning @mpharrigan the json master.

@@ -0,0 +1 @@
cirq.DiagonalGate(diag_angles_radians=[0.0, 1.0, -1.0, 0.0])
Copy link
Collaborator

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.

Copy link
Collaborator

@mpharrigan mpharrigan left a 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.

@dabacon dabacon added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label May 17, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label May 17, 2022
@CirqBot
Copy link
Collaborator

CirqBot commented May 17, 2022

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']

@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 May 17, 2022
@dabacon dabacon merged commit 9459df7 into quantumlib:master May 17, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants