Skip to content

Remove virtual_predicate deprecations. #5724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 0 additions & 4 deletions cirq-core/cirq/devices/noise_properties.py
Original file line number Diff line number Diff line change
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
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))