From 0e2554e225bced097637cf5bd3c4aa92c2ccc254 Mon Sep 17 00:00:00 2001 From: daxfohl Date: Thu, 23 Jun 2022 16:56:29 -0700 Subject: [PATCH] Add a deprecation cycle --- cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py | 2 +- cirq-core/cirq/ops/arithmetic_operation.py | 2 +- cirq-core/cirq/ops/arithmetic_operation_test.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py b/cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py index 0072686cf15..52eaebc62c1 100644 --- a/cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py +++ b/cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py @@ -35,7 +35,7 @@ import cirq -@deprecated_class(deadline='v0.15', fix='Use cirq.QuirkArithmeticGate') +@deprecated_class(deadline='v0.16', fix='Use cirq.QuirkArithmeticGate') @value.value_equality class QuirkArithmeticOperation(ops.ArithmeticOperation): """Applies arithmetic to a target and some inputs. diff --git a/cirq-core/cirq/ops/arithmetic_operation.py b/cirq-core/cirq/ops/arithmetic_operation.py index 57a6665d797..125657a8501 100644 --- a/cirq-core/cirq/ops/arithmetic_operation.py +++ b/cirq-core/cirq/ops/arithmetic_operation.py @@ -29,7 +29,7 @@ TSelf = TypeVar('TSelf', bound='ArithmeticOperation') -@deprecated_class(deadline='v0.15', fix='Use cirq.ArithmeticGate') +@deprecated_class(deadline='v0.16', fix='Use cirq.ArithmeticGate') class ArithmeticOperation(Operation, metaclass=abc.ABCMeta): """A helper class for implementing reversible classical arithmetic. diff --git a/cirq-core/cirq/ops/arithmetic_operation_test.py b/cirq-core/cirq/ops/arithmetic_operation_test.py index 7d93362d818..de9ac218758 100644 --- a/cirq-core/cirq/ops/arithmetic_operation_test.py +++ b/cirq-core/cirq/ops/arithmetic_operation_test.py @@ -100,7 +100,7 @@ def with_registers(self, *new_registers): def apply(self, target_value, input_value): return target_value + input_value - with cirq.testing.assert_deprecated(deadline='v0.15', count=8): + with cirq.testing.assert_deprecated(deadline='v0.16', count=8): inc2 = Add(cirq.LineQubit.range(2), 1) np.testing.assert_allclose(cirq.unitary(inc2), shift_matrix(4, 1), atol=1e-8) @@ -208,7 +208,7 @@ def with_registers(self, *new_registers): def apply(self, target_value, input_value): raise NotImplementedError() - with cirq.testing.assert_deprecated(deadline='v0.15', count=4): + with cirq.testing.assert_deprecated(deadline='v0.16', count=4): q0, q1, q2, q3, q4, q5 = cirq.LineQubit.range(6) op = Three([q0], [], [q4, q5]) assert op.qubits == (q0, q4, q5) @@ -238,7 +238,7 @@ def registers(self): def with_registers(self, *new_registers): raise NotImplementedError() - with cirq.testing.assert_deprecated(deadline='v0.15'): + with cirq.testing.assert_deprecated(deadline='v0.16'): state = np.ones(4, dtype=np.complex64) / 2 output = cirq.final_state_vector(cirq.Circuit(Op1()), initial_state=state) np.testing.assert_allclose(state, output)