qib.backend.experiment.ExperimentResults

class qib.backend.experiment.ExperimentResults[source]

Bases: ABC

Parent class for a quantum experiment results.

The results of a quantum experiment performed on a given quantum processor.

Methods

from_json

Initialize an experiment results object from a JSON dictionary.

get_counts

Returns the measured counts of the experiment

Attributes

runtime

Returns the runtime of the experiment in ns (i.e. how long it took for the experiment to run on the given backend).

abstract from_json(json: dict) ExperimentResults[source]

Initialize an experiment results object from a JSON dictionary.

abstract get_counts(binary: bool) dict[source]

Returns the measured counts of the experiment

Parameters:

binary (bool) – If True, returns the counts states in binary string format

Returns:

A dictionary of states and their respective counts

Return type:

dict

abstract property runtime: float

Returns the runtime of the experiment in ns (i.e. how long it took for the experiment to run on the given backend)