cirq.TrialResult

class cirq.TrialResult(*, params: cirq.study.resolver.ParamResolver, measurements: Dict[str, numpy.ndarray])[source]
The results of multiple executions of a circuit with fixed parameters.
Stored as a Pandas DataFrame that can be accessed through the “data”
attribute. The repetition number is the row index and measurement keys
are the columns of the DataFrame. Each element is a big endian integer
representation of measurement outcomes for the measurement key in that
repitition.
params

A ParamResolver of settings used when sampling result.

__init__(*, params: cirq.study.resolver.ParamResolver, measurements: Dict[str, numpy.ndarray]) → None[source]
Parameters
  • params – A ParamResolver of settings used for this result.

  • measurements – A dictionary from measurement gate key to measurement results. The value for each key is a 2-D array of booleans, with the first index running over the repetitions, and the second index running over the qubits for the corresponding measurements.