deltakit.explorer.analysis.get_lambda_fit#
- deltakit.explorer.analysis.get_lambda_fit(distances: list[int], lep_per_round: list[float], lep_stddev_per_round: list[float]) ndarray[tuple[Any, ...], dtype[float64]]#
Get the best fit line with gradient lambda for plotting purposes.
Accepts the logical error probability (LEP) per round, which may be approximated as LEP / num_rounds (for small LEP), and equally for lep_stddev.
- Parameters:
distances (List[int]) – The distances of the code.
lep_per_round (List[float]) – The logical error probabilities per round.
lep_stddev_per_round (List[float]) – The standard deviation of the logical error probabilities per round.
- Returns:
The best fit line of log(lep_per_round) vs distance, from which the gradient is lambda.
- Return type:
npt.NDArray
Examples
Fit exponential curve given logical error probability for 5, 7, and 9 rounds of QEC experiment:
lep_per_round_fit = Analysis.get_lambda_fit( distances=[5, 7, 9], lep_per_round=[1.992e-04, 4.314e-05, 7.556e-06], lep_stddev_per_round=[1.2e-05, 9.3e-06, 3.9e-06], )