Skip to main content
IBM Quantum Platform

qiskit_noise_learning.data.ModelData

class qiskit_noise_learning.data.ModelData(dataset: Dataset)

GitHub

Bases: LeveledData, Generic[ParameterIndex]

Results from fitting, backed by an xarray Dataset.

The dataset has data variables:

  • parameter_values: 1D array with dimension parameter_index.
  • covariance: 2D array with dimensions (parameter_row_index, parameter_col_index).

The parameter_index, parameter_row_index, and parameter_col_index coordinates all share the same parameter labels. Additional fit metadata is stored in dataset attrs.

__init__

__init__(dataset: Dataset)


Methods

Column 1
Column 2
__init__(dataset)
filter_time(lb, ub)Filter to data gathered within the time bounds.
from_arrays(parameter_indices, ...[, metadata])Instantiate from data specified as arrays in standard containers.

Attributes

Column 1
Column 2
dataset
metadataMetadata describing the model parameter fit.

from_arrays

classmethod from_arrays(parameter_indices: list[ParameterIndex], parameter_values: ndarray[float64], covariance: ndarray[float64], time_lbs: ndarray[datetime64], time_ubs: ndarray[datetime64], metadata: dict[str, Any] | None = None) → Self

Instantiate from data specified as arrays in standard containers.

Parameters

  • parameter_indices – A list of ParameterIndex instances.
  • parameter_values – A 1d array of floats indicating parameter values.
  • covariance – A 2d array of floats indicating the covariances of the parameter values.
  • time_lbs – A 1d array of data acquisition time lower bounds for each parameter estimate.
  • time_ubs – A 1d array of data acquisition time upper bounds for each parameter estimate.
  • metadata – Any metadata to attach to the dataset.

metadata

Type: dict[str, Any]

Metadata describing the model parameter fit.

filter_time

filter_time(lb: datetime64, ub: datetime64) → Self

Filter to data gathered within the time bounds.

Parameters

  • lb – The time lower bound (inclusive).
  • ub – The time upper bound (inclusive).

Returns

The time filtered version of self.

Was this page helpful?
Report a bug, typo, or request content on GitHub.