pygsti.tools.lindbladtools.create_elementary_errorgen_dual_pauli

pygsti.tools.lindbladtools.create_elementary_errorgen_dual_pauli#

create_elementary_errorgen_dual_pauli(typ, p, q=None, sparse=False)#

Construct a “dual” elementary error generator matrix in the “standard” (matrix-unit) basis. Specialized to p and q being elements of the (unnormalized) pauli 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 Correlation: L(rho) = 1/(2d^2) ( p * rho * q + q * rho * p) Active: L(rho) = 1j/(2d^2) ( p * rho * q - q * rho * p)

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.

Return type:

ndarray or Scipy CSR matrix