iqm.benchmarks.utils.bootstrap_counts

iqm.benchmarks.utils.bootstrap_counts#

iqm.benchmarks.utils.bootstrap_counts(original_counts: Dict[str, int], num_bootstrap_samples: int = 100, rgen: Generator | None = None, include_original_counts: bool = False) List[Dict[str, int]]#

Returns num_bootstrap_samples resampled copies of the original_counts.

Parameters:
  • original_counts (Dict[str, int]) – The original dictionary of counts to bootstrap from.

  • num_bootstrap_samples (int) – The number of bootstrapping samples to generate. * Default is 100.

  • rgen (Optional[Generator]) – The random number generator. * Default is None: assigns numpy’s default_rng().

  • include_original_counts (bool) – Whether to include the original counts in the returned bootstrapped count samples. * Default is False.

Returns:

A list of bootstrapped counts.

Return type:

List[Dict[str, int]]