deltakit.explorer.analysis.get_exp_fit#
- deltakit.explorer.analysis.get_exp_fit(logical_fails_all_rounds: ndarray[tuple[Any, ...], dtype[int64]] | list[int], shots_all_rounds: ndarray[tuple[Any, ...], dtype[int64]] | list[int], all_rounds: list[int], interpolation_points: int = 26) tuple[float, ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]]#
Implement logical error probability per round fit as described in https://arxiv.org/pdf/2310.05900.pdf (p.40) and https://arxiv.org/pdf/2207.06431.pdf (p.21). The first round (r=0) data points are excluded as the error suppression is stronger there than in consecutive rounds.
- Parameters:
logical_fails_all_rounds (npt.NDArray | List[int]) – Number of logical failures per round of experiment.
shots_all_rounds (npt.NDArray | List[int]) – Number of shots per round of experiment.
all_rounds (List[int]) – The number of rounds corresponding to each data point, e.g. [1, 2, 4, 8, 16].
interpolation_points – int How many points to use in the interpolated plot. Default is 26.
- Returns:
A tuple consisting of - an epsilon parameter value (error probability per round); - an interpolated graph (2 value), computed with this value; - error bars value.
- Return type:
Tuple[float, npt.NDArray, npt.NDArray, npt.NDArray]
Examples
Calling the method:
eps, x, y, yerr = Analysis.get_exp_fit( logical_fails_all_rounds=[20, 20, 30, 40, 50], shots_all_rounds=[500, 500, 500, 500, 500], all_rounds=[1, 3, 5, 7, 9], interpolation_points=25 + 1, )