Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate the sweetspot closest to the center of bias interval #1068

Merged
merged 8 commits into from
Jan 24, 2025
Prev Previous commit
Next Next commit
feat: plot sweetspot
Edoardo-Pedicillo committed Jan 23, 2025
commit bce5dfb9881ed39e8ec0d27395c80569baa51d43
Original file line number Diff line number Diff line change
@@ -257,6 +257,7 @@ def _plot(data: QubitFluxData, fit: QubitFluxResults, target: QubitId):
fit_function=utils.transmon_frequency,
)
if fit is not None:

fitting_report = table_html(
table_dict(
target,
20 changes: 20 additions & 0 deletions src/qibocal/protocols/flux_dependence/utils.py
Original file line number Diff line number Diff line change
@@ -71,6 +71,26 @@ def flux_dependence_plot(data, fit, qubit, fit_function=None):
row=1,
col=1,
)
fig.add_trace(
go.Scatter(
x=[
fit.frequency[qubit] * HZ_TO_GHZ,
Copy link
Contributor

@andrea-pasquale andrea-pasquale Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding attribute for resonator flux dependence is resonator_freq.
Either we change the name of the attribute in the corresponding resonator class or we need to add an if statement here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the first option, since having a resonator_freq attribute in ResonatoFluxResults is a bit redundant.

],
y=[
fit.sweetspot[qubit],
],
mode="markers",
marker=dict(
size=8,
color="black",
symbol="cross",
),
name=f"Sweetspot",
showlegend=True,
),
row=1,
col=1,
)

fig.update_xaxes(
title_text=f"Frequency [GHz]",