Skip to content

Commit

Permalink
Minor fix for plots in doc
Browse files Browse the repository at this point in the history
They were not caught because they are plotting code and plotting was not included in the doctest.
  • Loading branch information
BoxiLi committed Nov 24, 2021
1 parent 60fe50e commit 27671db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/source/qip-processor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,16 @@ The second example demonstrates a biased Gaussian noise on the pulse amplitude.
processor.add_noise(gaussnoise)

# Plot the ideal pulse
fig1, axis1 = processor.plot_pulses(title="Original control amplitude", figsize=(5,3))
fig1, axis1 = processor.plot_pulses(
title="Original control amplitude", figsize=(5,3),
use_control_latex=False)

# Plot the noisy pulse
qobjevo, _ = processor.get_qobjevo(noisy=True)
noisy_coeff = qobjevo.to_list()[1][1] + qobjevo.to_list()[2][1]
fig2, axis2 = processor.plot_pulses(title="Noisy control amplitude", figsize=(5,3))
fig2, axis2 = processor.plot_pulses(
title="Noisy control amplitude", figsize=(5,3),
use_control_latex=False)
axis2[0].step(qobjevo.tlist, noisy_coeff)


Expand Down

0 comments on commit 27671db

Please sign in to comment.