Skip to content

Commit

Permalink
Merge pull request #997 from qiboteam/fix_rabi_2D_fit
Browse files Browse the repository at this point in the history
Fix bug in rabi 2D fit
  • Loading branch information
Edoardo-Pedicillo authored Oct 7, 2024
2 parents c77f563 + 3377b87 commit 2a7062c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/qibocal/protocols/rabi/amplitude_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _fit(data: RabiAmplitudeFreqData) -> RabiAmplitudeFrequencyResults:
x = (amps - x_min) / (x_max - x_min)
y = (y - y_min) / (y_max - y_min)

period = fallback_period(guess_period(amps, y))
period = fallback_period(guess_period(x, y))
pguess = [0.5, 0.5, period, 0]

try:
Expand Down
2 changes: 1 addition & 1 deletion src/qibocal/protocols/rabi/amplitude_frequency_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _fit(data: RabiAmplitudeFreqSignalData) -> RabiAmplitudeFrequencySignalResul
x = (amps - x_min) / (x_max - x_min)
y = (y - y_min) / (y_max - y_min)

period = fallback_period(guess_period(amps, y))
period = fallback_period(guess_period(x, y))
pguess = [0.5, 0.5, period, 0]

try:
Expand Down
2 changes: 1 addition & 1 deletion src/qibocal/protocols/rabi/length_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _fit(data: RabiLengthFreqData) -> RabiLengthFrequencyResults:
x = (durations - x_min) / (x_max - x_min)
y = (y - y_min) / (y_max - y_min)

period = fallback_period(guess_period(durations, y))
period = fallback_period(guess_period(x, y))
pguess = [0, np.sign(y[0]) * 0.5, period, 0, 0]

try:
Expand Down
2 changes: 1 addition & 1 deletion src/qibocal/protocols/rabi/length_frequency_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def _fit(data: RabiLengthFreqSignalData) -> RabiLengthFrequencySignalResults:
x = (durations - x_min) / (x_max - x_min)
y = (y - y_min) / (y_max - y_min)

period = fallback_period(guess_period(durations, y))
period = fallback_period(guess_period(x, y))
pguess = [0, np.sign(y[0]) * 0.5, period, 0, 0]

try:
Expand Down

0 comments on commit 2a7062c

Please sign in to comment.