From a23d7ae81e90ee0ce5e870906d42d373d91ad995 Mon Sep 17 00:00:00 2001 From: Edoardo-Pedicillo Date: Thu, 23 Jan 2025 15:46:20 +0400 Subject: [PATCH] fix: mismatch freq and biases --- .../protocols/flux_dependence/qubit_flux_dependence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py index e2a464285..1cebfaeea 100644 --- a/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/qubit_flux_dependence.py @@ -218,12 +218,12 @@ 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_freq = np.median(frequencies) + middle_bias = np.median(biases) # solution to x*popt[1] + popt[2] = k # such that x is close to 0 # to avoid errors due to periodicity sweetspot[qubit] = ( - np.round(popt[1] * middle_freq + popt[2]) - popt[2] + np.round(popt[1] * middle_bias + popt[2]) - popt[2] ) / popt[1] matrix_element[qubit] = popt[1] except ValueError as e: