Skip to content

Commit

Permalink
fix: move the fit curve in the fit branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Jan 16, 2025
1 parent 8d6e59c commit 1e1b70d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/qibocal/protocols/xyz_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,6 @@ def _plot(data: XYZTimingData, target: QubitId, fit: XYZTimingResults = None):
legendgroup="Probability of State 1",
mode="lines",
),
go.Scatter(
x=x,
y=fit_function(x, *fit.fitted_parameters[target]),
opacity=1,
name="Fit",
showlegend=True,
legendgroup="Probability of State 0",
mode="lines",
),
go.Scatter(
x=np.concatenate((x, x[::-1])),
y=np.concatenate((probs + error_bars, (probs - error_bars)[::-1])),
Expand All @@ -217,6 +208,17 @@ def _plot(data: XYZTimingData, target: QubitId, fit: XYZTimingResults = None):
]
)
if fit is not None:
fig.add_trace(
go.Scatter(
x=x,
y=fit_function(x, *fit.fitted_parameters[target]),
opacity=1,
name="Fit",
showlegend=True,
legendgroup="Probability of State 0",
mode="lines",
),
)
fig.add_vline(
x=fit.delays[target][0],
line=dict(color="grey", width=3, dash="dash"),
Expand Down

0 comments on commit 1e1b70d

Please sign in to comment.