pygsti.tools.optools.elementary_errorgens_dual#
- elementary_errorgens_dual(dim, typ, basis)#
Compute the set of dual-to-elementary error generators of a given type.
These error generators are dual to the elementary error generators constructed by
elementary_errorgens().- 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