CurveData#

class CurveData(*args, **kwargs)[source]#

A dataclass that manages the multiple arrays comprising the dataset for fitting.

This dataset can consist of X, Y values from multiple series. To extract curve data of the particular series, get_subset_of() can be used.

x#

X-values that experiment sweeps.

Type:

numpy.ndarray

y#

Y-values that observed and processed by the data processor.

Type:

numpy.ndarray

y_err#

Uncertainty of the Y-values which is created by the data processor. Usually this assumes standard error.

Type:

numpy.ndarray

shots#

Number of shots used in the experiment to obtain the Y-values.

Type:

numpy.ndarray

data_allocation#

List with identical size with other arrays. The value indicates the series index of the corresponding element. This is classified based upon the matching of SeriesDef.filter_kwargs with the circuit metadata of the corresponding data index. If metadata doesn’t match with any series definition, element is filled with -1.

Type:

numpy.ndarray

labels#

List of curve labels. The list index corresponds to the series index.

Type:

List[str]

Deprecated since version 0.6: The class qiskit_experiments.curve_analysis.curve_data.CurveData is deprecated as of qiskit-experiments 0.6. It will be removed after 0.7. CurveData is replaced by ScatterTable’s DataFrame representation.

Methods

get_subset_of(index)[source]#

Filter data by series name or index.

Parameters:

index (str | int) – Series index of name.

Returns:

A subset of data corresponding to a particular series.

Return type:

CurveData