Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions cirq-core/cirq/contrib/graph_device/graph_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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))
Expand Down
8 changes: 0 additions & 8 deletions cirq-core/cirq/contrib/graph_device/graph_device_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}