-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove deprecated class SerializableDevice #5743
Remove deprecated class SerializableDevice #5743
Conversation
Can someone better versed with the proto-to-GridDevice process please check the |
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.
There are occurrences in known_devices_test.py
that I don't see here. Also a reference in quantum_runtime.py
@@ -14,7 +14,6 @@ | |||
'SYC_GATESET', | |||
'Sycamore', | |||
'Sycamore23', | |||
'SerializableDevice', |
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.
lol good thing a SerializableDevice
was never json serialized.
I fail to see the one in known_devices_test.py, perhaps we look at different versions?
Cleaning up the reference in quantum_runtime.py as below causes some test failures so I'd rather leave it for a separate PR. diff --git a/cirq-google/cirq_google/workflow/quantum_runtime.py b/cirq-google/cirq_google/workflow/quantum_runtime.py
index 56fa0a33..644f6b94 100644
--- a/cirq-google/cirq_google/workflow/quantum_runtime.py
+++ b/cirq-google/cirq_google/workflow/quantum_runtime.py
@@ -59,10 +59,7 @@ class SharedRuntimeInfo:
return 'cirq.google'
def _json_dict_(self) -> Dict[str, Any]:
- d = dataclass_json_dict(self)
- # TODO (gh-4699): serialize `device` as well once SerializableDevice is serializable.
- del d['device']
- return d
+ return dataclass_json_dict(self)
def __repr__(self) -> str:
return _compat.dataclass_repr(self, namespace='cirq_google') |
Do not refer to Serializable Devices.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Oh damn github search index is .... not fast. |
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.
LGTM modulo one comment in specification.md
Device validates Circuit, not other way around.
Remove deprecated property GridDevice.qubits. Clean up documentation references to the SerializableDevice and update the circuit validation example in the specification.md doc. Part of quantumlib#5050
Remove deprecated property GridDevice.qubits.
Clean up documentation references to the SerializableDevice and
update the circuit validation example in the specification.md doc.
Part of #5050