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
6 changes: 1 addition & 5 deletions cirq-core/cirq/devices/noise_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import abc
from typing import Iterable, Sequence, TYPE_CHECKING, List

from cirq import _compat, _import, ops, protocols, devices
from cirq import _import, ops, protocols, devices
from cirq.devices.noise_utils import PHYSICAL_GATE_TAG

circuits = _import.LazyLoader("circuits", globals(), "cirq.circuits.circuit")
Expand Down Expand Up @@ -66,10 +66,6 @@ def is_virtual(self, op: 'cirq.Operation') -> bool:
"""
return False

@_compat.deprecated(deadline='v0.16', fix='Use is_virtual instead.')
def virtual_predicate(self, op: 'cirq.Operation') -> bool:
return self.is_virtual(op)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check (new) line 89 below

def noisy_moments(
self, moments: Iterable['cirq.Moment'], system_qubits: Sequence['cirq.Qid']
) -> Sequence['cirq.OP_TREE']:
Expand Down
8 changes: 0 additions & 8 deletions cirq-core/cirq/devices/noise_properties_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,3 @@ def test_sample_model():
cirq.Moment(cirq.H(q0), cirq.H(q1)),
)
assert noisy_circuit == expected_circuit


def test_deprecated_virtual_predicate():
q0, q1 = cirq.LineQubit.range(2)
props = SampleNoiseProperties([q0, q1], [(q0, q1), (q1, q0)])
model = NoiseModelFromNoiseProperties(props)
with cirq.testing.assert_deprecated("Use is_virtual", deadline="v0.16"):
_ = model.virtual_predicate(cirq.X(q0))