Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

qcstyle

Style sheets for pulse visualization.

Classes

PulseStyle([figsize, title_font_size, …])Style sheet for Qiskit-Pulse sample pulse drawer.
SchedStyle([figsize, fig_unit_h_table, …])Style sheet for Qiskit-Pulse schedule drawer.

PulseStyle(figsize=(7, 5), title_font_size=18, wave_color=None, bg_color=None, num_points=None, dpi=None) GitHub(opens in a new tab)

Style sheet for Qiskit-Pulse sample pulse drawer.

Create new style sheet.

Parameters

  • figsize (Tuple[float, float]) – Size of figure.
  • title_font_size (int) – Font size of schedule name in title.
  • wave_color (Optional[List[str]]) – Color code or name of colors for real and imaginary part of SamplePulse waveform.
  • bg_color (Optional[str]) – Color code or name of color for pulse canvas background.
  • num_points (Optional[int]) – Number of points for interpolation.
  • dpi (Optional[int]) – Resolution in the unit of dot per inch to save image.

SchedStyle(figsize=(10, 12), fig_unit_h_table=0.4, use_table=True, table_columns=2, table_font_size=10, axis_font_size=18, label_font_size=10, icon_font_size=18, title_font_size=25, label_ch_linestyle='--', label_ch_color=None, label_ch_alpha=0.3, d_ch_color=None, u_ch_color=None, m_ch_color=None, s_ch_color=None, s_ch_linestyle='-', table_color=None, bg_color=None, num_points=1000, dpi=150, remove_spacing=True, max_table_ratio=0.5, vertical_span=0.2, axis_formatter=None) GitHub(opens in a new tab)

Style sheet for Qiskit-Pulse schedule drawer.

Create new style sheet.

Parameters

  • figsize (Tuple[float, float]) – Size of figure.
  • fig_unit_h_table (float) – Height of row of event table. See Example.
  • use_table (bool) – When set True use event table.
  • table_columns (int) – Number of event table columns.
  • table_font_size (int) – Font size of event table.
  • axis_font_size (int) – Font size of channel aliases.
  • label_font_size (int) – Font size of labels in canvas.
  • icon_font_size (int) – Size of symbols.
  • title_font_size (int) – Font size of schedule name in title.
  • label_ch_linestyle (str) – Line style for channel pulse label line.
  • label_ch_color (Optional[str]) – Color code or name of color for channel pulse label line.
  • label_ch_alpha (float) – Transparency for channel pulse label line from 0 to 1.
  • d_ch_color (Optional[List[str]]) – Color code or name of colors for real and imaginary part of waveform at d channels.
  • u_ch_color (Optional[List[str]]) – Color code or name of colors for real and imaginary part of waveform at u channels.
  • m_ch_color (Optional[List[str]]) – Color code or name of colors for real and imaginary part of waveform at m channels.
  • s_ch_color (Optional[List[str]]) – Color code or name of color for snapshot channel line.
  • s_ch_linestyle (str) – Line style for snapshot line.
  • table_color (Optional[str]) – Color code or name of color for event table columns of time, channel, event information.
  • bg_color (Optional[str]) – Color code or name of color for canvas background.
  • num_points (int) – Number of points for interpolation of each channel.
  • dpi (int) – Resolution in the unit of dot per inch to save image.
  • remove_spacing (bool) – Remove redundant spacing when the waveform has no negative values.
  • max_table_ratio (float) – Maximum portion of the plot the table can take up. Limited to range between 0 and 1.
  • vertical_span (float) – Spacing on top and bottom of pulse canvas.
  • axis_formatter (Optional[str]) – Format of horizontal axis of the plot. This is convenient when you set dt option for the drawer. For example, formatter of %.3e gives you horizontal axis values in the scientific notation with 3 digits.

Example

Height of the event table is decided by multiple parameters.:

figsize = (10, 12)
fig_unit_h_table = 0.4
table_columns = 2
max_table_ratio = 0.5

With this setup, events are shown in double-column style with each line height of 0.4 inch and the table cannot exceed 5 inch. Thus 12 lines are maximum and up to 24 events can be shown. If you want to show more events, increase figure height or reduce size of line height and table font size.

Was this page helpful?