Skip to content
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

Remove final_state_vector deprecations. #5720

Merged
merged 4 commits into from
Jul 11, 2022
Merged
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
16 changes: 1 addition & 15 deletions cirq-core/cirq/circuits/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,24 +1077,11 @@ def _superoperator_(self) -> np.ndarray:
circuit_superoperator = moment_superoperator @ circuit_superoperator
return circuit_superoperator

@_compat.deprecated_parameter(
deadline='v0.16',
fix='Inject identity operators to include untouched qubits.',
parameter_desc='qubits_that_should_be_present',
match=lambda args, kwargs: 'qubits_that_should_be_present' in kwargs,
)
@_compat.deprecated_parameter(
deadline='v0.16',
fix='Only use keyword arguments.',
parameter_desc='positional args',
match=lambda args, kwargs: len(args) > 1,
)
def final_state_vector(
self,
*,
initial_state: 'cirq.STATE_VECTOR_LIKE' = 0,
qubit_order: 'cirq.QubitOrderOrList' = ops.QubitOrder.DEFAULT,
qubits_that_should_be_present: Iterable['cirq.Qid'] = (),
ignore_terminal_measurements: bool = False,
dtype: Type[np.complexfloating] = np.complex128,
param_resolver: 'cirq.ParamResolverOrSimilarType' = None,
Expand Down Expand Up @@ -1139,9 +1126,8 @@ def final_state_vector(
"""
from cirq.sim.mux import final_state_vector

program = Circuit(cirq.I(q) for q in qubits_that_should_be_present) + self
return final_state_vector(
program,
self,
initial_state=initial_state,
param_resolver=param_resolver,
qubit_order=qubit_order,
Expand Down