Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSarlle committed Jan 15, 2024
1 parent f4ff7da commit 1adce17
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def _plot(data: ResonatorTWPAFrequencyData, fit: ResonatorTWPAFrequencyResults,
),
)

fitting_report = ""
qubit_data = data[qubit]
resonator_frequencies = qubit_data.freq * HZ_TO_GHZ
twpa_frequencies = qubit_data.twpa_freq
Expand Down Expand Up @@ -246,32 +247,33 @@ def _plot(data: ResonatorTWPAFrequencyData, fit: ResonatorTWPAFrequencyResults,
fig.update_xaxes(title_text=f"{qubit}: Frequency [Hz]", row=1, col=2)
fig.update_yaxes(title_text="TWPA Frequency", row=1, col=2)

if qubit in fit.bare_frequency:
summary = table_dict(
qubit,
[
"High Power Resonator Frequency [Hz]",
"TWPA Frequency [Hz]",
],
[
np.round(fit.bare_frequency[qubit]),
np.round(fit.twpa_frequency[qubit]),
],
)
else:
summary = table_dict(
qubit,
[
"Low Power Resonator Frequency [Hz]",
"TWPA Frequency [Hz]",
],
[
np.round(fit.frequency[qubit]),
np.round(fit.twpa_frequency[qubit]),
],
)
if fit is not None:
if qubit in fit.bare_frequency:
summary = table_dict(
qubit,
[
"High Power Resonator Frequency [Hz]",
"TWPA Frequency [Hz]",
],
[
np.round(fit.bare_frequency[qubit]),
np.round(fit.twpa_frequency[qubit]),
],
)
else:
summary = table_dict(
qubit,
[
"Low Power Resonator Frequency [Hz]",
"TWPA Frequency [Hz]",
],
[
np.round(fit.frequency[qubit]),
np.round(fit.twpa_frequency[qubit]),
],
)

fitting_report = table_html(summary)
fitting_report = table_html(summary)

fig.update_layout(
showlegend=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def _plot(data: ResonatorTWPAPowerData, fit: ResonatorTWPAPowerResults, qubit):
),
)

fitting_report = ""
qubit_data = data[qubit]
frequencies = qubit_data.freq * HZ_TO_GHZ
powers = qubit_data.twpa_pow
Expand Down Expand Up @@ -240,32 +241,33 @@ def _plot(data: ResonatorTWPAPowerData, fit: ResonatorTWPAPowerResults, qubit):
fig.update_xaxes(title_text=f"{qubit}: Frequency [Hz]", row=1, col=2)
fig.update_yaxes(title_text="TWPA Power", row=1, col=2)

if qubit in fit.bare_frequency:
summary = table_dict(
qubit,
[
"High Power Resonator Frequency [Hz]",
"TWPA Power",
],
[
np.round(fit.bare_frequency[qubit]),
np.round(fit.twpa_power[qubit]),
],
)
else:
summary = table_dict(
qubit,
[
"Low Power Resonator Frequency [Hz]",
"TWPA Power",
],
[
np.round(fit.frequency[qubit]),
np.round(fit.twpa_power[qubit]),
],
)
if fit is not None:
if qubit in fit.bare_frequency:
summary = table_dict(
qubit,
[
"High Power Resonator Frequency [Hz]",
"TWPA Power",
],
[
np.round(fit.bare_frequency[qubit]),
np.round(fit.twpa_power[qubit]),
],
)
else:
summary = table_dict(
qubit,
[
"Low Power Resonator Frequency [Hz]",
"TWPA Power",
],
[
np.round(fit.frequency[qubit]),
np.round(fit.twpa_power[qubit]),
],
)

fitting_report = table_html(summary)
fitting_report = table_html(summary)

fig.update_layout(
showlegend=False,
Expand Down

0 comments on commit 1adce17

Please sign in to comment.