Skip to content

Unify calling functions for pulse and circuit diagram plots (#397, QAE-905)

Explanation of changes

Make circuit_diagram_matplotlib and pulse_diagram_plotly private and deprecate them from the interface, so that calls to their corresponding aliases plot_circuit_diagram and plot_pulse_diagram become the only way to plot diagrams. Move visualization module to schedules/_visualization

Motivation of changes

Pulse and circuit diagrams of a schedule sched can be produced either by calling the visualization functions circuit_diagram_matplotlib(sched) and pulse_diagram_plotly(sched), or by calling the methods sched.plot_circuit_diagram() and sched.plot_pulse_diagram() of the schedule class. Since the schedule methods are aliases for calling visualization functions, it makes sense to unify the calls and use a single function for each of type of plot (i.e. pulse and circuit). In addition, visualization is an aid for constructing schedules, so it is more logical that Quantify's visualization options are a few straightforward methods of the ScheduleBase


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer.
  • New code is covered by unit tests (or N/A).
  • New code is documented and docstrings use numpydoc format (or N/A).
  • New functionality: considered making private instead of extending public API (or N/A).
  • Public API changed: added @deprecated (or N/A).
  • Tested on hardware (or N/A).
  • CHANGELOG.md and AUTHORS.md have been updated (or N/A).
  • Windows tests in CI pipeline pass (manually triggered by maintainers before merging).

For reference, the issues workflow is described in the contribution guidelines.

Edited by Robert Sokolewicz

Merge request reports

Loading