qiskit/releasenotes/notes/0.11/ignore-framechange-draw-arg...

30 lines
1.1 KiB
YAML

---
features:
- |
A new kwarg parameter, ``show_framechange_channels`` to optionally disable
displaying channels with only framechange instructions in pulse
visualizations was added to the ``qiskit.visualization.pulse_drawer()``
function and ``qiskit.pulse.Schedule.draw()`` method. When this new kwarg
is set to ``False`` the output pulse schedule visualization will not
include any channels that only include frame changes.
For example:
.. code-block:: python
from qiskit.pulse import *
from qiskit.pulse import pulse_lib
gp0 = pulse_lib.gaussian(duration=20, amp=1.0, sigma=1.0)
sched = Schedule()
channel_a = DriveChannel(0)
channel_b = DriveChannel(1)
sched = sched.append(gp0(channel_a))
sched = sched.insert(60, FrameChange(phase=-1.57)(channel_a))
sched = sched.insert(0, PersistentValue(value=0.2 + 0.4j)(
channel_a))
sched = sched.insert(30, FrameChange(phase=-1.50)(channel_b))
sched = sched.insert(70, FrameChange(phase=1.50)(channel_b))
sched.draw(show_framechange_channels=False)