hqs_quantum_solver.lindblad#

Implementation of the Lindblad equation.

Classes

Lindbladian(M, hamiltonian, gamma_z, ...[, ...])

The operator \(\mathcal{L}\) of the Lindblad equation.

class Lindbladian(M: int, hamiltonian: SpinOperatorProtocol, gamma_z: ndarray, gamma_p: ndarray, gamma_m: ndarray, spin_operator: Callable[[SpinInput], SpinOperatorProtocol] = SpinOperatorEigen)#

The operator \(\mathcal{L}\) of the Lindblad equation.

The Lindblad equation is given by

\[\newcommand{\iu}{\mathrm{i}} \iu \hbar \dot\rho(t) = \mathcal{L}\rho(t) \,,\]

where

\[\begin{split}\begin{aligned} \mathcal{L}\rho = [H, \rho] &+ \iu \hbar \sum_{i=0}^{M-1} \sum_{j=0}^{M-1} \gamma_{ij}^z \big( S^z_i \rho S^z_j - \tfrac12 S^z_j S^z_i \rho - \tfrac12 \rho S^z_j S^z_i \big) \\ &+ \iu \hbar \sum_{i=0}^{M-1} \sum_{j=0}^{M-1} \gamma_{ij}^+ \big( S^+_i \rho S^-_j - \tfrac12 S^-_j S^+_i \rho - \tfrac12 \rho S^-_j S^+_i \big) \\ &+ \iu \hbar \sum_{i=0}^{M-1} \sum_{j=0}^{M-1} \gamma_{ij}^- \big( S^-_i \rho S^+_j - \tfrac12 S^+_j S^-_i \rho - \tfrac12 \rho S^+_j S^-_i \big) \,. \end{aligned}\end{split}\]

The computation is carried out in units where \(\hbar = 1\).

Lindbladian constructor.

Parameters:
  • M (int) – The number of sites in the system.

  • hamiltonian (SpinOperatorProtocol) – The underlying Hamiltonian \(H\).

  • gamma_z (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^z\) coefficient matrix. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • gamma_p (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^+\) coefficients. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • gamma_m (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^-\) coefficients. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • spin_operator (Callable[[SpinInput], SpinOperatorProtocol]) – Callable creating the spin operator.

property Sz: int#

Implements SpinProtocol.Sz().

__init__(M: int, hamiltonian: SpinOperatorProtocol, gamma_z: ndarray, gamma_p: ndarray, gamma_m: ndarray, spin_operator: Callable[[SpinInput], SpinOperatorProtocol] = SpinOperatorEigen) None#

Lindbladian constructor.

Parameters:
  • M (int) – The number of sites in the system.

  • hamiltonian (SpinOperatorProtocol) – The underlying Hamiltonian \(H\).

  • gamma_z (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^z\) coefficient matrix. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • gamma_p (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^+\) coefficients. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • gamma_m (ndarray, shape (M,) | ndarray, shape (M,M)) – The \(\gamma^-\) coefficients. When a vector is given, the argument is interpreted as the diagonal elements of a diagonal matrix.

  • spin_operator (Callable[[SpinInput], SpinOperatorProtocol]) – Callable creating the spin operator.

apply_von_neumann(rho: ndarray) ndarray#

Apply operator from the von Neumann equation.

Computes

\[\rho \mapsto \left[ H, \rho \right] \,.\]
Parameters:

rho (ndarray, shape (n,n)) – The density matrix to which the operator is applied to.

Returns:

The result of applying the operator to the density matrix rho.

Return type:

ndarray, shape (n, n)

dot(v: ndarray, out: ndarray | None = None) ndarray#

Implements SimpleOperatorProtocol.dot().

dot_add(v: ndarray, out: ndarray, z: float | complex = 1.0) None#

Implements SimpleOperatorProtocol.dot_add().

property hamiltonian: SpinOperatorProtocol#

The underlying Hamiltonian \(H\).

property mod_Sz: int#

Implements SpinProtocol.mod_Sz().

property shape: tuple[int, int]#

Implements SimpleOperatorProtocol.shape().

property spin_representation: int#

Implements SpinProtocol.spin_representation().