Skip to content

Commit

Permalink
Merge pull request #998 from qiboteam/coupling_hz
Browse files Browse the repository at this point in the history
Minor fix in resonator flux dependence
  • Loading branch information
Edoardo-Pedicillo authored Oct 9, 2024
2 parents ed9fb0b + 8911e60 commit 6789ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand All @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6789ac8

Please sign in to comment.