pygsti.extras.idletomography.idtreport

Idle Tomography reporting and plotting functions

Module Contents

Classes

IdleTomographyObservedRatesTable

A table of the largest N (in absolute value) observed error rates.

IdleTomographyObservedRatesForIntrinsicRateTable

A table showing the observed error rates relevant for determining a

IdleTomographyObservedRatePlot

A plot showing how an observed error rate is obtained by fitting a sequence

IdleTomographyIntrinsicErrorsTable

A table of all the intrinsic rates found by idle tomography.

Functions

_add_new_labels(running_lbls, current_lbls)

Simple routine to add current-labels to a list of

_create_switchboard(ws, results_dict)

Creates the switchboard used by the idle tomography report

create_idletomography_report(results, filename, title='auto', ws=None, auto_open=False, link_to=None, brevity=0, advanced_options=None, verbosity=1)

Creates an Idle Tomography report, summarizing the results of running

class pygsti.extras.idletomography.idtreport.IdleTomographyObservedRatesTable(ws, idtresults, threshold=1.0, mdl_simulator=None)

Bases: pygsti.report.workspace.WorkspaceTable

A table of the largest N (in absolute value) observed error rates.

_create(self, idtresults, threshold, mdl_simulator)
class pygsti.extras.idletomography.idtreport.IdleTomographyObservedRatesForIntrinsicRateTable(ws, idtresults, typ, error_op, threshold=1.0, mdl_simulator=None)

Bases: pygsti.report.workspace.WorkspaceTable

A table showing the observed error rates relevant for determining a particular intrinsic rate. Output can be limited to just the largest observed rates.

_create(self, idtresults, typ, error_op, threshold, mdl_simulator)
class pygsti.extras.idletomography.idtreport.IdleTomographyObservedRatePlot(ws, idtresults, typ, fidpair, obs_or_outcome, title='auto', scale=1.0, mdl_simulator=None)

Bases: pygsti.report.workspace.WorkspacePlot

A plot showing how an observed error rate is obtained by fitting a sequence of observed data to a simple polynomial.

_create(self, idtresults, typ, fidpair, obs_or_outcome, title, scale, mdl_simulator)
class pygsti.extras.idletomography.idtreport.IdleTomographyIntrinsicErrorsTable(ws, idtresults, display=('H', 'S', 'A'), display_as='boxes')

Bases: pygsti.report.workspace.WorkspaceTable

A table of all the intrinsic rates found by idle tomography.

_create(self, idtresults, display, display_as)
pygsti.extras.idletomography.idtreport._add_new_labels(running_lbls, current_lbls)

Simple routine to add current-labels to a list of running-labels without introducing duplicates and preserving order as best we can.

pygsti.extras.idletomography.idtreport._create_switchboard(ws, results_dict)

Creates the switchboard used by the idle tomography report

pygsti.extras.idletomography.idtreport.create_idletomography_report(results, filename, title='auto', ws=None, auto_open=False, link_to=None, brevity=0, advanced_options=None, verbosity=1)

Creates an Idle Tomography report, summarizing the results of running idle tomography on a data set.

Parameters
  • results (IdleTomographyResults) – An object which represents the set of results from an idle tomography run, typically obtained from running do_idle_tomography() OR a dictionary of such objects, representing multiple idle tomography runs to be compared (typically all with different data sets). The keys of this dictionary are used to label different data sets that are selectable in the report.

  • filename (string, optional) – The output filename where the report file(s) will be saved. If None, then no output file is produced (but returned Workspace still caches all intermediate results).

  • title (string, optional) – The title of the report. “auto” causes a random title to be generated (which you may or may not like).

  • ws (Workspace, optional) – The workspace used as a scratch space for performing the calculations and visualizations required for this report. If you’re creating multiple reports with similar tables, plots, etc., it may boost performance to use a single Workspace for all the report generation.

  • auto_open (bool, optional) – If True, automatically open the report in a web browser after it has been generated.

  • link_to (list, optional) – If not None, a list of one or more items from the set {“tex”, “pdf”, “pkl”} indicating whether or not to create and include links to Latex, PDF, and Python pickle files, respectively. “tex” creates latex source files for tables; “pdf” renders PDFs of tables and plots ; “pkl” creates Python versions of plots (pickled python data) and tables (pickled pandas DataFrams).

  • advanced_options (dict, optional) –

    A dictionary of advanced options for which the default values aer usually are fine. Here are the possible keys of advanced_options:

    • connectedbool, optional

      Whether output HTML should assume an active internet connection. If True, then the resulting HTML file size will be reduced because it will link to web resources (e.g. CDN libraries) instead of embedding them.

    • cachefilestr, optional

      filename with cached workspace results

    • precisionint or dict, optional

      The amount of precision to display. A dictionary with keys “polar”, “sci”, and “normal” can separately specify the precision for complex angles, numbers in scientific notation, and everything else, respectively. If an integer is given, it this same value is taken for all precision types. If None, then {‘normal’: 6, ‘polar’: 3, ‘sci’: 0} is used.

    • resizablebool, optional

      Whether plots and tables are made with resize handles and can be resized within the report.

    • autosize{‘none’, ‘initial’, ‘continual’}

      Whether tables and plots should be resized, either initially – i.e. just upon first rendering (“initial”) – or whenever the browser window is resized (“continual”).

  • verbosity (int, optional) – How much detail to send to stdout.

Returns

Workspace – The workspace object used to create the report