pygsti.report.vbplot

Matplotlib volumetric benchmarking plotting routines.

Module Contents

Functions

empty_volumetric_plot(figsize=None, y_values=None, x_values=None, title=None, xlabel='Depth', ylabel='Width')

Creates an empty volumetric plot with just the axes set.

_get_xy(data, y_values=None, x_values=None)

volumetric_plot(data, y_values=None, x_values=None, title=None, fig=None, ax=None, cmap=my_cmap, color=None, flagQV=False, qv_threshold=None, figsize=(10, 10), scale=1.0, centerscale=1.0, linescale=1.0, pass_threshold=0, show_threshold=0)

Creates a volumetric benchmarking plot.

volumetric_boundary_plot(data, y_values=None, x_values=None, boundary=None, threshold=0.5, missing_data_action='continue', monotonic=True, color='k', linewidth=4, linestyle='-', dashing=None, fig=None, ax=None, figsize=None, title=None, label=None)

Creates a volumetric benchmarking boundary plot, that displays boundary at which the given data

capability_region_plot(vbdataframe, metric='polarization', threshold=1 / _np.e, significance=0.05, figsize=(10, 10), scale=1.0, title=None, colors=None)

Creates a capability regions plot from a VBDataFrame. Default options creates plots like those shown

volumetric_distribution_plot(vbdataframe, metric='polarization', threshold=1 / _np.e, hypothesis_test='standard', significance=0.05, figsize=(10, 10), scale={'min': 1.95, 'mean': 1, 'max': 0.13}, title=None, cmap=my_cmap)

Creates volumetric benchmarking plots that display the maximum, mean and minimum of a given figure-of-merit (by

Attributes

blues

pygsti.report.vbplot.blues
pygsti.report.vbplot.empty_volumetric_plot(figsize=None, y_values=None, x_values=None, title=None, xlabel='Depth', ylabel='Width')

Creates an empty volumetric plot with just the axes set.

Parameters
  • figsize (tuple or None, optional) – The figure size.

  • y_values (list or None, optional) – The y-axis values, typically corresponding to circuit widths.

  • x_values (list or None, optional) – The x-axis values, typically corresponding to circuit depths.

  • title (string or None, optional) – Plot title

  • xlabel (string, optional) – x-axis label

  • ylabel (string, optional) – y-axis label.

Returns

fig, ax (matplolib fig and ax.)

pygsti.report.vbplot._get_xy(data, y_values=None, x_values=None)
pygsti.report.vbplot.volumetric_plot(data, y_values=None, x_values=None, title=None, fig=None, ax=None, cmap=my_cmap, color=None, flagQV=False, qv_threshold=None, figsize=(10, 10), scale=1.0, centerscale=1.0, linescale=1.0, pass_threshold=0, show_threshold=0)

Creates a volumetric benchmarking plot.

pygsti.report.vbplot.volumetric_boundary_plot(data, y_values=None, x_values=None, boundary=None, threshold=0.5, missing_data_action='continue', monotonic=True, color='k', linewidth=4, linestyle='-', dashing=None, fig=None, ax=None, figsize=None, title=None, label=None)

Creates a volumetric benchmarking boundary plot, that displays boundary at which the given data drops below the specified threshold

pygsti.report.vbplot.capability_region_plot(vbdataframe, metric='polarization', threshold=1 / _np.e, significance=0.05, figsize=(10, 10), scale=1.0, title=None, colors=None)

Creates a capability regions plot from a VBDataFrame. Default options creates plots like those shown in Fig. 3 of “Measuring the Capabilities of Quantum Computers” arXiv:2008.11294.

pygsti.report.vbplot.volumetric_distribution_plot(vbdataframe, metric='polarization', threshold=1 / _np.e, hypothesis_test='standard', significance=0.05, figsize=(10, 10), scale={'min': 1.95, 'mean': 1, 'max': 0.13}, title=None, cmap=my_cmap)

Creates volumetric benchmarking plots that display the maximum, mean and minimum of a given figure-of-merit (by default, circuit polarization) as a function of circuit shape. This function can be used to create figures like those shown in Fig. 1 of “Measuring the Capabilities of Quantum Computers” arXiv:2008.11294.

Parameters
  • vbdataframe (VBDataFrame) – A VBDataFrame object containing the data to be plotted in a VB plot.

  • metric (string, optional) – The quantity to plot. Default is ‘polarization’ as used and defined in arXiv:2008.11294. The plot will show the maximum, mean, and minimum of this metric at each circuit shape.

  • threshold (float, optional) – The threshold for “success” for the figure-of-merit defined by metric. This threshold is used to compute the three “success” boundaries that are shown in the plot.

  • hypothesis_test (string, optional) –

    The type of statistical significance adjustment to apply to the boundaries. The options are - ‘standard’: this reproduces the method used and described in arXiv:2008.11294 (see the

    appendices for details). With this option, there will be a difference between the boundary for the minimum and maximum polarization only if there is statistically significant evidence in the data for this.

    • ’none’: no statistical significance adjustment: all three boundaries show the point at which

      relevant statistic (maximum, mean, minimum) drops below the threshold.

  • significance (float, optional) – The statistical significance in the hypothesis tests. Only used in hypothesis_test is not ‘none’.

  • figsize (tuple, optional) – The figure size

  • scale (dict, optional) – The scale for the three concentric squares, showing the maximum, mean and minimum.

  • title (sting, optional) – The figure title.

  • cmap (ColorMap, optional) – A matplotlib colormap.

Returns

fig, ax (matplolib fig and ax.)