iqm.benchmarks.benchmark_definition.add_counts_to_dataset

iqm.benchmarks.benchmark_definition.add_counts_to_dataset#

iqm.benchmarks.benchmark_definition.add_counts_to_dataset(counts: list[dict[str, int]], identifier: str, dataset: Dataset) Dataset#

Adds the counts from a cortex job result to the given dataset.

If counts with the same identifier are already present in the old dataset, then both counts are added together.

Parameters:
  • counts (list[dict[str, int]]) – A list of dictionaries with counts of bitstrings.

  • identifier (str) – A string to identify the current data, for instance the qubit layout.

  • dataset (Dataset) – Dataset to add results to.

Returns:

A merged dataset where the new counts are added the input dataset

Return type:

Dataset