pygsti.report.vbplot

Matplotlib volumetric benchmarking plotting routines.

Module Contents

Functions

empty_volumetric_plot([figsize, y_values, x_values, ...])

Creates an empty volumetric plot with just the axes set.

volumetric_plot(data[, y_values, x_values, title, ...])

Creates a volumetric benchmarking plot.

volumetric_boundary_plot(data[, y_values, x_values, ...])

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

capability_region_plot(vbdataframe[, metric, ...])

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

volumetric_distribution_plot(vbdataframe[, metric, ...])

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

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

figsizetuple or None, optional

The figure size.

y_valueslist or None, optional

The y-axis values, typically corresponding to circuit widths.

x_valueslist or None, optional

The x-axis values, typically corresponding to circuit depths.

titlestring or None, optional

Plot title

xlabelstring, optional

x-axis label

ylabelstring, optional

y-axis label.

Return

fig, ax : matplolib fig and ax.

pygsti.report.vbplot.volumetric_plot(data, y_values=None, x_values=None, title=None, fig=None, ax=None, cmap=None, 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=None, title=None, cmap=None)

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

vbdataframeVBDataFrame

A VBDataFrame object containing the data to be plotted in a VB plot.

metricstring, 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.

thresholdfloat, 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_teststring, 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.

significancefloat, optional

The statistical significance in the hypothesis tests. Only used in hypothesis_test is not ‘none’.

figsizetuple, optional

The figure size

scaledict, optional

The scale for the three concentric squares, showing the maximum, mean and minimum. Defaults to {‘min’: 1.95, ‘mean’: 1, ‘max’: 0.13}.

titlesting, optional

The figure title.

cmapColorMap, optional

A matplotlib colormap.

Return

fig, ax : matplolib fig and ax.