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 measurementresults. Measurement results are a list of lists (a numpy ndarray),the first list corresponding to the repetition, and the second isthe actual boolean measurement results (ordered by the qubits actedthe measurement gate.)-
repetitions¶
The number of times a circuit was sampled to get theseresults.-
__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, fold_func, …)Counts the number of times a measurement result occurred. multi_measurement_histogram(*, keys, …)Counts the number of times combined measurement results occurred. -