cirq.StepResult.set_state¶
-
StepResult.set_state(state: Union[int, numpy.ndarray]) → None[source]¶ Updates the state of the simulator to the given new state.
Parameters: - state – If this is an int, then this is the state to reset
- stepper to, expressed as an integer of the computational basis. (the) –
- to bitwise indices is little endian. Otherwise if this is (Integer) –
- np.ndarray this must be the correct size and have dtype of (a) –
- np.complex64. –
Raises: - ValueError if the state is incorrectly sized or not of the correct
dtype.