class cirq.google.XmonSimulator(options: cirq.google.sim.xmon_simulator.XmonOptions = None)[source]

XmonSimulator for quantum circuits with an Xmon device.

This simulator will raise an exception if given a circuit that doesn’t
specify a device that is an instance of XmonDevice.

This simulator has different methods for different types of simulations.

For simulations that mimic the quantum hardware, the run methods are
defined in the SimulatesSamples interface:
run
run_sweep
These methods do not return or give access to the full wave function.
To get access to the wave function during a simulation, including being
able to set the wave function, the simulate methods are defined in the
SimulatesFinalState and SimulatesIntermediateState interfaces:
simulate
simulate_sweep
simulate_moment_steps (for stepping through a circuit moment by moment)
The simulator state of this simulator is the entire wave function of the
quantum computer. When supplied as an initial state, this may be either
the entire wave function, or an integer representing a state in the
computational basis, with the ordering specified by the qubit ordering
supplied to the simulate methods.
__init__(options: cirq.google.sim.xmon_simulator.XmonOptions = None) → None[source]

Construct a XmonSimulator.

Parameters: options – XmonOptions configuring the simulation.

Methods

 compute_displays(program, …) Computes displays in the supplied Circuit or Schedule. compute_displays_sweep(program, …) Computes displays in the supplied Circuit or Schedule. compute_samples_displays(program, …) Computes SamplesDisplays in the supplied Circuit or Schedule. compute_samples_displays_sweep(program, …) Computes SamplesDisplays in the supplied Circuit or Schedule. run(program, …) Samples from the given Circuit or Schedule. run_sweep(program, …) Runs the supplied Circuit or Schedule, mimicking quantum hardware. simulate(program, …) Simulates the supplied Circuit or Schedule. simulate_moment_steps(circuit, …) Returns an iterator of StepResults for each moment simulated. simulate_sweep(program, …) Simulates the supplied Circuit or Schedule.