![]() |
A state of the Clifford simulation.
cirq.sim.CliffordState(
qubit_map, initial_state=0
)
The state is stored using two complementary representations: Anderson's tableaux form and Bravyi's CH-form. The tableaux keeps track of the stabilizer operations, while the CH-form allows access to the full state vector (including phase).
Gates and measurements are applied to each representation in O(n^2) time.
Methods
apply_single_qubit_unitary
apply_single_qubit_unitary(
op: "cirq.Operation"
)
apply_unitary
apply_unitary(
op: "cirq.Operation"
)
copy
copy() -> "CliffordState"
destabilizers
destabilizers() -> List[cirq.ops.DensePauliString
]
Returns the destabilizer generators of the state. These are n operators {S_1,S_2,...,S_n} such that along with the stabilizer generators above generate the full Pauli group on n qubits.
perform_measurement
perform_measurement(
qubits: Sequence[cirq.ops.Qid
],
prng: np.random.RandomState,
collapse_state_vector=True
)
stabilizers
stabilizers() -> List[cirq.ops.DensePauliString
]
Returns the stabilizer generators of the state. These are n operators {S_1,S_2,...,S_n} such that S_i |psi> = |psi>
state_vector
state_vector()
to_numpy
to_numpy() -> np.ndarray
wave_function
wave_function()
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.10.0
.
use state_vector instead
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool