qbraid.runtime.GateModelResultData

class GateModelResultData(measurement_counts=None, measurements=None, **kwargs)[source]

Class for storing and accessing the results of a gate model quantum job.

Create a new GateModelResult instance.

__init__(measurement_counts=None, measurements=None, **kwargs)[source]

Create a new GateModelResult instance.

Methods

__init__([measurement_counts, measurements])

Create a new GateModelResult instance.

from_dict(data)

Creates a new GateModelResult instance from a dictionary.

from_object(model, **kwargs)

Creates a new GateModelResultData instance from a GateModelExperimentMetadata object.

get_counts([include_zero_values, decimal])

Returns the histogram data of the run with optional zero values and binary/decimal keys.

get_probabilities([include_zero_values, decimal])

Returns the probabilities of the measurement outcomes based on counts.

to_dict()

Converts the GateModelResulData instance to a dictionary.

Attributes

experiment_type

Returns the experiment type.

measurement_counts

Returns the histogram data of the run as passed in the constructor.

measurements

Returns the measurements data of the run.