pygsti.baseobjs.errorgenspace
Defines the ErrorgenSpace class and supporting functionality.
Module Contents
Classes
The base class for all "nicely serializable" objects in pyGSTi. |
- class pygsti.baseobjs.errorgenspace.ErrorgenSpace(vectors, basis)
Bases:
pygsti.baseobjs.nicelyserializable.NicelySerializableThe base class for all “nicely serializable” objects in pyGSTi.
A “nicely serializable” object can be converted to and created from a native Python object (like a string or dict) that contains only other native Python objects. In addition, there are constraints on the makeup of these objects so that they can be easily serialized to standard text-based formats, e.g. JSON. For example, dictionary keys must be strings, and the list vs. tuple distinction cannot be assumed to be preserved during serialization.
A vector space of error generators, spanned by some basis.
This object collects the information needed to specify a space within the space of all error generators.
Parameters
- vectorsnumpy array
List of vectors that span the space
- elemgen_basisElementaryErrorgenBasis
The elementary error generator basis that define the entries of self.vectors
- vectors
- elemgen_basis
- classmethod from_nice_serialization(state)
Create and initialize an object from a “nice” serialization.
A “nice” serialization here means one created by a prior call to to_nice_serialization using this class or a subclass of it. Nice serializations adhere to additional rules (e.g. that dictionary keys must be strings) that make them amenable to common file formats (e.g. JSON).
The state argument is typically a dictionary containing ‘module’ and ‘state’ keys specifying the type of object that should be created. This type must be this class or a subclass of it.
Parameters
- stateobject
An object, usually a dictionary, representing the object to de-serialize.
Returns
object
- intersection(other_space, free_on_unspecified_space=False, use_nice_nullspace=False)
TODO: docstring
- abstractmethod union(other_space)
TODO: docstring