mqt.problemsolver.resource_estimation.error_budget_optimization.evaluate

Module Contents

evaluate(x: numpy.typing.NDArray[numpy.float64], y: numpy.typing.NDArray[numpy.float64], total_budget: float) → list[float][source]

Evaluates the impact of different error budget partitions on quantum resource estimates.

Parameters:
  • x – A 2D array where each row contains quantum circuit logical counts (numQubits, tCount, rotationCount, etc.).

  • y – A 2D array where each row contains error budgets for logical, t_states, and rotations.

  • total_budget – The total error budget to be distributed among components.

Returns:

List of relative differences in the product of qubits and runtime compared to the default budget distribution.

plot_results(product_diffs: list[float], product_diffs_optimal: list[float], legend: bool = False, bin_width: int = 4) → None[source]

Plots histograms comparing predicted and optimal space-time differences.

This function visualizes the distribution of space-time differences (in percent) for predicted and optimal product distributions. It overlays two histograms for comparison and customizes axis ticks, labels, and legend.

Parameters:
  • product_diffs – List of space-time differences for predicted distributions.

  • product_diffs_optimal – List of space-time differences for best found distributions.

  • legend – Whether to display the legend on the plot. Defaults to False.

  • bin_width – Width of histogram bins. Defaults to 4.