pygsti.tools.lindbladtools.create_elementary_errorgen_dual

pygsti.tools.lindbladtools.create_elementary_errorgen_dual#

create_elementary_errorgen_dual(typ, p, q=None, sparse=False, normalization_factor='auto')#

Construct a “dual” elementary error generator matrix in the “standard” (matrix-unit) basis.

The elementary error generator that is dual to the one computed by calling create_elementary_errorgen() with the same argument. This dual element can be used to find the coefficient of the original, or “primal” elementary generator. For example, if A = sum(c_i * E_i), where E_i are the elementary error generators given by create_elementary_errorgen()), then c_i = dot(D_i.conj(), A) where D_i is the dual to E_i.

There are four different types of dual elementary error generators: ‘H’ (Hamiltonian), ‘S’ (stochastic), ‘C’ (correlation), and ‘A’ (active). See arxiv:2103.01928. Each type transforms an input density matrix differently. The action of an elementary error generator L on an input density matrix rho is given by:

Hamiltonian: L(rho) = -1j/(2d^2) * [ p, rho ] Stochastic: L(rho) = 1/(d^2) p * rho * p^dag Correlation: L(rho) = 1/(2d^2) ( p * rho * q^dag + q * rho * p^dag) Active: L(rho) = 1j/(2d^2) ( p * rho * q^dag - q * rho * p^dag)

where d is the dimension of the Hilbert space, e.g. 2 for a single qubit. Square brackets denotes the commutator and curly brackets the anticommutator. L is returned as a superoperator matrix that acts on vectorized density matrices.

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

  • p (numpy.ndarray) – d-dimensional basis matrix.

  • q (numpy.ndarray, optional) – d-dimensional basis matrix; must be non-None if and only if typ is ‘C’ or ‘A’.

  • sparse (bool, optional) – Whether to construct a sparse or dense (the default) matrix.

  • normalization_factor (str or float, optional (default 'auto')) – String or float specifying the normalization factor to apply. If a string the options are ‘auto’ and ‘auto_return’, which both use the corresponding (primal) elementary error generator to calculate this automatically and only differ in whether they return this normalization factor. If a float, the reciprocal of the input value is used directly.

Return type:

ndarray or Scipy CSR matrix