pygsti.tools.lindbladtools.create_elementary_errorgen

pygsti.tools.lindbladtools.create_elementary_errorgen#

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

Construct an elementary error generator as a matrix in the “standard” (matrix-unit) 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^dag - 0.5*{p^dag p, rho} Correlation: L(rho) = p * rho * q^dag + q * rho * p^dag - 0.5 {(p^dag @ q + q^dag @ p), rho} Active: L(rho) = 1j( p * rho * q^dag - q * rho * p^dag + 0.5 {(p^dag @ q - q^dag @ p)), 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.

Return type:

ndarray or Scipy CSR matrix