diff --git a/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py b/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py index 4a91d561e..259c1663f 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py +++ b/src/qibocal/protocols/characterization/flux_dependence/qubit_crosstalk.py @@ -251,18 +251,12 @@ def _fit(data: QubitCrosstalkData) -> QubitCrosstalkResults: for target_flux_qubit, qubit_data in data.data.items(): - if data.resonator_type == "3D": - frequencies, biases = utils.extract_min_feature( - qubit_data.freq, - qubit_data.bias, - qubit_data.signal, - ) - else: - frequencies, biases = utils.extract_max_feature( - qubit_data.freq, - qubit_data.bias, - qubit_data.signal, - ) + frequencies, biases = utils.extract_feature( + qubit_data.freq, + qubit_data.bias, + qubit_data.signal, + "max", + ) target_qubit, flux_qubit = target_flux_qubit if target_qubit != flux_qubit: diff --git a/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py b/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py index 9bb697a85..c6823fe02 100644 --- a/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py +++ b/src/qibocal/protocols/characterization/flux_dependence/resonator_crosstalk.py @@ -263,18 +263,9 @@ def _fit(data: ResCrosstalkData) -> ResCrosstalkResults: for target_flux_qubit, qubit_data in data.data.items(): target_qubit, flux_qubit = target_flux_qubit - if data.resonator_type == "3D": - frequencies, biases = utils.extract_max_feature( - qubit_data.freq, - qubit_data.bias, - qubit_data.signal, - ) - else: - frequencies, biases = utils.extract_min_feature( - qubit_data.freq, - qubit_data.bias, - qubit_data.signal, - ) + frequencies, biases = utils.extract_feature( + qubit_data.freq, qubit_data.bias, qubit_data.signal, "min" + ) if target_qubit != flux_qubit: # fit function needs to be defined here to pass correct parameters