class pyquil.operator_estimation.TomographyExperiment(settings, program, qubits)[source]

A tomography-like experiment.

Many near-term quantum algorithms involve:

  • some limited state preparation
  • enacting a quantum process (like in tomography) or preparing a variational ansatz state (like in VQE)
  • measuring observables of the state.

Where we typically use a large number of (state_prep, measure) pairs but keep the ansatz program consistent. This class stores the ansatz program as a Program and maintains a list of ExperimentSetting objects which each represent a (state_prep, measure) pair.

Settings diagonalized by a shared tensor product basis (TPB) can (optionally) be estimated simultaneously. Therefore, this class is backed by a list of list of ExperimentSettings. Settings sharing an inner list will be estimated simultaneously. If you don’t want this, provide a list of length-1-lists. As a convenience, if you pass a 1D list to the constructor will expand it to a list of length-1-lists.

This class will not group settings for you. Please see group_experiments() for a function that will automatically process a TomographyExperiment to group Experiments sharing a TPB.