diff --git a/pulser-core/pulser/sequence/_seq_drawer.py b/pulser-core/pulser/sequence/_seq_drawer.py index 6b922462d..15fe1880a 100644 --- a/pulser-core/pulser/sequence/_seq_drawer.py +++ b/pulser-core/pulser/sequence/_seq_drawer.py @@ -540,8 +540,7 @@ def _draw_channel_content( the solver. If present, plots the effective pulse alongside the input pulse. draw_phase_area: Whether phase and area values need to be shown - as text on the plot, defaults to False. If `draw_phase_curve=True`, - phase values are ommited. + as text on the plot, defaults to False. draw_phase_shifts: Whether phase shift and reference information should be added to the plot, defaults to False. draw_input: Draws the programmed pulses on the channels, defaults @@ -732,10 +731,6 @@ def phase_str(phi: Any) -> str: if draw_phase_area: top = False # Variable to track position of box, top or center. - print_phase = not draw_phase_curve and any( - np.any(ch_data.samples.phase[slot.ti : slot.tf] != 0) - for slot in ch_data.samples.slots - ) for slot in ch_data.samples.slots: if sampling_rate: @@ -767,11 +762,8 @@ def phase_str(phi: Any) -> str: if round(area_val, 2) == 1 else rf"A: {float(area_val):.2g}$\pi$" ) - if not print_phase: - txt = area_fmt - else: - phase_fmt = rf"$\phi$: {phase_str(phase_val)}" - txt = "\n".join([phase_fmt, area_fmt]) + phase_fmt = rf"$\phi$: {phase_str(phase_val)}" + txt = "\n".join([phase_fmt, area_fmt]) axes[0].text( x_plot, y_plot, @@ -1246,7 +1238,7 @@ def draw_samples( sampling_rate: Optional[float] = None, draw_phase_area: bool = False, draw_phase_shifts: bool = False, - draw_phase_curve: bool = False, + draw_phase_curve: bool = True, draw_detuning_maps: bool = False, draw_qubit_amp: bool = False, draw_qubit_det: bool = False, @@ -1263,8 +1255,7 @@ def draw_samples( the solver. If present, plots the effective pulse alongside the input pulse. draw_phase_area: Whether phase and area values need to be shown - as text on the plot, defaults to False. If `draw_phase_curve=True`, - phase values are ommited. + as text on the plot, defaults to False. draw_phase_shifts: Whether phase shift and reference information should be added to the plot, defaults to False. draw_phase_curve: Draws the changes in phase in its own curve (ignored @@ -1322,7 +1313,7 @@ def draw_sequence( draw_register: bool = False, draw_input: bool = True, draw_modulation: bool = False, - draw_phase_curve: bool = False, + draw_phase_curve: bool = True, draw_detuning_maps: bool = False, draw_qubit_amp: bool = False, draw_qubit_det: bool = False, @@ -1336,8 +1327,7 @@ def draw_sequence( the solver. If present, plots the effective pulse alongside the input pulse. draw_phase_area: Whether phase and area values need to be shown - as text on the plot, defaults to False. If `draw_phase_curve=True`, - phase values are ommited. + as text on the plot, defaults to False. draw_interp_pts: When the sequence has pulses with waveforms of type InterpolatedWaveform, draws the points of interpolation on top of the respective waveforms (defaults to True). diff --git a/pulser-core/pulser/sequence/sequence.py b/pulser-core/pulser/sequence/sequence.py index 50daadbcc..6287dbd8b 100644 --- a/pulser-core/pulser/sequence/sequence.py +++ b/pulser-core/pulser/sequence/sequence.py @@ -1734,7 +1734,7 @@ def draw( draw_interp_pts: bool = True, draw_phase_shifts: bool = False, draw_register: bool = False, - draw_phase_curve: bool = False, + draw_phase_curve: bool = True, draw_detuning_maps: bool = False, draw_qubit_amp: bool = False, draw_qubit_det: bool = False, @@ -1754,8 +1754,7 @@ def draw( offsets, displays the equivalent phase modulation. draw_phase_area: Whether phase and area values need to be shown as text on the plot, defaults to False. Doesn't work in - 'output' mode. If `draw_phase_curve=True`, phase values are - ommited. + 'output' mode. draw_interp_pts: When the sequence has pulses with waveforms of type InterpolatedWaveform, draws the points of interpolation on top of the respective input waveforms (defaults to True). diff --git a/tutorials/advanced_features/Output Modulation and EOM Mode.ipynb b/tutorials/advanced_features/Output Modulation and EOM Mode.ipynb index 071fde63b..944598fb6 100644 --- a/tutorials/advanced_features/Output Modulation and EOM Mode.ipynb +++ b/tutorials/advanced_features/Output Modulation and EOM Mode.ipynb @@ -287,7 +287,7 @@ "seq.disable_eom_mode(\"rydberg\")\n", "seq.add(Pulse.ConstantPulse(100, 1, 0, 0), \"rydberg\")\n", "\n", - "seq.draw(draw_phase_curve=True)" + "seq.draw()" ] }, {