Skip to content

Commit

Permalink
improve code for printing pulse names on reports
Browse files Browse the repository at this point in the history
  • Loading branch information
ElStabilini committed Nov 30, 2024
1 parent 17ba606 commit 7b907ae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
6 changes: 1 addition & 5 deletions src/qibocal/protocols/rabi/amplitude_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,7 @@ def _plot(
row=1,
col=1,
)

if data.rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if data.rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down
5 changes: 1 addition & 4 deletions src/qibocal/protocols/rabi/amplitude_frequency_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,7 @@ def _plot(
row=1,
col=2,
)
if data.rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if data.rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down
5 changes: 1 addition & 4 deletions src/qibocal/protocols/rabi/length_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ def _plot(
row=1,
col=1,
)
if data.rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if data.rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down
5 changes: 1 addition & 4 deletions src/qibocal/protocols/rabi/length_frequency_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,7 @@ def _plot(
row=1,
col=2,
)
if data.rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if data.rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down
10 changes: 2 additions & 8 deletions src/qibocal/protocols/rabi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ def plot(data, qubit, fit, rx90):
row=1,
col=1,
)
if rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down Expand Up @@ -169,10 +166,7 @@ def plot_probabilities(data, qubit, fit, rx90):
marker_color="rgb(255, 130, 67)",
),
)
if rx90:
pulse_name = "Pi-half pulse"
else:
pulse_name = "Pi pulse"
pulse_name = "Pi-half pulse" if rx90 else "Pi pulse"

fitting_report = table_html(
table_dict(
Expand Down

0 comments on commit 7b907ae

Please sign in to comment.