diff --git a/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py b/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py index 8933f796b..44046c8b1 100644 --- a/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py +++ b/src/qibocal/protocols/flux_dependence/resonator_crosstalk.py @@ -311,7 +311,7 @@ def fit_function(x, crosstalk_element, offset): crosstalk_matrix[target_qubit][flux_qubit] = ( popt[0] * data.matrix_element[target_qubit] ) - except ValueError as e: + except (ValueError, RuntimeError) as e: log.error( f"Off-diagonal flux fit failed for qubit {flux_qubit} due to {e}." ) diff --git a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py index 415a15238..e8ad497a8 100644 --- a/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py +++ b/src/qibocal/protocols/flux_dependence/resonator_flux_dependence.py @@ -204,6 +204,7 @@ def fit_function(x, g, resonator_freq): ), maxfev=100000, ) + fitted_parameters[qubit] = { "w_max": data.qubit_frequency[qubit] * HZ_TO_GHZ, "xj": 0, @@ -217,7 +218,7 @@ def fit_function(x, g, resonator_freq): } sweetspot = -data.offset[qubit] / data.matrix_element[qubit] resonator_freq[qubit] = fit_function(sweetspot, *popt) * GHZ_TO_HZ - coupling[qubit] = popt[0] + coupling[qubit] = popt[0] * GHZ_TO_HZ bare_resonator_freq[qubit] = popt[1] * GHZ_TO_HZ except ValueError as e: log.error( @@ -226,7 +227,6 @@ def fit_function(x, g, resonator_freq): "Lowering the value of `threshold` in `extract_*_feature`" "should fix the problem." ) - return ResonatorFluxResults( resonator_freq=resonator_freq, bare_resonator_freq=bare_resonator_freq, @@ -268,7 +268,6 @@ def _plot(data: ResonatorFluxData, fit: ResonatorFluxResults, target: QubitId): def _update(results: ResonatorFluxResults, platform: Platform, qubit: QubitId): - pass update.bare_resonator_frequency(results.bare_resonator_freq[qubit], platform, qubit) update.readout_frequency(results.resonator_freq[qubit], platform, qubit) update.coupling(results.coupling[qubit], platform, qubit)