dq.method.Expm
Expm()
Explicit matrix exponentiation to compute propagators.
Explicitly compute the propagators for all time intervals in tsave, then apply
them iteratively. On GPU, all propagators are computed in one batch. On CPU, a
propagator is computed only when it changes, at a discontinuity of the Hamiltonian
or jump operators or for an interval of a different length, and is otherwise
reused. The propagators are applied:
- starting from the initial state for
dq.sesolve()anddq.mesolve(), to compute states for all times intsave, - starting from the identity matrix for
dq.sepropagator()anddq.mepropagator(), to compute propagators for all times intsave.
For the Schrödinger equation with constant Hamiltonian \(H\), the propagator from time \(t_0\) to time \(t_1\) is an \(n\times n\) matrix given by $$ U(t_0, t_1) = \exp(-i (t_1 - t_0) H). $$
For the Lindblad master equation with constant Liouvillian \(\mathcal{L}\), the problem is vectorized and the propagator from time \(t_0\) to time \(t_1\) is an \(n^2\times n^2\) matrix given by $$ \mathcal{U}(t_0, t_1) = \exp((t_1 - t_0)\mathcal{L}). $$
Warning
If the Hamiltonian or jump operators are sparse qarrays, they will be silently converted to dense qarrays before computing their matrix exponentials.
Warning
This method is not recommended for open systems of large dimension, due to the \(\mathcal{O}(n^6)\) scaling of computing the Liouvillian exponential.
Warning
This method only supports constant or piecewise constant Hamiltonian and jump operators.
Supported gradients
This method supports differentiation with
dq.gradient.Direct (default).