pygsti.report.direct_logl_boxplot

pygsti.report.direct_logl_boxplot(xvals, yvals, xy_gatestring_dict, dataset, directGatesets, strs, xlabel='', ylabel='', scale=1.0, prec='compact', title='Direct $\\log(\\mathcal{L})$', sumUp=False, boxLabels=True, histogram=False, histBins=50, minProbClipForWeighting=0.0001, save_to=None, ticSize=20, invert=False, fidPairs=None, linlg_pcntle=0.05)

Create a color box plot of Direct-X log-likelihood values.

Parameters:
  • yvals (xvals,) – List of x and y values. Elements can be any hashable quantity, and will be converted into x and y tic labels. Tuples of strings are converted specially for nice latex rendering of gate strings.
  • xy_gatestring_dict (dict) – Dictionary with keys == (x_value,y_value) tuples and values == gate strings, where a gate string can either be a GateString object or a tuple of gate labels. Provides the mapping between x,y pairs and gate strings. None values are allowed, and indicate that there is not data for that x,y pair and nothing should be plotted.
  • dataset (DataSet) – The data used to specify frequencies and counts
  • directGatesets (dict) – Dictionary with keys == gate strings and values == GateSets. directGatesets[sigma] must be a GateSet which contains an estimate of sigma stored under the gate label “GsigmaLbl”.
  • strs (2-tuple) – A (prepStrs,effectStrs) tuple usually generated by calling get_spam_strs(...)
  • ylabel (xlabel,) – X and Y axis labels
  • scale (float, optional) – Scaling factor to adjust the size of the final figure.
  • prec (int, optional) – Precision for box labels. Allowed values are: ‘compact’ = round to nearest whole number using at most 3 characters ‘compacthp’ = show as much precision as possible using at most 3 characters int >= 0 = fixed precision given by int int < 0 = number of significant figures given by -int
  • title (string, optional) – Plot title (latex can be used)
  • sumUp (bool, optional) – False displays each matrix element as it’s own color box True sums the elements of each (x,y) matrix and displays a single color box for the sum.
  • boxLabels (bool, optional) – Whether box labels are displayed. It takes much longer to generate the figure when this is set to True.
  • histogram (bool, optional) – Whether a histogram of the matrix element values or summed matrix values (depending on sumUp) should also be computed and displayed.
  • histBins (int, optional) – The number of bins to use in the histogram.
  • minProbClipForWeighting (float, optional) – defines the clipping interval for the statistical weight used within the logl function.
  • save_to (str, optional) – save figure to this filename (usually ending in .pdf)
  • ticSize (int, optional) – size of tic marks
  • invert (bool, optional) – If True, invert the nesting order of the nested color box plot (applicable only when sumUp == False). Use inner_x_labels and inner_y_labels to label the x and y axes.
  • fidPairs (list, optional) – A list of (iRhoStr,iEStr) tuples specifying a subset of all the prepStr,effectStr pairs to include in the plot.
  • linlg_pcntle (float, optional) – Specifies the (1 - linlg_pcntle) percentile to compute for the boxplots
Returns:

rptFig – The encapsulated matplotlib figure that was generated. Extra figure info is a dict with keys:

nUsedXs : int

The number of used X-values, proportional to the overall final figure width

nUsedYs : int

The number of used Y-values, proportional to the overall final figure height

Return type:

ReportFigure