mqt.problemsolver.resource_estimation.error_budget_optimization.generate_data

Module Contents

logger
QISKIT_STD_GATES = ['p', 'x', 'y', 'z', 'h', 's', 'sdg', 't', 'tdg', 'sx', 'rx', 'ry', 'rz', 'cx', 'cy', 'cz',...
generate_data(total_error_budget: float, number_of_randomly_generated_distributions: int, path: str | Path | None = None, benchmarks_and_sizes: list[tuple[str, list[int]]] | None = None, logical_counts: list[OrderedDict[str, int]] | None = None) → list[OrderedDict[str, float | int]][source]

Generates a dataset consisting of logical counts of quantum circuits and respective optimized error budgets.

This function searches for QASM files in the given directory, loads each circuit, estimates its logical counts, and computes optimized error budget partitions using random sampling. For each circuit, it collects relevant counts and the optimal error budget distribution, appending the results to a list.

Parameters:
  • total_error_budget – The total error budget to be distributed among error types.

  • number_of_randomly_generated_distributions – The number of random distributions to try.

  • path – Path to a directory with .qasm files or a .zip file containing them.

  • benchmarks_and_sizes – A list of benchmark specifications to generate circuits on the fly.

  • logical_counts – A list of logical counts dictionaries to process directly.

Returns:

A list of lists, where each inner list contains circuit-specific counts and the corresponding optimized error budget partition.