iqm.benchmarks.utils.xrvariable_to_counts

iqm.benchmarks.utils.xrvariable_to_counts#

iqm.benchmarks.utils.xrvariable_to_counts(dataset: Dataset, identifier: str, counts_range: int) List[Dict[str, int]]#

Retrieve counts from xarray dataset.

Parameters:
  • dataset (xr.Dataset) – the dataset to extract counts from.

  • identifier (str) – the identifier for the dataset counts.

  • counts_range (int) – the range of counts to extract (e.g., the amount of circuits that were executed).

Returns:

A list of counts dictionaries from the dataset.

Return type:

List[Dict[str, int]]