MeasurementResult

class qililab.result.MeasurementResult(bus, shape=None)

Bases: ABC

Abstract base class for storing and accessing QProgram measurement results.

This class defines the interface for a measurement result from the execution of a QProgram. It provides methods to access both the raw measured data and the thresholded (classified) version of that data.

Subclasses must implement the array and threshold properties to define how raw and thresholded data are accessed or computed.

name

Enum identifier for the result type.

Type:

ResultName

bus

Name of the readout bus associated with the result.

Type:

str

shape

Optional shape of the result data. Used for reshaping or validation.

Type:

tuple | None

Methods

Attributes

array

Returns the results in a numpy array format.

threshold

Returns the thresholded data for the result.

name

abstract property array

Returns the results in a numpy array format.

Returns:

Numpy array containing the results.

Return type:

np.ndarray

abstract property threshold

Returns the thresholded data for the result.

Returns:

Thresholded data for the result.

Return type:

np.ndarray