Skip to content

request: automatically find bounds in error-budgeting #216

Description

@nelimee

Motivation

At the moment, users are expected to provide sensible bounds for the noise parameters when doing error budgeting. See for example the presentation of the error budgeting feature on the Deltakit website:

from deltakit.explorer.analysis.error_budget import get_error_budget, SamplingParameters

# Among other things, the bounds for each noise parameters of the noise model
# are a required input.
bounds: list[tuple[float, float]] = [(1e-3, 2e-2)]
results = get_error_budget(
    simple_noise_model, P, num_rounds_per_distance, bounds,
    sampling_parameters=SamplingParameters(max_shots=500_000)
)

These bounds are used in error-budgeting to:

  1. Discretise the interval formed by each bounds using a DiscretisationStrategy.
  2. Compute $\Lambda$ and its standard deviation $\sigma_\Lambda$ on each of the points obtained in step 1.
  3. Fit a degree $d \geqslant 1$ polynomial to the (noisy) points computed in step 2.
  4. Compute the gradient of that degree $d$ polynomial at the point we are interested in (for the moment $\vec{p}$ or $\frac{\vec{p}}{2}$).

Ideally, this should be optional, with an automatic exploration triggering if the bounds are not provided by the user.

Proposed solution

Add a function to deltakit_explorer.analysis.error_budget to automatically compute bounds that make sense for each noise parameter for $\Lambda$ computation.

These bounds should be chosen such that:

  1. the value of $\Lambda$ sufficiently changes when changing a single parameter of the noise model within the allowed bounds for that parameter and,
  2. the resulting logical error probability is not too small or too high.

Point 1 here ensures that we are not restricting too much the values of $\Lambda$ with the bounds and that our gradient estimation will not be mostly noise due to sampling.

Point 2 ensures that we can compute $\Lambda$ using Monte-Carlo simulations without having to use billions of shots to see one error.

This new function could for example start with a small pre-defined initial step around the value of interest (e.g., $[p - \epsilon, p + \epsilon]$) and then exponentially grow $\epsilon$ to see if the estimated $\Lambda$ values are different enough (note that this generates values for $\Lambda$ which might then be used as a basis for fitting a polynomial, but these points will likely be pretty bad for polynomial fitting because they are quite far away from the Chebyshev nodes which are ideal for fitting).

Potential alternatives

Any other alternative is welcomed.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions