Matrix Exponentials Numerically
Matrix exponentials appear whenever a finite-dimensional linear system is solved exactly over a time interval. In quantum mechanics, the central example is time-independent Schrödinger evolution:
The mathematical definition of matrix functions is reviewed in Matrix Functions and Exponentials. This page focuses on numerical choices: diagonalization, scaling and squaring, and Krylov methods for applying an exponential to a vector.
Full Exponential Versus Action
Section titled “Full Exponential Versus Action”There are two different computational tasks:
- form the full matrix ;
- compute the action on one or more vectors.
For large quantum systems, the second task is usually the right one. Even if is sparse, is usually dense. Forming the full exponential can destroy the memory advantage of Sparse Matrices.
Time evolution of a state usually needs
not the full matrix .
Exact Diagonalization Approach
Section titled “Exact Diagonalization Approach”If a Hermitian Hamiltonian is small enough to diagonalize densely, write
Then
This method is accurate and transparent when the full spectrum is already available. It is also a useful benchmark for smaller versions of a problem.
The cost is the dense eigensolve and the storage of eigenvectors. For large sparse Hamiltonians, diagonalizing the whole matrix just to propagate one state is usually wasteful.
General Diagonalizable Matrices
Section titled “General Diagonalizable Matrices”For a diagonalizable non-Hermitian matrix,
This formula is mathematically simple but can be numerically dangerous when is ill conditioned. Non-normal matrices can have sensitive eigenvectors and large transient behavior even when their eigenvalues look harmless.
For closed quantum systems with Hermitian , the unitary diagonalization is much better conditioned than a generic eigenvector decomposition. For non-Hermitian effective Hamiltonians, absorbing layers, and Liouvillians, eigenvector conditioning must be treated seriously.
Scaling and Squaring
Section titled “Scaling and Squaring”Scaling and squaring is a standard dense-matrix method for computing . Choose an integer so that has a manageable norm, approximate accurately, and then square repeatedly:
The small exponential is often approximated by a Padé approximant. This is the basis of robust general-purpose matrix exponential routines.
Scaling and squaring is excellent for moderate dense matrices when the full matrix exponential is required. It is less attractive when is huge and sparse but only is needed, because repeated squaring tends to create dense matrices.
Krylov Exponential Action
Section titled “Krylov Exponential Action”For large sparse quantum Hamiltonians, a common goal is to approximate without forming . Build a Krylov subspace
Let be an orthonormal basis for this subspace, with first vector
Project to the smaller matrix
Then approximate
where is the first coordinate vector. The small exponential can be computed densely, because is much smaller than the full dimension.
This is the exponential-action analogue of the Krylov ideas in Sparse Eigensolvers. The difference is that here the goal is a time-evolved vector, not selected eigenpairs.
Lanczos for Hermitian Hamiltonians
Section titled “Lanczos for Hermitian Hamiltonians”For quantum real-time evolution with Hermitian ,
is anti-Hermitian. A Lanczos basis built from gives a small Hermitian projected Hamiltonian . The Krylov approximation becomes
Because is Hermitian, the small exponential is unitary inside the Krylov subspace. The remaining error is truncation error from using a finite Krylov dimension and any loss of orthogonality in finite precision.
Time Evolution and Unitarity
Section titled “Time Evolution and Unitarity”If is Hermitian, the exact propagator
is unitary. Numerically, one should monitor
and physically relevant observables. Norm preservation alone is not enough, but norm drift is an immediate warning for closed-system dynamics.
The general time-step context is Time-Stepping Methods. Matrix exponential actions are one way to build a time step with better structural behavior than generic explicit methods.
Time-Dependent Hamiltonians
Section titled “Time-Dependent Hamiltonians”When changes during the step, the exact evolution is time ordered. A common approximation freezes or samples the Hamiltonian over a short interval:
This midpoint exponential can be useful, but it is not the full time-ordered solution unless commutator effects are negligible. If
then decreasing and comparing with a time-ordering-aware method is essential. See Time Ordering.
Conditioning and Error
Section titled “Conditioning and Error”The matrix exponential can be sensitive to perturbations, especially for non-normal matrices. Two matrices with nearby entries can have exponentials that differ substantially over long times or in strongly non-normal problems.
For anti-Hermitian quantum generators, the exact exponential has norm in the Hilbert-space norm. This helps, but it does not remove discretization error, Krylov truncation error, roundoff error, or time-dependent approximation error.
Useful diagnostics include:
- norm drift for closed-system states;
- residual or error estimates from the exponential-action routine;
- convergence under Krylov dimension or tolerance changes;
- convergence under time-step refinement;
- comparison with dense diagonalization on a smaller problem;
- conservation of energy for time-independent ;
- sensitivity to basis, grid, and boundary choices.
Choosing a Method
Section titled “Choosing a Method”| Task | Common method | Main caution |
|---|---|---|
| small Hermitian , many times | dense diagonalization | full eigenvector storage |
| moderate dense general | scaling and squaring | non-normal sensitivity |
| large sparse , one state | Krylov exponential action | truncation and orthogonality |
| many right-hand sides | block Krylov or reuse structure | memory growth |
| time-dependent | short-step exponential or Magnus-type method | time ordering |
No method removes the need for physical convergence checks. The numerical exponential solves the finite matrix problem; it does not prove that the finite matrix is the right approximation to the continuum system.
Common Mistakes
Section titled “Common Mistakes”- Forming when only is needed.
- Assuming is sparse because is sparse.
- Using a non-Hermitian eigenvector decomposition without checking conditioning.
- Treating norm conservation as a complete accuracy test.
- Ignoring time ordering for a time-dependent Hamiltonian.
- Comparing long-time wavefunctions without separating global phase, relative phase, and shape errors.
- Forgetting that dense diagonalization solves the finite matrix exactly only after discretization errors have already entered.
- Using a Krylov dimension that is too small for the time step or spectral width.
Cross-Links
Section titled “Cross-Links”- Matrix Functions and Exponentials
- Time-Stepping Methods
- Matrix Diagonalization
- Sparse Matrices
- Sparse Eigensolvers
- Conditioning and Stability
- Floating-Point Arithmetic
- Unitary Operators
- Time-Evolution Operator
- Time Ordering
- Unitary Time Evolution
References
Section titled “References”- N. J. Higham, Functions of Matrices: Theory and Computation, SIAM, 2008.
- A. H. Al-Mohy and N. J. Higham, “Computing the action of the matrix exponential, with an application to exponential integrators”, SIAM Journal on Scientific Computing 33, 488-511, 2011.
- R. B. Sidje, “Expokit: A software package for computing matrix exponentials”, ACM Transactions on Mathematical Software 24, 130-156, 1998.
- Y. Saad, Numerical Methods for Large Eigenvalue Problems, revised ed., SIAM, 2011.
- G. H. Golub and C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins University Press, 2013.
- D. J. Tannor, Introduction to Quantum Mechanics: A Time-Dependent Perspective, University Science Books, 2007.
Exercises
Section titled “Exercises”- Let be Hermitian diagonalization. Derive the formula for .
Solution
Using the power series and ,
Therefore
Since is diagonal, is diagonal with entries .
- Show that if , then is unitary.
Solution
For an anti-Hermitian ,
Because commutes with ,
- Why is often a better target than for a large sparse Hamiltonian?
Solution
The state update needs only the action of the exponential on the current state. The full matrix exponential is usually dense even when is sparse, so forming it can be far more expensive in memory and time. Krylov action methods exploit sparse matrix-vector products and avoid constructing the dense propagator.
- In the Krylov approximation , what is the role of the small matrix ?
Solution
is the projection of the large matrix onto the Krylov subspace. The exponential is computed on this small matrix and then lifted back with . The approximation is accurate when the Krylov subspace captures the part of the dynamics generated by repeatedly applying to .