Skip to content

Commit

Permalink
Merge pull request #642 from qiboteam/fix_punchout
Browse files Browse the repository at this point in the history
Fixing punchout plots
  • Loading branch information
andrea-pasquale authored Nov 24, 2023
2 parents e127bf5 + 9b2f204 commit 73ff1eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 10 additions & 6 deletions src/qibocal/protocols/characterization/resonator_punchout.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No
row=1,
col=1,
)
fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=1)
fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=2)
fig.update_yaxes(title_text="Amplitude [a.u.]", row=1, col=1)
fig.update_yaxes(title_text="Amplitude [a.u.]", row=1, col=2)

fig.add_trace(
go.Heatmap(
x=frequencies,
Expand All @@ -217,7 +214,7 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No
fig.add_trace(
go.Scatter(
x=[
fit.readout_frequency[qubit],
fit.readout_frequency[qubit] * HZ_TO_GHZ,
],
y=[
fit.readout_amplitude[qubit],
Expand All @@ -228,6 +225,8 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No
color="gray",
symbol="circle",
),
name="Estimated readout point",
showlegend=True,
)
)
fitting_report = table_html(
Expand All @@ -247,9 +246,14 @@ def _plot(data: ResonatorPunchoutData, qubit, fit: ResonatorPunchoutResults = No
)

fig.update_layout(
showlegend=False,
showlegend=True,
legend=dict(orientation="h"),
)

fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=1)
fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=2)
fig.update_yaxes(title_text="Amplitude [a.u.]", row=1, col=1)

figures.append(fig)

return figures, fitting_report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,12 @@ def _plot(
col=2,
)
fig.update_xaxes(title_text="Frequency [GHz]", row=1, col=2)
fig.update_yaxes(title_text="Attenuation [dB]", row=1, col=2)

if fit is not None:
fig.add_trace(
go.Scatter(
x=[
fit.readout_frequency[qubit],
fit.readout_frequency[qubit] * HZ_TO_GHZ,
],
y=[
fit.readout_attenuation[qubit],
Expand All @@ -226,6 +225,8 @@ def _plot(
color="gray",
symbol="circle",
),
name="Estimated readout point",
showlegend=True,
)
)
fitting_report = table_html(
Expand All @@ -244,7 +245,8 @@ def _plot(
)
)
fig.update_layout(
showlegend=False,
showlegend=True,
legend=dict(orientation="h"),
)

figures.append(fig)
Expand Down

0 comments on commit 73ff1eb

Please sign in to comment.