pygsti.tools.lindbladtools.create_elementary_errorgen_pauli

pygsti.tools.lindbladtools.create_elementary_errorgen_pauli#

create_elementary_errorgen_pauli(typ, p, q=None, sparse=False, normalized_paulis=False)#

Construct an elementary error generator as a matrix in the “standard” (matrix-unit) basis. Specialized to the case where p and q are elements of the pauli basis.

There are four different types of 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 * [ p, rho ] Stochastic: L(rho) = p * rho * p - rho Correlation: L(rho) = p * rho * q + q * rho * p - 0.5 {{p,q}, rho} Active: L(rho) = 1j( p * rho * q - q * rho * p + 0.5 {[p,q], rho} )

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 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.

  • normalized_paulis (bool, optional) – Whether p (and q) are normalized Pauli-basis elements (scaled so that Tr(P^2) = 1) rather than the unnormalized convention (P^2 = I). When True, the trace-preserving correction term of the ‘S’ (stochastic) generator is scaled by 1/d so the generator stays consistent with the normalized basis. Only affects ‘S’-type generators; the H/C/A constructions already scale correctly with p/q.

Return type:

ndarray or Scipy CSR matrix