API documentation#
This is the autogenerated reference for the pygsti package, built from
docstrings and intended primarily for advanced usage and development. It is
organized by subpackage; within each subpackage the modules are listed and link
through to their classes and functions.
Subpackages#
pygsti.algorithms#
Core GST and characterization algorithms: model fitting, gauge optimization, fiducial/germ selection, and RB analysis.
Clifford circuit, CNOT circuit, and stabilizer state/measurement generation compilation routines |
|
|
Contract a Model to a specified space. |
Core GST algorithms |
|
Functions for reducing the number of required fiducial pairs for analysis. |
|
Functions for selecting a complete set of fiducials for a GST analysis. |
|
GST gauge optimization algorithms |
|
Functions for selecting a complete set of germs for a GST analysis. |
|
Utility functions related to Gram matrix construction. |
|
Functions to facilitate using GRASP. |
|
circuit mirroring functions. |
|
Random circuit sampling functions. |
|
Functions for analyzing RB data |
|
Robust Phase Estimation platform agnostic portion |
|
Common functions used in scoring germ and fiducial sets. |
pygsti.baseobjs#
Foundational utility objects: labels, matrix bases, state spaces, polynomials, and resource allocation.
Utilities for defining advanced low-level parameterizations for various pyGSTi operations |
|
Defines the Basis object and supporting functions |
|
Functions for creating the standard sets of matrices in the standard, Pauli, Gell-Mann, and qutrit bases |
|
Defines the ElementaryErrorgenBasis class and supporting functionality. |
|
Defines the ElementaryErrorgenLabel class and supporting functionality. |
|
Defines the ErrorgenSpace class and supporting functionality. |
|
Defines GST exception classes |
|
Defines the Label class |
|
Defines the MongoSerializable class |
|
Defines the NicelySerializable class |
|
Implementations of common polynomial operations |
|
Defines the OutcomeLabelDict class |
|
Defines the Polynomial class |
|
Defines the Profiler class and supporting functionality |
|
Defines the ProtectedArray class |
|
Defines the QubitGraph class and supporting functions |
|
Resource allocation manager |
|
Defines SmartCache and supporting functions |
|
Defines OrderedDict-derived classes used to store specific pyGSTi objects |
|
Defines the UnitaryGateFunction class and supporting functionality. |
|
Defines the VerbosityPrinter class, used for logging output. |
pygsti.circuits#
Quantum circuits and circuit lists, plus their construction and parsing.
Defines the Circuit class |
|
Utility functions for creating and acting on lists of circuits. |
|
Defines the CircuitList class, for holding meta-data alongside a list or tuple of Circuits. |
|
Implementations of a text parser for reading GST input files. |
|
Defines the CircuitStructure class and supporting functionality. |
|
Defines classes which represent gates, as well as supporting functions |
|
Circuit list creation functions using repeated-germs limited by a max-length. |
|
Functions for creating circuit lists |
|
Utility functions for subcircuit selection |
pygsti.data#
Datasets of experimental counts and the supporting analysis objects.
Defines the DataComparator class used to compare multiple DataSets. |
|
Defines the DataSet class and supporting classes and functions |
|
Functions for creating data |
|
Defines the FreeformDataSet class and supporting classes and functions |
|
Defines HypothesisTest object and supporting functions |
|
Defines the MultiDataSet class and supporting classes and functions |
|
Functions for creating RPE data sets |
pygsti.drivers#
High-level driver routines that tie protocols and analysis together.
Functions for generating bootstrapped error bars |
pygsti.errorgenpropagation#
Tools for propagating error generators through the layers of a circuit.
pygsti.extras#
Beyond-GST sub-packages: drift, idle tomography, IBMQ and Cirq interfaces, interpolation, and more.
Exteneral Device Specifications Sub-package |
|
Drift Detection and Characterization Sub-package |
|
IBMQ Experiment Sub-package |
|
Idle Tomography Sub-package |
|
Interpygate Sub-package |
|
Low Frequency Hamiltonian Sub-package |
|
Parity Benchmarking Sub-package |
|
Robubst Phase Estimation Sub-package |
pygsti.forwardsims#
Forward simulators that compute the outcome probabilities a model predicts for a circuit.
Defines the DistributableForwardSimulator calculator class |
|
Defines the ForwardSimulator calculator class |
|
Defines the MapForwardSimulator calculator class |
|
Defines generic Python-version of map forward simulator calculations |
|
Defines the MatrixForwardSimulator calculator class |
|
Defines the OplessForwardSimulator calculator class |
|
Defines the TermForwardSimulator calculator class |
|
Defines generic Python-version of map forward simulator calculations |
|
Defines a ForwardSimulator class called "TorchForwardSimulator" that can leverage the automatic differentation features of PyTorch. |
|
Defines the WeakForwardSimulator calculator class |
pygsti.io#
Reading and writing pyGSTi objects, datasets, and results.
Serialization routines to/from a meta.json based directory |
|
Serialization routines to/from a MongoDB database |
|
Functions for loading GST objects from text files. |
|
Text-parsing classes and functions to read input files. |
|
Functions for writing GST objects to text files. |
pygsti.layouts#
Circuit/COPA layouts that organize (and distribute) the computation behind forward simulation.
A object representing the indexing into a (flat) array of circuit outcome probabilities. |
|
A object representing the indexing into a (flat) array of circuit outcome probabilities. |
|
Defines the DistributableCOPALayout class. |
|
Defines the EvalTree class. |
|
Defines the MapCOPALayout class. |
|
Defines the MatrixCOPALayout class. |
|
Defines the PrefixTable class. |
|
Defines the TermCOPALayout class. |
pygsti.modelmembers#
The states, POVMs, operations, and instruments held inside models.
Defines the ErrorGeneratorContainer helper class. |
|
Sub-package holding model instrument objects. |
|
Defines the ModelChild and ModelMember classes, which represent Model members |
|
Modelmember dependency graph related utility functions |
|
Sub-package holding model operation objects. |
|
Sub-package holding model POVM and POVM effect objects. |
|
Sub-package holding model state preparation objects. |
|
Defines classes which represent terms in gate expansions |
|
Defines the interface that ModelMembers must satisfy to be compatible with the PyTorch-backed forward simulator in pyGSTi/forwardsims/torchfwdsim.py. |
pygsti.models#
Model objects representing a QIP, plus model construction, parameterization, and noise.
Defines the CloudNoiseModel class and supporting functions |
|
Defines the ExplicitOpModelCalc class and supporting functionality. |
|
Defines the ExplicitOpModel class and supporting functionality. |
|
Defines the FirstOrderGaugeInvariantStore class and supporting functionality. |
|
GaugeGroup and derived objects, used primarily in gauge optimization |
|
Defines the ImplicitOpModel class and supporting functionality. |
|
Defines the LayerLizard class and supporting functionality. |
|
Defines the LocalNoiseModel class and supporting functions |
|
Defines OrderedDict-derived classes used to store specific pyGSTi objects |
|
Defines the Model class and supporting functionality. |
|
Functions for the construction of new models. |
|
Objects for specifying the noise to be added to models when they are created. |
|
Defines the ModelParamsInterposer class and supporting functionality. |
|
Defines the OplessModel class |
|
Routines for building qutrit gates and models |
|
Functions for creating RPE Models |
|
Stencil label classes and supporting functions. |
pygsti.objectivefns#
Objective functions (e.g. chi-squared, log-likelihood) and wildcard-error budgets.
Defines objective-function objects |
|
Functions related to computation of the log-likelihood. |
pygsti.optimize#
Optimization routines used during model fitting.
Implements the ArraysInterface object and supporting functionality. |
|
A custom conjugate gradient descent algorithm |
|
Custom implementation of the Levenberg-Marquardt Algorithm |
|
A custom MPI-enabled linear solver. |
|
Optimization (minimization) functions |
|
Custom implementation of the Levenberg-Marquardt Algorithm (but simpler than customlm.py) |
|
Wildcard budget fitting routines |
pygsti.processors#
Processor specifications and compilation rules.
Defines CompilationLibrary class and supporting functions |
|
Defines the QubitProcessorSpec class and supporting functionality. |
|
Randomized circuit compilation via random compiling and central Pauli propagation. |
pygsti.protocols#
Protocol objects (GST, RB, RPE, drift, …) with their inputs, data, and results.
Classes for constructing confidence regions |
|
Defines the Estimate class. |
|
ModelTest Protocol objects |
|
GST Protocol objects |
|
Functions for creating mirror experiment designs for mirror circuit fidelity estimation (MCFE) |
|
ModelTest Protocol objects |
|
Protocol object |
|
RB Protocol objects |
|
RPE Protocol objects |
|
scarab is a software tool for creating scalable, robust benchmarks from any quantum circuit. |
|
Stability analysis protocol objects |
|
The TreeNode class |
|
Volumetric Benchmarking Protocol objects |
|
Techniques for manipulating benchmarking data stored in a Pandas DataFrame. |
pygsti.serialization#
JSON serialization helpers.
Defines JSON-format encoding and decoding functions |
pygsti.tools#
General-purpose numerical and quantum-information utilities.
Utility functions for working with Basis objects |
|
Chi-squared and related functions |
|
Functions for manipulating gates in circuits |
|
Tools for working with Pandas dataframes |
|
Tools for working with ExperimentDesigns |
|
Tools for the propagation of error generators through circuits. |
|
Defines GST exception classes |
|
Utility functions for computing and working with first-order-gauge-invariant (FOGI) quantities. |
|
Functions for creating gates |
|
Encapsulates a group in terms of matrices and relations |
|
Tools for general statistical hypothesis testing |
|
The standard unitaries and gate names, used internal compilers and short-hand model init |
|
Utility functions related to the Choi representation of gates. |
|
Functions related deprecating other functions |
|
Functions related to computation of the log-likelihood. |
|
Utility functions relevant to Lindblad forms and projections |
|
Utility functions for working with lists |
|
General matrix utilities. |
|
Matrix related utility functions |
|
Tools for analyzing MCFE data |
|
Functions for working with MPI processor distributions |
|
Functions for working with Python multiprocessing (more than just map) |
|
The NamedDict class |
|
Utility functions operating on operation matrices |
|
This module defines tools for optimization and profiling |
|
Tools for manipulating classical probability distributions. |
|
RB-related functions of gates and models |
|
Tools for analyzing RB data |
|
Functions for constructing semidefinite programming models |
|
Utility functions for working with shared memory |
|
Utility functions for working with Python slice objects |
|
Symplectic representation utility functions |
|
The TypedDict class |
Large internal subpackages#
A few subpackages are large internal or data-heavy trees that are not expanded
in this reference: pygsti.report (HTML-report generation machinery),
pygsti.modelpacks (standard model packs — data rather than API), and
pygsti.evotypes (internal evolution-type representations). The most commonly
used entry points from these areas are listed below.
Frequently used entry points#
A handful of widely used classes and functions from the subpackages above are documented individually here for convenience.
|
The internal model of a report. |
ABC for modelpacks with GST information |
Create a "standard" GST report, containing details about each estimate in results individually. |