pygsti.report.table
Defines the ReportTable class
Module Contents
Classes
Table representation, renderable in multiple formats |
- class pygsti.report.table.ReportTable(col_headings, formatters, custom_header=None, col_heading_labels=None, confidence_region_info=None)
Bases:
object
Table representation, renderable in multiple formats
Parameters
- col_headingslist or dict
Default column headings if list; dictionary of overrides if dict.
- formatterslist
Names of default column heading formatters.
- custom_headerdict
Dictionary of overriden headers.
- col_heading_labelslist
Labels for column headings (tooltips).
- confidence_region_infoConfidenceRegion, optional
If not None, specifies a confidence-region used to display error intervals. Specifically, tells reportableqtys if they should use non markovian error bars or not
Attributes
- num_rowsint
The number of rows in this table
- num_colsint
The number of columns in this table
- row_nameslist
The names (keys) of the rows in this table
- col_nameslist
The names (keys) of the columns in this table
Create a table object
Parameters
- col_headingslist or dict
default column headings if list, dictionary of overrides if dict
- formatterslist
names of default column heading formatters
- custom_headerdict
dictionary of overriden headers
- col_heading_labelslist
labels for column headings (tooltips)
- confidence_region_infoConfidenceRegion, optional
If not None, specifies a confidence-region used to display error intervals. Specifically, tells reportableqtys if they should use non markovian error bars or not
- add_row(data, formatters=None, labels=None, non_markovian_ebs=None)
Adds a row to the table.
Parameters
- datalist
A list of the data for each cell of the added row.
- formatterslist[string], optional
Formatting options for each cell of the added row.
- labelslist[string], optional
Labeling options for each cell of the added row.
- non_markovian_ebsbool
Whether non-Markovian error bars should be used
Returns
None
- render(fmt, longtables=False, table_id=None, tableclass=None, output_dir=None, precision=6, polarprecision=3, sciprecision=0, resizable=False, autosize=False, fontsize=None, complex_as_polar=True, brackets=False, click_to_display=False, link_to=None, render_includes=True)
Render a table object
Parameters
- fmtstring
name of format to be used
- longtablesbool
latex table option
- table_idstring
id tag for HTML tables
- tableclassstring
class tag for HTML tables
- output_dirstring
directory for latex figures to be rendered in
- precisionint
number of digits to render
- polarprecisionint
number of digits to render for polars
- sciprecisionint
number of digits to render for scientific notation
- resizablebool
allow a table to be resized
- autosizebool
allow a table to be automatically sized
- fontsizeint
override fontsize of a tabel
- complex_as_polarbool
render complex numbers as polars
- bracketsbool
render matrix like types w/ brackets
- click_to_displaybool
table plots must be clicked to prompt creation
- link_tolist or {‘tex’, ‘pdf’, ‘pkl’}
whether to create links to TEX, PDF, and/or PKL files
- render_includesbool
whether files included in rendered latex should also be rendered (usually as PDFs for use with the ‘includegraphics’ latex statement)
Returns
string
- row(key=None, index=None)
Retrieve a row’s cell data.
A row is identified by either its key (its first cell’s value) OR its index (0-based). You cannot specify both key and index.
Parameters
- keyobject, optional
Value of a row’s first cell.
- indexint, optional
Row index.
Returns
list
- col(key=None, index=None)
Retrieve a column’s cell data.
A column is identified by either its key (its column header’s value) OR its index (0-based). You cannot specify both key and index.
Parameters
- keyobject, optional
Value of a column’s header value.
- indexint, optional
Column index.
Returns
list