Remove deprecated class SerializableDevice#5743
Conversation
|
Can someone better versed with the proto-to-GridDevice process please check the |
dabacon
left a comment
There was a problem hiding this comment.
There are occurrences in known_devices_test.py that I don't see here. Also a reference in quantum_runtime.py
| 'SYC_GATESET', | ||
| 'Sycamore', | ||
| 'Sycamore23', | ||
| 'SerializableDevice', |
There was a problem hiding this comment.
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. |
dabacon
left a comment
There was a problem hiding this comment.
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