quantify_scheduler.visualization.pulse_scheme

Module containing functions for drawing pulse schemes and circuit diagrams using matplotlib.

Module Contents

Functions

new_pulse_fig(→ Tuple[matplotlib.figure.Figure, ...)

Open a new figure and configure it to plot pulse schemes.

new_pulse_subplot(→ matplotlib.axes.Axes)

Add a new subplot configured for plotting pulse schemes to a figure.

mwPulse(→ float)

Draw a microwave pulse: Gaussian envelope with modulation.

fluxPulse(→ float)

Draw a smooth flux pulse, where the rising and falling edges are given by

ramZPulse(→ float)

Draw a Ram-Z flux pulse, i.e. only part of the pulse is shaded, to indicate

interval(→ None)

Draw an arrow to indicate an interval.

meter(→ None)

Draws a measurement meter on the specified position.

box_text(→ None)

Draws a box filled with text at the specified position.

pulse_diagram_plotly(*args, **kwargs)

Deprecated import use

Attributes

logger

logger[source]
new_pulse_fig(figsize: Optional[Tuple[int, int]] = None, ax: Optional[matplotlib.axes.Axes] = None) Tuple[matplotlib.figure.Figure, Union[matplotlib.axes.Axes, List[matplotlib.axes.Axes]]][source]

Open a new figure and configure it to plot pulse schemes.

Parameters
  • figsize

  • ax – Axis to use for plotting. If None, then creates a new one.

Returns

Tuple of figure handle and axis handle.

new_pulse_subplot(fig: matplotlib.figure.Figure, *args, **kwargs) matplotlib.axes.Axes[source]

Add a new subplot configured for plotting pulse schemes to a figure.

All *args and **kwargs are passed to fig.add_subplot.

Parameters

fig

mwPulse(ax: matplotlib.axes.Axes, pos: float, y_offs: float = 0.0, width: float = 1.5, amp: float = 1, label: Optional[str] = None, phase=0, label_height: float = 1.3, color: str = constants.COLOR_ORANGE, modulation: str = 'normal', **plot_kws) float[source]

Draw a microwave pulse: Gaussian envelope with modulation.

Parameters
  • ax

  • pos

  • y_offs

  • width

  • amp

  • label

  • label_height

  • color

  • modulation

fluxPulse(ax: matplotlib.axes.Axes, pos: float, y_offs: float = 0.0, width: float = 2.5, s: float = 0.1, amp: float = 1.5, label: Optional[str] = None, label_height: float = 1.7, color: str = constants.COLOR_ORANGE, **plot_kws) float[source]

Draw a smooth flux pulse, where the rising and falling edges are given by Fermi-Dirac functions.

Parameters
  • ax

  • pos

  • y_offs

  • width

  • s – smoothness of edge

  • amp

  • label

  • label_height

  • color

ramZPulse(ax: matplotlib.axes.Axes, pos: float, y_offs: float = 0.0, width: float = 2.5, s: float = 0.1, amp: float = 1.5, sep: float = 1.5, color: str = constants.COLOR_ORANGE) float[source]

Draw a Ram-Z flux pulse, i.e. only part of the pulse is shaded, to indicate cutting off the pulse at some time.

Parameters
  • ax

  • pos

  • y_offs

  • width

  • s

  • amp

  • sep

  • color

interval(ax: matplotlib.axes.Axes, start: float, stop: float, y_offs: float = 0.0, height: float = 1.5, label: Optional[str] = None, label_height: Optional[str] = None, vlines: bool = True, color: str = 'k', arrowstyle: str = '<|-|>', **plot_kws) None[source]

Draw an arrow to indicate an interval.

Parameters
  • ax

  • start

  • stop

  • y_offs

  • height

  • label

  • label_height

  • vlines

  • color

  • arrowstyle

meter(ax: matplotlib.axes.Axes, x0: float, y0: float, y_offs: float = 0.0, width: float = 1.1, height: float = 0.8, color: str = 'black', framewidth: float = 0.0, fillcolor: Optional[str] = None) None[source]

Draws a measurement meter on the specified position.

Parameters
  • ax

  • x0

  • y0

  • y_offs

  • width

  • height

  • color

  • framewidth

  • fillcolor

box_text(ax: matplotlib.axes.Axes, x0: float, y0: float, text: str = '', width: float = 1.1, height: float = 0.8, color: str = 'black', fillcolor: Optional[str] = None, textcolor: str = 'black', fontsize: Optional[int] = None) None[source]

Draws a box filled with text at the specified position.

Parameters
  • ax

  • x0

  • y0

  • text

  • width

  • height

  • color

  • fillcolor

  • textcolor

  • fontsize

pulse_diagram_plotly(*args, **kwargs)[source]

Deprecated import use pulse_diagram_plotly()