Utility functions relevant to Lindblad forms and projections

Module Contents¶

Functions¶

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

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

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

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