Skip to main content
IBM Quantum Platform

qiskit_noise_learning.data.AggregatedObservableData

class qiskit_noise_learning.data.AggregatedObservableData(dataset: Dataset)

GitHub

Bases: LeveledData

Per-path estimates obtained by aggregating ObservableData.

This class holds a single estimate per observable, obtained by collapsing the per-randomization structure of ObservableData. Each observable estimate is labelled by an unbound path and a corresponding fragment depth. A non-negative fragment depth corresponds to labelling by a bound path with that depth, and a fragment depth of -1 signals that the estimate corresponds to a genuinely unbound path. For a non-negative fragment depth, the estimate value corresponds to the product of all fidelities in the path, and the estimate for a fragment depth of -1 corresponds to the product of the fidelities in the repeatable fragment.

  • Data variables:

    • estimate_values: A 1d float array of per-observable estimates, with dimensions ("observable",).
    • estimate_std: A 1d array of standard deviations for the estimates, with dimensions ("observable",).
    • time_lbs: A lower bound on the data collection for each observable, with dimensions ("observable",).
    • time_ubs: An upper bound on the data collection for each observable, with dimensions ("observable",).
    • metadata: A 1d object array of any additional per-observable data, with dimensions ("observable",).
  • Coordinates:

    • unbound_path: A 1d array of unbound Path instances labelling each observable, with dimensions ("observable",).
    • fragment_depth: A 1d array of type int specifying the fragment depth associated to the observable. A value of -1 indicates an estimate of only the repeatable_fragment of the path.

Parameters

dataset – A Dataset with the above formatting.

__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(unbound_paths, fragment_depths, ...)Instantiate from data specified as arrays in standard containers.
merge(other)Merge the data from self and other into a single instance.

Attributes

Column 1
Column 2
datasetThe aggregated observable data set.

dataset

Type: Dataset

The aggregated observable data set.

from_arrays

classmethod from_arrays(unbound_paths: list[Path], fragment_depths: list[int], estimate_values: ndarray[float], estimate_std: ndarray[float], time_lbs: ndarray[datetime64], time_ubs: ndarray[datetime64], metadata: ndarray[object] | None = None) → Self

Instantiate from data specified as arrays in standard containers.

Parameters

  • unbound_paths – A list of unbound paths (with fragment_depth=None).
  • fragment_depths – A list of fragment depths, with -1 indicating the corresponding estimate is in reference to only the repeatable fragment of the corresponding path.
  • estimate_values – A 1d array of per-observable estimates.
  • estimate_std – A 1d array of standard deviations.
  • time_lbs – A 1d array of time lower bounds.
  • time_ubs – A 1d array of time upper bounds.
  • metadata – Any additional data associated with a given observable.

merge

merge(other: Self) → Self

Merge the data from self and other into a single instance.

Parameters

other – The other data.

Returns

A new instance containing both data sets.

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.