pygsti.baseobjs.errorgenbasis

Defines the ElementaryErrorgenBasis class and supporting functionality.

Module Contents

Classes

ElementaryErrorgenBasis

A basis for error-generator space defined by a set of elementary error generators.

ExplicitElementaryErrorgenBasis

A basis for error-generator space defined by a set of elementary error generators.

CompleteElementaryErrorgenBasis

Spanned by the elementary error generators of given type(s) (e.g. "Hamiltonian" and/or "other")

class pygsti.baseobjs.errorgenbasis.ElementaryErrorgenBasis

Bases: object

A basis for error-generator space defined by a set of elementary error generators.

Elements are ordered (have definite indices) and labeled. Intersection and union can be performed as a set.

label_indices(self, labels)

TODO: docstring

__len__(self)

Number of elementary errorgen elements in this basis

class pygsti.baseobjs.errorgenbasis.ExplicitElementaryErrorgenBasis(state_space, labels, basis1q=None)

Bases: ElementaryErrorgenBasis

A basis for error-generator space defined by a set of elementary error generators.

Elements are ordered (have definite indices) and labeled. Intersection and union can be performed as a set.

property labels(self)
property elemgen_supports_and_matrices(self)
label_index(self, label)

TODO: docstring

create_subbasis(self, must_overlap_with_these_sslbls)

Create a sub-basis of this basis by including only the elements that overlap the given support (state space labels)

union(self, other_basis)
intersection(self, other_basis)
difference(self, other_basis)
class pygsti.baseobjs.errorgenbasis.CompleteElementaryErrorgenBasis(basis_1q, state_space, other_mode, max_ham_weight=None, max_other_weight=None, must_overlap_with_these_sslbls=None)

Bases: ElementaryErrorgenBasis

Spanned by the elementary error generators of given type(s) (e.g. “Hamiltonian” and/or “other”) and with elements corresponding to a Basis, usually of Paulis.

classmethod _create_diag_labels_for_support(cls, support, type_str, nontrivial_bels)
classmethod _create_all_labels_for_support(cls, support, left_support, type_str, trivial_bel, nontrivial_bels)
classmethod _create_ordered_labels(cls, type_str, basis_1q, state_space, mode='diagonal', max_weight=None, must_overlap_with_these_sslbls=None, include_offsets=False)
classmethod _create_ordered_label_offsets(cls, type_str, basis_1q, state_space, mode='diagonal', max_weight=None, must_overlap_with_these_sslbls=None, return_total_support=False)

same as _create_ordered_labels but doesn’t actually create the labels - just counts them to get offsets.

__len__(self)

Number of elementary errorgen elements in this basis

to_explicit_basis(self)
property labels(self)
property elemgen_supports_and_matrices(self)
label_index(self, elemgen_label)

TODO: docstring

create_subbasis(self, must_overlap_with_these_sslbls, retain_max_weights=True)

Create a sub-basis of this basis by including only the elements that overlap the given support (state space labels)

union(self, other_basis)
intersection(self, other_basis)
difference(self, other_basis)