Skip to content

Commit

Permalink
fix: mismatch freq and biases
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Jan 23, 2025
1 parent 12bcfea commit a23d7ae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a23d7ae

Please sign in to comment.