Checks that the state_vector is stabilized by the given stabilizer.
cirq.testing.consistent_act_on.state_vector_has_stabilizer(
state_vector: np.ndarray,
stabilizer: cirq.DensePauliString
) -> bool
The stabilizer should not modify the value of the state_vector, up to the
global phase.
Args |
state_vector
|
An input state vector. Is not mutated by this function.
|
stabilizer
|
A potential stabilizer of the above state_vector as a
DensePauliString.
|
Returns |
Whether the stabilizer stabilizes the supplied state.
|