diff --git a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py index c3b3dd913..37a296df0 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py @@ -223,7 +223,7 @@ def fit_function(x, w_max, normalization, offset): "charging_energy": data.charging_energy[qubit] * HZ_TO_GHZ, } frequency[qubit] = popt[0] * GHZ_TO_HZ - middle_bias = np.median(biases) + middle_bias = (np.max(biases) + np.min(biases)) / 2 sweetspot[qubit] = ( np.round(popt[1] * middle_bias + popt[2]) - popt[2] ) / popt[1]