Skip to content

Commit

Permalink
fix frequency bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Oct 23, 2023
1 parent a9ce9ea commit e75bf5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qibocal/protocols/characterization/rabi/amplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _fit(data: RabiAmplitudeData) -> RabiAmplitudeResults:
index = local_maxima[0] if len(local_maxima) > 0 else None
# 0.5 hardcoded guess for less than one oscillation
f = x[index] / (x[1] - x[0]) if index is not None else 0.5
pguess = [0.5, 0.5, np.max(x) / f, np.pi / 2]
pguess = [0.5, 0.5, 1 / f, np.pi / 2]
try:
popt, perr = curve_fit(
utils.rabi_amplitude_fit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _fit(data: RabiAmplitudeVoltData) -> RabiAmplitudeVoltResults:
popt[2] * (x_max - x_min),
popt[3] - 2 * np.pi * x_min / (x_max - x_min) * popt[2],
]
pi_pulse_parameter = np.abs((1.0 / translated_popt[2]) / 2)
pi_pulse_parameter = np.abs((translated_popt[2]) / 2)

except:
log.warning("rabi_fit: the fitting was not succesful")
Expand Down

0 comments on commit e75bf5f

Please sign in to comment.