Recent Changes - Search:




Calculate the time evolution of a finite MPS using the TDVP algorithm.


mp-tdvp -w <input-psi> -t <timestep> [options]



Show help message.

-H, --Hamiltonian

The Hamiltonian operator to use for the time evolution (defaults to the EvolutionHamiltonian or Hamiltonian wavefunction attribute).

-w, --wavefunction

The initial wavefunction (required).

-o, --output

Prefix for output files (defaults to the Prefix wavefunction attribute or the initial wavefunction name).

-t, --timestep

The evolution timestep, which can be complex (required).

-n, --num-timesteps

The number of timesteps to calculate (default 1).

-s, --save-timesteps

Save the wavefunction every s timesteps (if s = 0, then only save the final wavefunction).


The maximum number of iterations to use for the Lanczos algorithm for evolving each local matrix (default 10).


The error tolerance for the Lanczos algorithm (default 1e-16).


The minimum number of states to keep, i.e. the minimum bond dimension (default 2).

-m, --max-states

The maximum number of states to keep, i.e. the maximum bond dimension (default 100000).

-r, --trunc

The truncation error cutoff threshold (alternative to -d).

-d, --eigen-cutoff

The eigenvalue cutoff threshold (for bond expansion in 1TDVP or truncations in 2TDVP).
Specify this option to enable bond expansion for single-site TDVP.

-2, --two-site

Use two-site TDVP instead of single-site TDVP.


Calculate the error measures {$\epsilon_1^2$} and {$\epsilon_2^2$} (i.e. the single-site and two-site variances).

-c, --composition

The timestep composition scheme to use (use --help to show the available compositions, and use -v to get their values).


For time-dependent Hamiltonians, use this variant of the Magnus expansion (currently, only a second-order 2 and a fourth-order 4 expansion are implemented).


For time-dependent Hamiltonians, use this string to represent the time variable (default t).

-v, --verbose

Increase verbosity.



This program calculates the time evolution of a finite MPS using the time-dependent variational principle (TDVP), following Ref. [1]. By the TDVP, the RHS of the Schrödinger equation {$$\frac{\mathrm{d}}{\mathrm{d}t} |\Psi\rangle = -\mathrm{i} H |\Psi\rangle$$} is orthogonally projected onto the tangent space of the manifold of MPSs (we write this projection as {$P_T$}). This provides the ‘optimal’ evolution of {$|\Psi\rangle$} as an MPS with fixed bond dimensions, and is symplectic for real time evolution (when evaluated exactly), exactly conserving the energy of the state and other conserved quantities which are written as the sum of single-site operators.

To evaluate the TDVP numerically, we write the projected Hamitonian {$P_TH$} as a sum of local terms, and perform a Lie–Trotter decomposition of the evolution operator {$\exp(-\mathrm{i}P_TH \Delta t)$} into a product of single-site operators. The state is then evolved by a single timestep by sequentially evolving each tensor in the MPS using the Lanczos algorithm in a right-to-left sweep, followed by a left-to-right sweep, similar to DMRG (in fact, this algorithm is identical to DMRG when performing imaginary time evolution and taking the timestep to infinity).

The main advantage of TDVP over TEBD? is that TDVP can handle long-range interactions. TDVP also has ‘useful’ symplectic properties which ensure the conservation of energy and conserved quantities which are sums of single-site operators (to within a small margin of numerical precision). However, the usefulness of these properties is somewhat misleading, since exactly preserving the energy does not in any way imply that the overall evolution of the state will be any better than, say, TEBD, which does not have this quasi-exact conservation.

Error Measures

While TDVP provides the ‘optimal’ time evolution restricted to the manifold of MPSs with a specific bond dimension, there is often a significant projection error associated with this evolution, given by {$$\|(I-P_T)H |\Psi\rangle \|^2 = \Delta H^2 - \|P_TH|\Psi\rangle\|^2,$$} where {$\Delta H^2$} is the energy variance.

To estimate this error efficiently, we can use the two-site variance proposed in Ref. [2], which is defined by using projections {$P_n$} onto a hierarchy of subspaces spanned by the {$n$}-site variations of a MPS {$|\Psi\rangle$} orthogonal to all {$(n-1)$}-site variations ({$P_1$} is the same as the projection {$P_T$} defined above). The full energy variance can then be written as the sum {$$\Delta H^2 = \sum_{n=1}^N \epsilon_n^2,\qquad \epsilon_n \equiv \|P_nH|\Psi\rangle\|^2,$$} where {$N$} is the range of the longest interaction in the Hamiltonian. Ref. [2] argues that the two-site variance, obtained by truncating this sum at {$n=2$}, provides a useful error estimate with similar properties to the variance when solving for the ground state.

When finding the ground state with imaginary time evolution, {$\epsilon_1$} goes to zero as {$|\Psi\rangle$} reaches the optimum state for a given bond dimension, while {$\epsilon_2$} estimates how close the optimum state for a specific bond dimension is to the actual ground state. For time evolution, {$\epsilon_2$} gives an estimation to the projection error. (However, this is not always a good estimation for some corner cases, e.g. if we look at a spin chain with only next-nearest neighbour interactions and start with a product state, the value of {$\epsilon_2$} will be zero, but {$\epsilon_3$} will be nonzero, indicating that the source of the projection error comes from the three-site orthogonal tangent space, and not the two-site tangent space.)

The calculation of these quantities can be enabled with the --epsilon option.

Bond Expansion

In order to obtain a more accurate evolution than the fixed-bond-dimension evolution described above, we need to be able to increase the bond dimensions during the time evolution. One method to do this is to use two-site TDVP (2TDVP) [1], in which the local evolutions act on two adjacent tensors at once, allowing us to have a larger final bond dimension after splitting the evolved tensors using an SVD. (This is equivalent to replacing the projection {$P_1$} used for single-site TDVP (1TDVP) with {$P_1+P_2$}, thus reducing the projection error.)

However, since 2TDVP requires evolving two-site blocks, it is significantly slower than 1TDVP, especially for systems with large local dimensions. A better method is to use single-site TDVP, but expand the bonds before performing the time evolution simulation. We do this by constructing an ‘expansion matrix’, which is then truncated to provide the extra states before performing the time evolution step. By specifying a singular-value threshold using -d, we can control how many extra states will be added: a smaller value of -d will mean more states will be added per timestep. The singular values of this ‘expansion matrix’ are roughly proportional to how important they are for the time evolution. (Note that this expansion matrix, and thus its singular values, has units of energy, and so it will have to be scaled depending on the problem.)

By default, the program will not use bond expansion: to enable bond expansion, specify the truncation threshold using -d.

Composition Schemes

While evolving an MPS by a single right-to-left sweep is only first-order integrator with respect to the timestep, composing it with its adjoint (i.e. a left-to-right sweep) gives us a symmetric second-order integrator. Hence, if we wish to reduce the timestep error further, we could look at higher-order compositions of this first-order integrator [1,3]. A few higher-order compositions have been implemented in this program, and can be set using -c (the available compositions can be listed using --help).


For an example of how to use the mp-tdvp tool, you can read the TDVP HOWTO document.


[1] J. Haegeman et al., Unifying time evolution and optimization with matrix product states, Phys. Rev. B 94, 165116 (2016), doi:10.1103/PhysRevB.94.165116, arXiv:1408.5056.
[2] C. Hubig et al., Error estimates for extrapolations with matrix-product states, Phys. Rev. B 97, 045125 (2018), doi:10.1103/PhysRevB.97.045125, arXiv:1711.01104.
[3] E. Hairer, C. Lubich, and G. Wanner, Geometric Numerical Integration: Structure Preserving Algorithms for Ordinary Differential Equations, 2nd ed., Springer Series in Computational Mathematics, Vol. 31 (Springer, 2006).
Edit - History - Print - Recent Changes - Search
Page last modified on October 25, 2023, at 07:30 AM