Skip to content

Commit 1f4f11a

Browse files
Remove final_state_vector deprecations. (#5720)
1 parent fef9487 commit 1f4f11a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Diff for: cirq-core/cirq/circuits/circuit.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -1076,24 +1076,11 @@ def _superoperator_(self) -> np.ndarray:
10761076
circuit_superoperator = moment_superoperator @ circuit_superoperator
10771077
return circuit_superoperator
10781078

1079-
@_compat.deprecated_parameter(
1080-
deadline='v0.16',
1081-
fix='Inject identity operators to include untouched qubits.',
1082-
parameter_desc='qubits_that_should_be_present',
1083-
match=lambda args, kwargs: 'qubits_that_should_be_present' in kwargs,
1084-
)
1085-
@_compat.deprecated_parameter(
1086-
deadline='v0.16',
1087-
fix='Only use keyword arguments.',
1088-
parameter_desc='positional args',
1089-
match=lambda args, kwargs: len(args) > 1,
1090-
)
10911079
def final_state_vector(
10921080
self,
10931081
*,
10941082
initial_state: 'cirq.STATE_VECTOR_LIKE' = 0,
10951083
qubit_order: 'cirq.QubitOrderOrList' = ops.QubitOrder.DEFAULT,
1096-
qubits_that_should_be_present: Iterable['cirq.Qid'] = (),
10971084
ignore_terminal_measurements: bool = False,
10981085
dtype: Type[np.complexfloating] = np.complex128,
10991086
param_resolver: 'cirq.ParamResolverOrSimilarType' = None,
@@ -1138,9 +1125,8 @@ def final_state_vector(
11381125
"""
11391126
from cirq.sim.mux import final_state_vector
11401127

1141-
program = Circuit(cirq.I(q) for q in qubits_that_should_be_present) + self
11421128
return final_state_vector(
1143-
program,
1129+
self,
11441130
initial_state=initial_state,
11451131
param_resolver=param_resolver,
11461132
qubit_order=qubit_order,

0 commit comments

Comments
 (0)