pygsti.report.workspacetables

Classes corresponding to tables within a Workspace context.

Module Contents

Classes

BlankTable

A completely blank placeholder table.

SpamTable

A table of one or more model's SPAM elements.

SpamParametersTable

A table for "SPAM parameters" (dot products of SPAM vectors)

GatesTable

Create a table showing a model's raw gates.

ChoiTable

A table of the Choi representations of a Model's gates

GaugeRobustModelTable

Create a table showing a model in a gauge-robust representation.

GaugeRobustMetricTable

Create a table showing a standard metric in a gauge-robust way.

ModelVsTargetTable

Table comparing a Model (as a whole) to a target

GatesVsTargetTable

Table comparing a Model's gates to those of a target model

SpamVsTargetTable

Table comparing a Model's SPAM vectors to those of a target

ErrgenTable

Table displaying the error generators of a Model's gates and their projections.

GaugeRobustErrgenTable

Table of gauge-robust error generators.

NQubitErrgenTable

Table displaying the error rates (coefficients of error generators) of a Model's gates.

OldRotationAxisVsTargetTable

Old 1-qubit-only gate rotation axis table

GateDecompTable

Table of angle & axis decompositions of a Model's gates

OldGateDecompTable

1-qubit-only table of gate decompositions

OldRotationAxisTable

1-qubit-only table of gate rotation angles and axes

GateEigenvalueTable

Table displaying, in a variety of ways, the eigenvalues of a Model's gates.

DataSetOverviewTable

Table giving a summary of the properties of dataset.

FitComparisonTable

Table showing how the goodness-of-fit evolved over GST iterations

CircuitTable

Table which simply displays list(s) of circuits

GatesSingleMetricTable

Table that compares the gates of many models to target models using a single metric (metric).

StandardErrgenTable

A table showing what the standard error generators' superoperator matrices look like.

GaugeOptParamsTable

Table of gauge optimization parameters

MetadataTable

Table of raw parameters, often taken directly from a Results object

SoftwareEnvTable

Table showing details about the current software environment.

ProfilerTable

Table of profiler timing information

WildcardBudgetTable

Table of wildcard budget information.

ExampleTable

Table used just as an example of what tables can do/look like for use within the "Help" section of reports.

class pygsti.report.workspacetables.BlankTable(ws)

Bases: pygsti.report.workspace.WorkspaceTable

A completely blank placeholder table.

Parameters

wsWorkspace

The containing (parent) workspace.

A completely blank placeholder table.

class pygsti.report.workspacetables.SpamTable(ws, models, titles=None, display_as='boxes', confidence_region_info=None, include_hs_vec=True)

Bases: pygsti.report.workspace.WorkspaceTable

A table of one or more model’s SPAM elements.

Parameters

wsWorkspace

The containing (parent) workspace.

modelsModel or list of Models

The Model(s) whose SPAM elements should be displayed. If multiple Models are given, they should have the same SPAM elements..

titleslist of strs, optional

Titles correponding to elements of models, e.g. “Target”.

display_as{“numbers”, “boxes”}, optional

How to display the SPAM matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

include_hs_vecboolean, optional

Whether or not to include Hilbert-Schmidt vector representation columns in the table.

A table of one or more model’s SPAM elements.

Parameters

modelsModel or list of Models

The Model(s) whose SPAM elements should be displayed. If multiple Models are given, they should have the same SPAM elements..

titleslist of strs, optional

Titles correponding to elements of models, e.g. “Target”.

display_as{“numbers”, “boxes”}, optional

How to display the SPAM matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

include_hs_vecboolean, optional

Whether or not to include Hilbert-Schmidt vector representation columns in the table.

class pygsti.report.workspacetables.SpamParametersTable(ws, models, titles=None, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

A table for “SPAM parameters” (dot products of SPAM vectors)

Parameters

wsWorkspace

The containing (parent) workspace.

modelsModel or list of Models

The Model(s) whose SPAM parameters should be displayed. If multiple Models are given, they should have the same gates.

titleslist of strs, optional

Titles correponding to elements of models, e.g. “Target”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table for model’s “SPAM parameters”, that is, the dot products of prep-vectors and effect-vectors.

Parameters

modelsModel or list of Models

The Model(s) whose SPAM parameters should be displayed. If multiple Models are given, they should have the same gates.

titleslist of strs, optional

Titles correponding to elements of models, e.g. “Target”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.GatesTable(ws, models, titles=None, display_as='boxes', confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Create a table showing a model’s raw gates.

Parameters

wsWorkspace

The containing (parent) workspace.

modelsModel or list of Models

The Model(s) whose gates should be displayed. If multiple Models are given, they should have the same operation labels.

titleslist of strings, optional

A list of titles corresponding to the models, used to prefix the column(s) for that model. E.g. “Target”.

display_as{“numbers”, “boxes”}, optional

How to display the operation matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals for the final element of models.

Create a table showing a model’s raw gates.

Parameters

modelsModel or list of Models

The Model(s) whose gates should be displayed. If multiple Models are given, they should have the same operation labels.

titleslist of strings, optional

A list of titles corresponding to the models, used to prefix the column(s) for that model. E.g. “Target”.

display_as{“numbers”, “boxes”}, optional

How to display the operation matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals for the final element of models.

Returns

ReportTable

class pygsti.report.workspacetables.ChoiTable(ws, models, titles=None, confidence_region_info=None, display=('matrix', 'eigenvalues', 'barplot'))

Bases: pygsti.report.workspace.WorkspaceTable

A table of the Choi representations of a Model’s gates

Parameters

wsWorkspace

The containing (parent) workspace.

modelsModel or list of Models

The Model(s) whose Choi info should be displayed. If multiple Models are given, they should have the same operation labels.

titleslist of strings, optional

A list of titles corresponding to the models, used to prefix the column(s) for that model. E.g. “Target”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display eigenvalue error intervals for the final Model in models.

displaytuple/list of {“matrices”,”eigenvalues”,”barplot”,”boxplot”}

Which columns to display: the Choi matrices (as numerical grids), the Choi matrix eigenvalues (as a numerical list), the eigenvalues on a bar plot, and/or the matrix as a plot of colored boxes.

Create a table of the Choi matrices and/or their eigenvalues of a model’s gates.

Parameters

modelsModel or list of Models

The Model(s) whose Choi info should be displayed. If multiple Models are given, they should have the same operation labels.

titleslist of strings, optional

A list of titles corresponding to the models, used to prefix the column(s) for that model. E.g. “Target”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display eigenvalue error intervals for the final Model in models.

displaytuple/list of {“matrices”,”eigenvalues”,”barplot”,”boxplot”}

Which columns to display: the Choi matrices (as numerical grids), the Choi matrix eigenvalues (as a numerical list), the eigenvalues on a bar plot, and/or the matrix as a plot of colored boxes.

Returns

ReportTable

class pygsti.report.workspacetables.GaugeRobustModelTable(ws, model, target_model, display_as='boxes', confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Create a table showing a model in a gauge-robust representation.

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The Model to display.

target_modelModel

The (usually ideal) reference model to compute gauge-invariant quantities with respect to.

display_as{“numbers”, “boxes”}, optional

How to display the operation matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table showing a gauge-invariant representation of a model.

Parameters

modelModel

The Model to display.

target_modelModel

The (usually ideal) reference model to compute gauge-invariant quantities with respect to.

display_as{“numbers”, “boxes”}, optional

How to display the operation matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.GaugeRobustMetricTable(ws, model, target_model, metric, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Create a table showing a standard metric in a gauge-robust way.

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The Model to display.

target_modelModel

The (usually ideal) reference model to compute gauge-invariant quantities with respect to.

metricstr

The abbreviation for the metric to use. Allowed values are:

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table showing a standard metric in a gauge-robust way.

Parameters

modelModel

The Model to display.

target_modelModel

The (usually ideal) reference model to compute gauge-invariant quantities with respect to.

metricstr

The abbreviation for the metric to use. Allowed values are:

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.ModelVsTargetTable(ws, model, target_model, clifford_compilation, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table comparing a Model (as a whole) to a target

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare with target_model.

target_modelModel

The target model to compare with.

clifford_compilationdict

A dictionary of circuits, one for each Clifford operation in the Clifford group relevant to the model Hilbert space. If None, then rows requiring a clifford compilation are omitted.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table comparing a model (as a whole) to a target model using metrics that can be evaluatd for an entire model.

Parameters

model, target_modelModel

The models to compare

clifford_compilationdict

A dictionary of circuits, one for each Clifford operation in the Clifford group relevant to the model Hilbert space. If None, then rows requiring a clifford compilation are omitted.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.GatesVsTargetTable(ws, model, target_model, confidence_region_info=None, display=('inf', 'agi', 'trace', 'diamond', 'nuinf', 'nuagi'), virtual_ops=None, wildcard=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table comparing a Model’s gates to those of a target model

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare to target_model.

target_modelmodel

The model to compare with.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple, optional

A tuple of one or more of the allowed options (see below) which specify which columns are displayed in the table.

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

  • “unmodeled” : unmodeled “wildcard” budget

virtual_opslist, optional

If not None, a list of Circuit objects specifying additional “gates” (i.e. processes) to compute eigenvalues of. Length-1 circuits are automatically discarded so they are not displayed twice.

wildcard: PrimitiveOpsWildcardBudget

A wildcard budget with a budget_for method that is used to fill in the “unmodeled” error column when it is requested.

Create a table comparing a model’s gates to a target model using metrics such as the infidelity, diamond-norm distance, and trace distance.

Parameters

model, target_modelModel

The models to compare

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple, optional

A tuple of one or more of the allowed options (see below) which specify which columns are displayed in the table.

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

  • “unmodeled” : unmodeled “wildcard” budget

virtual_opslist, optional

If not None, a list of Circuit objects specifying additional “gates” (i.e. processes) to compute eigenvalues of. Length-1 circuits are automatically discarded so they are not displayed twice.

wildcard: PrimitiveOpsWildcardBudget

A wildcard budget with a budget_for method that is used to fill in the “unmodeled” error column when it is requested.

Returns

ReportTable

class pygsti.report.workspacetables.SpamVsTargetTable(ws, model, target_model, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table comparing a Model’s SPAM vectors to those of a target

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare to target_model.

target_modelmodel

The model to compare with.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table comparing a model’s SPAM operations to a target model using state infidelity and trace distance.

Parameters

model, target_modelModel

The models to compare

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.ErrgenTable(ws, model, target_model, confidence_region_info=None, display=('errgen', 'H', 'S', 'CA'), display_as='boxes', gen_type='logGTi')

Bases: pygsti.report.workspace.WorkspaceTable

Table displaying the error generators of a Model’s gates and their projections.

Projections are given onto spaces of standard generators.

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare to target_model.

target_modelmodel

The model to compare with.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple of {“errgen”,”H”,”S”,”A”}

Specifes which columns to include: the error generator itself and the projections of the generator onto Hamiltoian-type error (generators), Stochastic-type errors, and Affine-type errors.

display_as{“numbers”, “boxes”}, optional

How to display the requested matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

gen_type{“logG-logT”, “logTiG”, “logGTi”}

The type of error generator to compute. Allowed values are:

  • “logG-logT” : errgen = log(gate) - log(target_op)

  • “logTiG” : errgen = log( dot(inv(target_op), gate) )

  • “logTiG” : errgen = log( dot(gate, inv(target_op)) )

Create a table listing the error generators obtained by comparing a model’s gates to a target model.

Parameters

model, target_modelModel

The models to compare

displaytuple of {“errgen”,”H”,”S”,”A”}

Specifes which columns to include: the error generator itself and the projections of the generator onto Hamiltoian-type error (generators), Stochastic-type errors, and Active&Correlation-type errors.

display_as{“numbers”, “boxes”}, optional

How to display the requested matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

gen_type{“logG-logT”, “logTiG”, “logGTi”}

The type of error generator to compute. Allowed values are:

  • “logG-logT” : errgen = log(gate) - log(target_op)

  • “logTiG” : errgen = log( dot(inv(target_op), gate) )

  • “logGTi” : errgen = log( dot(gate, inv(target_op)) )

Returns

ReportTable

class pygsti.report.workspacetables.GaugeRobustErrgenTable(ws, model, target_model, confidence_region_info=None, gen_type='logGTi')

Bases: pygsti.report.workspace.WorkspaceTable

Table of gauge-robust error generators.

A table displaying the first-order gauge invariant (“gauge robust”) linear combinations of standard error generator coefficients for the gates in a model.

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare to target_model.

target_modelmodel

The model to compare with.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

gen_type{“logG-logT”, “logTiG”, “logGTi”}

The type of error generator to compute. Allowed values are:

  • “logG-logT” : errgen = log(gate) - log(target_op)

  • “logTiG” : errgen = log( dot(inv(target_op), gate) )

  • “logTiG” : errgen = log( dot(gate, inv(target_op)) )

Create a table listing the first-order gauge invariant (“gauge robust”) linear combinations of standard error generator coefficients for the gates in model. This table identifies, through the use of “synthetic idle tomography”, which combinations of standard-error- generator coefficients are robust (to first-order) to gauge variations.

Parameters

model, target_modelModel

The models to compare

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

gen_type{“logG-logT”, “logTiG”, “logGTi”}

The type of error generator to compute. Allowed values are:

  • “logG-logT” : errgen = log(gate) - log(target_op)

  • “logTiG” : errgen = log( dot(inv(target_op), gate) )

  • “logTiG” : errgen = log( dot(gate, inv(target_op)) )

Returns

ReportTable

class pygsti.report.workspacetables.NQubitErrgenTable(ws, model, confidence_region_info=None, display=('H', 'S', 'A'), display_as='boxes')

Bases: pygsti.report.workspace.WorkspaceTable

Table displaying the error rates (coefficients of error generators) of a Model’s gates.

The gates are assumed to have a particular structure.

Specifically, gates must be LindbladOp or StaticArbitraryOp objects wrapped within EmbeddedOp and/or ComposedOp objects (this is consistent with the operation blocks of a CloudNoiseModel). As such, error rates are read directly from the gate objects rather than being computed by projecting dense gate representations onto a “basis” of fixed error generators (e.g. H+S+A generators).

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to analyze.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple of {“H”,”S”,”A”}

Specifes which columns to include: Hamiltoian-type, Pauli-Stochastic-type, and Affine-type rates, respectively.

display_as{“numbers”, “boxes”}, optional

How to display the requested matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

Create a table listing the error rates of the gates in model.

The gates in model are assumed to have a particular structure, namely: they must be LindbladOp or StaticArbitraryOp objects wrapped within EmbeddedOp and/or ComposedOp objects.

Error rates are organized by order of composition and which qubits the corresponding error generators act upon.

Parameters

modelModel

The model to analyze.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple of {“H”,”S”,”A”}

Specifes which columns to include: Hamiltoian-type, Pauli-Stochastic-type, and Affine-type rates, respectively.

display_as{“numbers”, “boxes”}, optional

How to display the requested matrices, as either numerical grids (fine for small matrices) or as a plot of colored boxes (space-conserving and better for large matrices).

Returns

ReportTable

class pygsti.report.workspacetables.OldRotationAxisVsTargetTable(ws, model, target_model, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Old 1-qubit-only gate rotation axis table

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model to compare to target_model. Must be single qubit.

target_modelmodel

The model to compare with. Must be single qubit.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table comparing the rotation axes of the single-qubit gates in model with those in target_model. Differences are shown as angles between the rotation axes of corresponding gates.

Parameters

model, target_modelModel

The models to compare. Must be single-qubit.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.GateDecompTable(ws, model, target_model, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table of angle & axis decompositions of a Model’s gates

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The estimated model.

target_modelModel

The target model, used to help disambiguate the matrix logarithms that are used in the decomposition.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create table for decomposing a model’s gates.

This table interprets the Hamiltonian projection of the log of the operation matrix to extract a rotation angle and axis.

Parameters

modelModel

The estimated model.

target_modelModel

The target model, used to help disambiguate the matrix logarithms that are used in the decomposition.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.OldGateDecompTable(ws, model, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

1-qubit-only table of gate decompositions

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

A single-qubit Model.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create table for decomposing a single-qubit model’s gates.

This table interprets the eigenvectors and eigenvalues of the gates to extract a rotation angle, axis, and various decay coefficients.

Parameters

modelModel

A single-qubit Model.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.OldRotationAxisTable(ws, model, confidence_region_info=None, show_axis_angle_err_bars=True)

Bases: pygsti.report.workspace.WorkspaceTable

1-qubit-only table of gate rotation angles and axes

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

A single-qubit Model.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

show_axis_angle_err_barsbool, optional

Whether or not table should include error bars on the angles between rotation axes (doing so makes the table take up more space).

Create a table of the angle between a gate rotation axes for gates belonging to a single-qubit model.

Parameters

modelModel

A single-qubit Model.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

show_axis_angle_err_barsbool, optional

Whether or not table should include error bars on the angles between rotation axes (doing so makes the table take up more space).

Returns

ReportTable

class pygsti.report.workspacetables.GateEigenvalueTable(ws, model, target_model=None, confidence_region_info=None, display=('evals', 'rel', 'log-evals', 'log-rel', 'polar', 'relpolar'), virtual_ops=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table displaying, in a variety of ways, the eigenvalues of a Model’s gates.

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The Model

target_modelModel, optional

The target model. If given, the target’s eigenvalue will be plotted alongside model’s gate eigenvalue, the “relative eigenvalues”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple

A tuple of one or more of the allowed options (see below) which specify which columns are displayed in the table. If target_model is None, then “target”, “rel”, “log-rel” “relpolar”, “gidm”, and “giinf” will be silently ignored.

  • “evals” : the gate eigenvalues

  • “target” : the target gate eigenvalues

  • “rel” : the relative-gate eigenvalues

  • “log-evals” : the (complex) logarithm of the eigenvalues

  • “log-rel” : the (complex) logarithm of the relative eigenvalues

  • “polar”: a polar plot of the gate eigenvalues

  • “relpolar” : a polar plot of the relative-gate eigenvalues

  • “absdiff-evals” : absolute difference w/target eigenvalues

  • “infdiff-evals” : 1-Re(z0.C*z) difference w/target eigenvalues

  • “absdiff-log-evals” : Re & Im differences in eigenvalue logarithms

  • “evdm” : the gauge-invariant “eigenvalue diamond norm” metric

  • “evinf” : the gauge-invariant “eigenvalue infidelity” metric

virtual_opslist, optional

If not None, a list of Circuit objects specifying additional “gates” (i.e. processes) to compute eigenvalues of. Length-1 circuits are automatically discarded so they are not displayed twice.

Create table which lists and displays (using a polar plot) the eigenvalues of a model’s gates.

Parameters

modelModel

The Model

target_modelModel, optional

The target model. If given, the target’s eigenvalue will be plotted alongside model’s gate eigenvalue, the “relative eigenvalues”.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

displaytuple

A tuple of one or more of the allowed options (see below) which specify which columns are displayed in the table. If target_model is None, then “target”, “rel”, “log-rel” “relpolar”, “gidm”, and “giinf” will be silently ignored.

  • “evals” : the gate eigenvalues

  • “target” : the target gate eigenvalues

  • “rel” : the relative-gate eigenvalues

  • “log-evals” : the (complex) logarithm of the eigenvalues

  • “log-rel” : the (complex) logarithm of the relative eigenvalues

  • “polar”: a polar plot of the gate eigenvalues

  • “relpolar” : a polar plot of the relative-gate eigenvalues

  • “absdiff-evals” : absolute difference w/target eigenvalues

  • “infdiff-evals” : 1-Re(z0.C*z) difference w/target eigenvalues

  • “absdiff-log-evals” : Re & Im differences in eigenvalue logarithms

  • “evdm” : the gauge-invariant “eigenvalue diamond norm” metric

  • “evinf” : the gauge-invariant “eigenvalue infidelity” metric

virtual_opslist, optional

If not None, a list of Circuit objects specifying additional “gates” (i.e. processes) to compute eigenvalues of. Length-1 circuits are automatically discarded so they are not displayed twice.

Returns

ReportTable

class pygsti.report.workspacetables.DataSetOverviewTable(ws, dataset, max_length_list=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table giving a summary of the properties of dataset.

Parameters

wsWorkspace

The containing (parent) workspace.

datasetDataSet

The DataSet

max_length_listlist of ints, optional

A list of the maximum lengths used, if available.

Create a table that gives a summary of the properties of dataset.

Parameters

datasetDataSet

The DataSet

max_length_listlist of ints, optional

A list of the maximum lengths used, if available.

Returns

ReportTable

class pygsti.report.workspacetables.FitComparisonTable(ws, xs, circuits_by_x, model_by_x, dataset, objfn_builder='logl', x_label='L', np_by_x=None, comm=None, wildcard=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table showing how the goodness-of-fit evolved over GST iterations

Parameters

wsWorkspace

The containing (parent) workspace.

xslist of integers

List of X-values. Typically these are the maximum lengths or exponents used to index the different iterations of GST.

circuits_by_xlist of (CircuitLists or lists of Circuits)

Specifies the set of circuits used at each X.

model_by_xlist of Models

Model corresponding to each X value.

datasetDataSet

The data set to compare each model against.

objfn_builderObjectiveFunctionBuilder or {“logl”, “chi2”}, optional

The objective function to use, or one of the given strings to use a defaut log-likelihood or chi^2 function.

x_labelstr, optional

A label for the ‘X’ variable which indexes the different models. This string will be the header of the first table column.

np_by_xlist of ints, optional

A list of parameter counts to use for each X. If None, then the number of non-gauge parameters for each model is used.

commmpi4py.MPI.Comm, optional

When not None, an MPI communicator for distributing the computation across multiple processors.

wildcardWildcardBudget

A wildcard budget to apply to the objective function (objective), which increases the goodness of fit by adjusting (by an amount measured in TVD) the probabilities produced by a model before comparing with the frequencies in dataset. Currently, this functionality is only supported for objective == “logl”.

Create a table showing how the chi^2 or log-likelihood changed with successive GST iterations.

Parameters

xslist of integers

List of X-values. Typically these are the maximum lengths or exponents used to index the different iterations of GST.

circuits_by_xlist of (CircuitLists or lists of Circuits)

Specifies the set of circuits used at each X.

model_by_xlist of Models

Model corresponding to each X value.

datasetDataSet

The data set to compare each model against.

objfn_builderObjectiveFunctionBuilder or {“logl”, “chi2”}, optional

The objective function to use, or one of the given strings to use a defaut log-likelihood or chi^2 function.

x_labelstr, optional

A label for the ‘X’ variable which indexes the different models. This string will be the header of the first table column.

np_by_xlist of ints, optional

A list of parameter counts to use for each X. If None, then the number of non-gauge parameters for each model is used.

commmpi4py.MPI.Comm, optional

When not None, an MPI communicator for distributing the computation across multiple processors.

wildcardWildcardBudget

A wildcard budget to apply to the objective function (objective), which increases the goodness of fit by adjusting (by an amount measured in TVD) the probabilities produced by a model before comparing with the frequencies in dataset. Currently, this functionality is only supported for objective == “logl”.

Returns

ReportTable

class pygsti.report.workspacetables.CircuitTable(ws, circuit_lists, titles, num_cols=1, common_title=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table which simply displays list(s) of circuits

Parameters

wsWorkspace

The containing (parent) workspace.

circuit_listsCircuit list or list of Circuit lists

List(s) of circuits to put in table.

titlesstring or list of strings

The title(s) for the different string lists. These are displayed in the relevant table columns containing the strings.

num_colsint, optional

The number of data columns, i.e. those containing circuits, for each string list.

common_titlestring, optional

A single title string to place in a cell spanning across all the other column headers.

Creates a table of enumerating one or more sets of circuits.

Parameters

circuit_listsCircuit list or list of Circuit lists

List(s) of circuits to put in table.

titlesstring or list of strings

The title(s) for the different string lists. These are displayed in the relevant table columns containing the strings.

num_colsint, optional

The number of data columns, i.e. those containing circuits, for each string list.

common_titlestring, optional

A single title string to place in a cell spanning across all the other column headers.

Returns

ReportTable

class pygsti.report.workspacetables.GatesSingleMetricTable(ws, metric, models, target_models, titles, rowtitles=None, table_title=None, op_label=None, confidence_region_info=None)

Bases: pygsti.report.workspace.WorkspaceTable

Table that compares the gates of many models to target models using a single metric (metric).

This allows the model titles to be used as the row and column headers. The models must share the same gate labels.

If models and target_models are 1D lists, then rowtitles and op_label should be left as their default values so that the operation labels are used as row headers.

If models and target_models are 2D (nested) lists, then rowtitles should specify the row-titles corresponding to the outer list elements and op_label should specify a single operation label that names the gate being compared throughout the entire table.

Parameters

wsWorkspace

The containing (parent) workspace.

metricstr

The abbreviation for the metric to use. Allowed values are:

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

modelslist

A list or nested list-of-lists of models to compare with corresponding elements of target_models.

target_modelslist

A list or nested list-of-lists of models to compare with corresponding elements of models.

titleslist of strs

A list of column titles used to describe elements of the innermost list(s) in models.

rowtitleslist of strs, optional

A list of row titles used to describe elements of the outer list in models. If None, then the operation labels are used.

table_titlestr, optional

If not None, text to place in a top header cell which spans all the columns of the table.

op_labelstr, optional

If not None, the single operation label to use for all comparisons computed in this table. This should be set when (and only when) models and target_models are 2D (nested) lists.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Create a table comparing the gates of various models (models) to those of target_models using the metric named by metric.

If models and target_models are 1D lists, then rowtitles and op_label should be left as their default values so that the operation labels are used as row headers.

If models and target_models are 2D (nested) lists, then rowtitles should specify the row-titles corresponding to the outer list elements and op_label should specify a single operation label that names the gate being compared throughout the entire table.

Parameters

metricstr

The abbreviation for the metric to use. Allowed values are:

  • “inf” : entanglement infidelity

  • “agi” : average gate infidelity

  • “trace” : 1/2 trace distance

  • “diamond” : 1/2 diamond norm distance

  • “nuinf” : non-unitary entanglement infidelity

  • “nuagi” : non-unitary entanglement infidelity

  • “evinf” : eigenvalue entanglement infidelity

  • “evagi” : eigenvalue average gate infidelity

  • “evnuinf” : eigenvalue non-unitary entanglement infidelity

  • “evnuagi” : eigenvalue non-unitary entanglement infidelity

  • “evdiamond” : eigenvalue 1/2 diamond norm distance

  • “evnudiamond” : eigenvalue non-unitary 1/2 diamond norm distance

  • “frob” : frobenius distance

modelslist

A list or nested list-of-lists of models to compare with corresponding elements of target_models.

target_modelslist

A list or nested list-of-lists of models to compare with corresponding elements of models.

titleslist of strs

A list of column titles used to describe elements of the innermost list(s) in models.

rowtitleslist of strs, optional

A list of row titles used to describe elements of the outer list in models. If None, then the operation labels are used.

table_titlestr, optional

If not None, text to place in a top header cell which spans all the columns of the table.

op_labelstr, optional

If not None, the single operation label to use for all comparisons computed in this table. This should be set when (and only when) models and target_models are 2D (nested) lists.

confidence_region_infoConfidenceRegion, optional

If not None, specifies a confidence-region used to display error intervals.

Returns

ReportTable

class pygsti.report.workspacetables.StandardErrgenTable(ws, model_dim, projection_type, projection_basis)

Bases: pygsti.report.workspace.WorkspaceTable

A table showing what the standard error generators’ superoperator matrices look like.

Parameters

wsWorkspace

The containing (parent) workspace.

model_dimint

The dimension of the model, which equals the number of rows (or columns) in a operation matrix (e.g., 4 for a single qubit).

projection_type{“hamiltonian”, “stochastic”}

The type of error generator projectors to create a table for. If “hamiltonian”, then use the Hamiltonian generators which take a density matrix rho -> -i*[ H, rho ] for basis matrix H. If “stochastic”, then use the Stochastic error generators which take rho -> P*rho*P for basis matrix P (recall P is self adjoint).

projection_basis{‘std’, ‘gm’, ‘pp’, ‘qt’}

Which basis is used to construct the error generators. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp) and Qutrit (qt).

Create a table of the “standard” gate error generators, such as those which correspond to Hamiltonian or Stochastic errors. Each generator is shown as grid of colored boxes.

Parameters

model_dimint

The dimension of the model, which equals the number of rows (or columns) in a operation matrix (e.g., 4 for a single qubit).

projection_type{“hamiltonian”, “stochastic”}

The type of error generator projectors to create a table for. If “hamiltonian”, then use the Hamiltonian generators which take a density matrix rho -> -i*[ H, rho ] for basis matrix H. If “stochastic”, then use the Stochastic error generators which take rho -> P*rho*P for basis matrix P (recall P is self adjoint).

projection_basis{‘std’, ‘gm’, ‘pp’, ‘qt’}

Which basis is used to construct the error generators. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp) and Qutrit (qt).

Returns

ReportTable

class pygsti.report.workspacetables.GaugeOptParamsTable(ws, gaugeopt_args)

Bases: pygsti.report.workspace.WorkspaceTable

Table of gauge optimization parameters

Parameters

wsWorkspace

The containing (parent) workspace.

gaugeopt_argsdict or list

A dictionary or list of dictionaries specifying values for zero or more of the arguments of pyGSTi’s gaugeopt_to_target() function.

Create a table displaying a list of gauge optimzation parameters.

Parameters

gaugeopt_argsdict or list

A dictionary or list of dictionaries specifying values for zero or more of the arguments of pyGSTi’s gaugeopt_to_target() function.

Returns

ReportTable

class pygsti.report.workspacetables.MetadataTable(ws, model, params)

Bases: pygsti.report.workspace.WorkspaceTable

Table of raw parameters, often taken directly from a Results object

Parameters

wsWorkspace

The containing (parent) workspace.

modelModel

The model (usually the final estimate of a GST computation) to show information for (e.g. the types of its gates).

params: dict

A parameter dictionary to display

Create a table of parameters and options from a Results object.

Parameters

modelModel

The model (usually the final estimate of a GST computation) to show information for (e.g. the types of its gates).

params: dict

A parameter dictionary to display

Returns

ReportTable

class pygsti.report.workspacetables.SoftwareEnvTable(ws)

Bases: pygsti.report.workspace.WorkspaceTable

Table showing details about the current software environment.

Parameters

wsWorkspace

The containing (parent) workspace.

Create a table displaying the software environment relevant to pyGSTi.

Returns

ReportTable

class pygsti.report.workspacetables.ProfilerTable(ws, profiler, sort_by='time')

Bases: pygsti.report.workspace.WorkspaceTable

Table of profiler timing information

Parameters

wsWorkspace

The containing (parent) workspace.

profilerProfiler

The profiler object to extract timings from.

sort_by{“time”, “name”}

What the timer values should be sorted by.

Create a table of profiler timing information.

Parameters

profilerProfiler

The profiler object to extract timings from.

sort_by{“time”, “name”}

What the timer values should be sorted by.

class pygsti.report.workspacetables.WildcardBudgetTable(ws, budget)

Bases: pygsti.report.workspace.WorkspaceTable

Table of wildcard budget information.

Parameters

wsWorkspace

The containing (parent) workspace.

budgetWildcardBudget

The wildcard budget object to extract timings from.

Create a table of wildcard budget information.

Parameters

budgetWildcardBudget

The wildcard budget object to extract timings from.

class pygsti.report.workspacetables.ExampleTable(ws)

Bases: pygsti.report.workspace.WorkspaceTable

Table used just as an example of what tables can do/look like for use within the “Help” section of reports.

Parameters

wsWorkspace

The containing (parent) workspace.

A table showing how to use table features.