pygsti.tools.lindbladtools

Utility functions relevant to Lindblad forms and projections

Module Contents

Functions

hamiltonian_to_lindbladian(hamiltonian, sparse=False)

Construct the Lindbladian corresponding to a given Hamiltonian.

stochastic_lindbladian(q, sparse=False)

Construct the Lindbladian corresponding to stochastic q-errors.

affine_lindbladian(q, sparse=False)

Construct the Lindbladian corresponding to affine q-errors.

nonham_lindbladian(Lm, Ln, sparse=False)

Construct the Lindbladian corresponding to generalized non-Hamiltonian (stochastic) errors.

pygsti.tools.lindbladtools.hamiltonian_to_lindbladian(hamiltonian, sparse=False)

Construct the Lindbladian corresponding to a given Hamiltonian.

Mathematically, for a d-dimensional Hamiltonian matrix H, this routine constructs the d^2-dimension Lindbladian matrix L whose action is given by L(rho) = -1j*sqrt(d)/2*[ H, rho ], where square brackets denote the commutator and rho is a density matrix. L is returned as a superoperator matrix that acts on a vectorized density matrices.

Parameters
  • hamiltonian (ndarray) – The hamiltonian matrix used to construct the Lindbladian.

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

Returns

ndarray or Scipy CSR matrix

pygsti.tools.lindbladtools.stochastic_lindbladian(q, sparse=False)

Construct the Lindbladian corresponding to stochastic q-errors.

Mathematically, for a d-dimensional matrix q, this routine constructs the d^2-dimension Lindbladian matrix L whose action is given by L(rho) = q*rho*q^dag where rho is a density matrix. L is returned as a superoperator matrix that acts on a vectorized density matrices.

Parameters
  • q (ndarray) – The matrix used to construct the Lindbladian.

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

Returns

ndarray or Scipy CSR matrix

pygsti.tools.lindbladtools.affine_lindbladian(q, sparse=False)

Construct the Lindbladian corresponding to affine q-errors.

Mathematically, for a d-dimensional matrix q, this routine constructs the d^2-dimension Lindbladian matrix L whose action is given by L(rho) = q where rho is a density matrix. L is returned as a superoperator matrix that acts on a vectorized density matrices.

Parameters
  • q (ndarray) – The matrix used to construct the Lindbladian.

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

Returns

ndarray or Scipy CSR matrix

pygsti.tools.lindbladtools.nonham_lindbladian(Lm, Ln, sparse=False)

Construct the Lindbladian corresponding to generalized non-Hamiltonian (stochastic) errors.

Mathematically, for d-dimensional matrices Lm and Ln, this routine constructs the d^2-dimension Lindbladian matrix L whose action is given by:

L(rho) = Ln*rho*Lm^dag - 1/2(rho*Lm^dag*Ln + Lm^dag*Ln*rho)

where rho is a density matrix. L is returned as a superoperator matrix that acts on a vectorized density matrices.

Parameters
  • Lm (numpy.ndarray) – d-dimensional matrix.

  • Ln (numpy.ndarray) – d-dimensional matrix.

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

Returns

ndarray or Scipy CSR matrix