cirq.google.XmonStepResult

class cirq.google.XmonStepResult(stepper: cirq.google.sim.xmon_stepper.Stepper, qubit_map: Dict, measurements: Dict[str, numpy.ndarray])[source]

Results of a step of the simulator.

qubit_map
A map from the Qubits in the Circuit to the the index
of this qubit for a canonical ordering. This canonical ordering is
used to define the state (see the state_vector() method).
measurements
A dictionary from measurement gate key to measurement
results, ordered by the qubits that the measurement operates on.
__init__(stepper: cirq.google.sim.xmon_stepper.Stepper, qubit_map: Dict, measurements: Dict[str, numpy.ndarray]) → None[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

bloch_vector_of(qubit) Returns the bloch vector of a qubit in the state.
density_matrix_of(qubits) Returns the density matrix of the state.
dirac_notation(decimals) Returns the state vector as a string in Dirac notation.
sample(qubits, repetitions) Samples from the wave function at this point in the computation.
sample_measurement_ops(measurement_ops, …) Samples from the system at this point in the computation.
set_state_vector(state, numpy.ndarray]) Updates the state of the simulator to the given new state.
simulator_state() Returns the simulator_state of the simulator after this step.
state_vector() Return the wave function at this point in the computation.