cirq.TrialResult¶

class cirq.TrialResult(*, params: cirq.study.resolver.ParamResolver, measurements: Dict[str, numpy.ndarray], repetitions: int)[source]

The results of multiple executions of a circuit with fixed parameters.

params

A ParamResolver of settings used when sampling result.

measurements
A dictionary from measurement gate key to measurement
results. Measurement results are stored in a 2-dimensional
numpy array, the first dimension corresponding to the repetition
and the second to the actual boolean measurement results (ordered
by the qubits being measured.)
repetitions
The number of times a circuit was sampled to get these
results.
__init__(*, params: cirq.study.resolver.ParamResolver, measurements: Dict[str, numpy.ndarray], repetitions: int) → 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. repetitions – The number of times the circuit was sampled.

Methods

 histogram(*, key, cirq.Qid, …) Counts the number of times a measurement result occurred. multi_measurement_histogram(*, keys, …) Counts the number of times combined measurement results occurred.