From ee3b78e07f21864b1f83fbbfbd16c4c863f05799 Mon Sep 17 00:00:00 2001 From: Matthew Harrigan Date: Wed, 24 Nov 2021 13:42:37 -0800 Subject: [PATCH] merge issues --- cirq-core/cirq/devices/named_topologies.py | 4 ---- cirq-google/cirq_google/workflow/qubit_placement.py | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cirq-core/cirq/devices/named_topologies.py b/cirq-core/cirq/devices/named_topologies.py index 285207dd63f..bdbc8895b53 100644 --- a/cirq-core/cirq/devices/named_topologies.py +++ b/cirq-core/cirq/devices/named_topologies.py @@ -20,10 +20,6 @@ import networkx as nx from matplotlib import pyplot as plt -from cirq import _compat -from cirq.devices import GridQubit, LineQubit -from cirq.protocols.json_serialization import obj_to_dict_helper - from cirq import _compat from cirq.devices import GridQubit, LineQubit from cirq.protocols.json_serialization import dataclass_json_dict diff --git a/cirq-google/cirq_google/workflow/qubit_placement.py b/cirq-google/cirq_google/workflow/qubit_placement.py index 4fbf687de82..bdccbb149a6 100644 --- a/cirq-google/cirq_google/workflow/qubit_placement.py +++ b/cirq-google/cirq_google/workflow/qubit_placement.py @@ -64,8 +64,12 @@ def place_circuit( ) -> Tuple['cirq.FrozenCircuit', Dict[Any, 'cirq.Qid']]: return circuit.freeze(), {q: q for q in circuit.all_qubits()} + @classmethod + def _json_namespace_(cls) -> str: + return 'cirq.google' + def _json_dict_(self) -> Dict[str, Any]: - return cirq.dataclass_json_dict(self, namespace='cirq.google') + return cirq.dataclass_json_dict(self) def __repr__(self) -> str: return _compat.dataclass_repr(self, namespace='cirq_google')