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

SerializableDevice is not json serializable #4699

Closed
mpharrigan opened this issue Nov 23, 2021 · 5 comments
Closed

SerializableDevice is not json serializable #4699

mpharrigan opened this issue Nov 23, 2021 · 5 comments
Assignees
Labels
area/devices area/serialization kind/feature-request Describes new functionality triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on

Comments

@mpharrigan
Copy link
Collaborator

At least not JSON-serializable.

This is a high priority request for cirq.google workflow tools. It's important to be able to save a record of the device you ran on when performing an experiment.

@mpharrigan mpharrigan added the kind/feature-request Describes new functionality label Nov 23, 2021
@tanujkhattar tanujkhattar changed the title SerializableDevice is not serializable SerializableDevice is not json serializable Nov 23, 2021
@maffoo
Copy link
Contributor

maffoo commented Nov 23, 2021

Making this serializable will require getting rid of the lambdas that come in via _GateDefinition.can_serialize_predicate.

CirqBot pushed a commit that referenced this issue Dec 2, 2021
Splitting up #4678 

- The interface: `QubitPlacer`
- The fallback: `NaiveQubitPlacer`
- runtime hooks

some hacks around #4699
@tanujkhattar
Copy link
Collaborator

We should also migrate away from using _GateDefinition for gate containment checks and use the new cirq.GateFamily and cirq.Gateset framework, which is now serializable.

@95-martin-orion 95-martin-orion added the triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on label Dec 10, 2021
@95-martin-orion
Copy link
Collaborator

I see no reason not to accept this item - having such a contradiction of class name and behavior is very silly.

@dstrain115
Copy link
Collaborator

We can probably deprecate this class after the new device spec goes in.

CirqBot pushed a commit that referenced this issue Jul 13, 2022
Include the SharedRuntimeInfo.device field in the JSON dump and
update the affected test data files.

Part of #4699 and #5050.
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
Splitting up quantumlib#4678 

- The interface: `QubitPlacer`
- The fallback: `NaiveQubitPlacer`
- runtime hooks

some hacks around quantumlib#4699
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
Include the SharedRuntimeInfo.device field in the JSON dump and
update the affected test data files.

Part of quantumlib#4699 and quantumlib#5050.
@dstrain115
Copy link
Collaborator

This class has been deprecated and is now defunct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devices area/serialization kind/feature-request Describes new functionality triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on
Projects
None yet
Development

No branches or pull requests

8 participants