cirq.experiments.StateTomographyExperiment

class cirq.experiments.StateTomographyExperiment(qubits: Sequence[cirq.Qid], prerotations: Optional[Sequence[Tuple[float, float]]] = None)[source]

Experiment to conduct state tomography.

Generates data collection protocol for the state tomography experiment.
Does the fitting of generated data to determine the density matrix.
rot\_circuit
Circuit with parameterized rotation gates to do before the
final measurements.
rot\_sweep
The list of rotations on the qubits to perform before
measurement.
mat
Matrix of coefficients for the system. Each row is one equation
corresponding to a rotation sequence and bit string outcome for
that rotation sequence. Each column corresponds to the coefficient
on one term in the density matrix.
num\_qubits

Number of qubits to do tomography on.

__init__(qubits: Sequence[cirq.Qid], prerotations: Optional[Sequence[Tuple[float, float]]] = None)[source]

Initializes the rotation protocol and matrix for system.

Parameters
  • qubits – Qubits to do the tomography on.

  • prerotations – Tuples of (phase_exponent, exponent) parameters for gates to apply to the qubits before measurement. The actual rotation applied will be cirq.PhasedXPowGate with the specified values of phase_exponent and exponent. If None, we use [(0, 0), (0, 0.5), (0.5, 0.5)], which corresponds to rotation gates [I, X**0.5, Y**0.5].