From eb2a1dc87498563f996df73c5a2d7c216976efb7 Mon Sep 17 00:00:00 2001 From: MichaelBroughton Date: Thu, 23 Jun 2022 13:03:26 -0400 Subject: [PATCH] Remove deprecated qubits in contrib graphdevice. (#5582) --- cirq-core/cirq/contrib/graph_device/graph_device.py | 8 ++------ cirq-core/cirq/contrib/graph_device/graph_device_test.py | 8 -------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/cirq-core/cirq/contrib/graph_device/graph_device.py b/cirq-core/cirq/contrib/graph_device/graph_device.py index 02a642a092d..c178b87ecff 100644 --- a/cirq-core/cirq/contrib/graph_device/graph_device.py +++ b/cirq-core/cirq/contrib/graph_device/graph_device.py @@ -15,9 +15,9 @@ import abc import itertools -from typing import Iterable, Optional, FrozenSet, TYPE_CHECKING, Tuple, cast +from typing import Iterable, Optional, TYPE_CHECKING, Tuple, cast -from cirq import _compat, devices, ops, value +from cirq import devices, ops, value from cirq.contrib.graph_device.hypergraph import UndirectedHypergraph @@ -155,10 +155,6 @@ def __init__( def qubits(self) -> Tuple['cirq.Qid', ...]: return cast(Tuple['cirq.Qid', ...], tuple(sorted(self.device_graph.vertices))) - @_compat.deprecated(fix='Please use UndirectedGraphDevice.qubits', deadline='v0.15') - def qubit_set(self) -> FrozenSet['cirq.Qid']: - return frozenset(self.qubits) - @property def edges(self): return tuple(sorted(self.device_graph.edges)) diff --git a/cirq-core/cirq/contrib/graph_device/graph_device_test.py b/cirq-core/cirq/contrib/graph_device/graph_device_test.py index b2b0eb304e1..d1e7cb351df 100644 --- a/cirq-core/cirq/contrib/graph_device/graph_device_test.py +++ b/cirq-core/cirq/contrib/graph_device/graph_device_test.py @@ -173,11 +173,3 @@ def test_graph_device_copy_and_add(): device_copy += device_addend assert device != device_copy assert device_copy == device_sum - - -def test_qubit_set_deprecated(): - a, b, c, d = cirq.LineQubit.range(4) - device_graph = ccgd.UndirectedHypergraph(labelled_edges={(a, b): None, (c, d): None}) - device = ccgd.UndirectedGraphDevice(device_graph=device_graph) - with cirq.testing.assert_deprecated('qubit_set', deadline='v0.15'): - assert device.qubit_set() == {a, b, c, d}