cirq.SimulatesIntermediateWaveFunction.simulate_sweep¶
-
SimulatesIntermediateWaveFunction.simulate_sweep(program: Union[cirq.circuits.circuit.Circuit, cirq.schedules.schedule.Schedule], params: Union[cirq.study.resolver.ParamResolver, Iterable[cirq.study.resolver.ParamResolver], cirq.study.sweeps.Sweep, Iterable[cirq.study.sweeps.Sweep]] = cirq.ParamResolver({}), 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) → List[cirq.sim.simulator.SimulationTrialResult][source]¶ Simulates the entire supplied Circuit.
This method returns a result which allows access to the entirewave function. In contrast to simulate, this allows for sweepingover different parameter values.Parameters: - program – The circuit or schedule to simulate.
- params – Parameters to run with the program.
- 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: List of SimulatorTrialResults for this run, one for each possible parameter resolver.