cirq.google.QuantumEngineSampler

class cirq.google.QuantumEngineSampler(*, engine: cirq.google.Engine, processor_id: Union[str, List[str]], gate_set: cirq.google.SerializableGateSet)[source]

A sampler that samples from processors managed by the Quantum Engine.

Exposes a cirq.google.Engine instance as a cirq.Sampler.

__init__(*, engine: cirq.google.Engine, processor_id: Union[str, List[str]], gate_set: cirq.google.SerializableGateSet)[source]
Parameters
  • engine – Quantum engine instance to use.

  • processor_id – String identifier, or list of string identifiers, determining which processors may be used when sampling.

  • gate_set – Determines how to serialize circuits when requesting samples.

Methods

run(program[, param_resolver, repetitions])

Samples from the given Circuit.

run_async(program, *, repetitions)

Asynchronously samples from the given Circuit.

run_sweep(program, params[, repetitions])

Samples from the given Circuit.

run_sweep_async(program, params[, repetitions])

Asynchronously sweeps and samples from the given Circuit.

sample(program, *[, repetitions, params])

Samples the given Circuit, producing a pandas data frame.

Attributes

engine