Skip to content

Commit f0eb10f

Browse files
authored
Add a deprecation cycle for ArithmeticOp (quantumlib#5599)
quantumlib#4702 was started in November but did not get merged until May, which was after 14.1 went out. These deprecations need to be bumped to 0.16 instead of 0.15. Once 0.15 goes out then I can reopen quantumlib#5579 and delete these.
1 parent aaff012 commit f0eb10f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cirq/interop/quirk/cells/arithmetic_cells.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import cirq
3636

3737

38-
@deprecated_class(deadline='v0.15', fix='Use cirq.QuirkArithmeticGate')
38+
@deprecated_class(deadline='v0.16', fix='Use cirq.QuirkArithmeticGate')
3939
@value.value_equality
4040
class QuirkArithmeticOperation(ops.ArithmeticOperation):
4141
"""Applies arithmetic to a target and some inputs.

cirq/ops/arithmetic_operation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
TSelf = TypeVar('TSelf', bound='ArithmeticOperation')
3030

3131

32-
@deprecated_class(deadline='v0.15', fix='Use cirq.ArithmeticGate')
32+
@deprecated_class(deadline='v0.16', fix='Use cirq.ArithmeticGate')
3333
class ArithmeticOperation(Operation, metaclass=abc.ABCMeta):
3434
"""A helper class for implementing reversible classical arithmetic.
3535

cirq/ops/arithmetic_operation_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def with_registers(self, *new_registers):
100100
def apply(self, target_value, input_value):
101101
return target_value + input_value
102102

103-
with cirq.testing.assert_deprecated(deadline='v0.15', count=8):
103+
with cirq.testing.assert_deprecated(deadline='v0.16', count=8):
104104
inc2 = Add(cirq.LineQubit.range(2), 1)
105105
np.testing.assert_allclose(cirq.unitary(inc2), shift_matrix(4, 1), atol=1e-8)
106106

@@ -208,7 +208,7 @@ def with_registers(self, *new_registers):
208208
def apply(self, target_value, input_value):
209209
raise NotImplementedError()
210210

211-
with cirq.testing.assert_deprecated(deadline='v0.15', count=4):
211+
with cirq.testing.assert_deprecated(deadline='v0.16', count=4):
212212
q0, q1, q2, q3, q4, q5 = cirq.LineQubit.range(6)
213213
op = Three([q0], [], [q4, q5])
214214
assert op.qubits == (q0, q4, q5)
@@ -238,7 +238,7 @@ def registers(self):
238238
def with_registers(self, *new_registers):
239239
raise NotImplementedError()
240240

241-
with cirq.testing.assert_deprecated(deadline='v0.15'):
241+
with cirq.testing.assert_deprecated(deadline='v0.16'):
242242
state = np.ones(4, dtype=np.complex64) / 2
243243
output = cirq.final_state_vector(cirq.Circuit(Op1()), initial_state=state)
244244
np.testing.assert_allclose(state, output)

0 commit comments

Comments
 (0)