cirq.sample_sweep(program: cirq.Circuit, params: Optional[Union[Dict[str, float],,, Iterable[Union[Dict[str, float],,]]]], *, noise: cirq.NOISE_MODEL_LIKE = None, repetitions: int = 1, dtype: Type[numpy.number] = <class 'numpy.complex64'>, seed: cirq.RANDOM_STATE_OR_SEED_LIKE = None) → List[][source]

Runs the supplied Circuit, mimicking quantum hardware.

In contrast to run, this allows for sweeping over different parameter
  • program – The circuit to simulate.

  • params – Parameters to run with the program.

  • noise – Noise model to use while running the simulation.

  • repetitions – The number of repetitions to simulate, per set of parameter values.

  • dtype – The numpy.dtype used by the simulation. Typically one of numpy.complex64 or numpy.complex128. Favors speed over precision by default, i.e. uses numpy.complex64.

  • seed – The random seed to use for this simulator.


TrialResult list for this run; one for each possible parameter resolver.