pygsti.tools.optools.elementary_errorgens

pygsti.tools.optools.elementary_errorgens#

elementary_errorgens(dim, typ, basis)#

Compute the elementary error generators of a certain type.

Parameters:
  • dim (int) – The dimension of the error generators to be returned. This is also the associated gate dimension, and must be a perfect square, as sqrt(dim) is the dimension of density matrices. For a single qubit, dim == 4.

  • typ ({'H', 'S', 'C', 'A'}) – The type of error generators to construct.

  • basis (Basis or str) – Which basis is used to construct the error generators. Note that this is not the basis of the returned error generators (which is always the ‘std’ matrix-unit basis) but that used to define the different elementary generator operations themselves.

Returns:

generators – An array of shape (#basis-elements,dim,dim). generators[i] is the generator corresponding to the ith basis matrix in the std (matrix unit) basis. (Note that in most cases #basis-elements == dim, so the size of generators is (dim,dim,dim) ). Each generator is normalized so that as a vector it has unit Frobenius norm.

Return type:

numpy.ndarray