Skip to content

Commit

Permalink
fix: Rabi 2D fit working
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Oct 2, 2024
1 parent c77f563 commit 3377b87
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 3377b87

Please sign in to comment.