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

Add json serialization to SycamoreTargetGateset. #5314

Merged
merged 2 commits into from
May 2, 2022

Conversation

verult
Copy link
Collaborator

@verult verult commented Apr 29, 2022

This makes it possible to fully serialize GridDeviceMetadata.

A repr/json with tabulation set is omitted because the repr of cirq.two_qubit_gate_product_tabulation() is very long.

@tanujkhattar

@verult verult requested a review from tanujkhattar April 29, 2022 22:04
@verult verult requested review from wcourtney, a team, vtomole and cduck as code owners April 29, 2022 22:04
@@ -0,0 +1 @@
cirq_google.SycamoreTargetGateset(atol=1e-08, tabulation=None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The repr json combo might need to go in the cirq_google json_test_data directory ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops my bad, thanks for the catch!

@MichaelBroughton MichaelBroughton self-assigned this Apr 29, 2022
@verult verult force-pushed the sycaremore-target-gateset-json branch from b97237d to 9130aeb Compare April 29, 2022 22:29
@verult verult requested a review from MichaelBroughton April 29, 2022 22:29
@verult verult force-pushed the sycaremore-target-gateset-json branch from 9130aeb to 512182b Compare April 29, 2022 23:11
@CirqBot CirqBot added the size: S 10< lines changed <50 label Apr 30, 2022
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.

Can you add a json roundtrip verification test which includes the two qubit gate tabulation to sycamore_gateset_test.py ?

@tanujkhattar tanujkhattar self-assigned this May 2, 2022
A repr/json with tabulation set is omitted because the repr of cirq.two_qubit_gate_product_tabulation() is very long.
@verult verult force-pushed the sycaremore-target-gateset-json branch from 512182b to a9085bf Compare May 2, 2022 19:28
@verult verult requested a review from tanujkhattar May 2, 2022 19:28
@verult verult added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label May 2, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label May 2, 2022
@CirqBot CirqBot merged commit 9416382 into quantumlib:master May 2, 2022
@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 2, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
This makes it possible to fully serialize `GridDeviceMetadata`.

A repr/json with tabulation set is omitted because the repr of cirq.two_qubit_gate_product_tabulation() is very long.

@tanujkhattar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants