cirq.google.XmonSimulator.simulate_moment_steps¶
-
XmonSimulator.simulate_moment_steps(circuit: cirq.circuits.circuit.Circuit, param_resolver: cirq.study.resolver.ParamResolver = None, qubit_order: Union[cirq.ops.qubit_order.QubitOrder, Iterable[cirq.ops.raw_types.QubitId]] = <cirq.ops.qubit_order.QubitOrder object>, initial_state: Union[int, numpy.ndarray] = 0) → Iterator[cirq.sim.simulator.StepResult]¶ Returns an iterator of StepResults for each moment simulated.
Parameters: - circuit – The Circuit to simulate.
- param_resolver – A ParamResolver for determining values of Symbols.
- qubit_order – Determines the canonical ordering of the qubits used to define the order of amplitudes in the wave function.
- initial_state – If an int, the state is set to the computational basis state corresponding to this state. Otherwise if this is a np.ndarray it is the full initial state. In this case it must be the correct size, be normalized (an L2 norm of 1), and be safely castable to an appropriate dtype for the simulator.
Returns: Iterator that steps through the simulation, simulating each moment and returning a StepResult for each moment.