truncation

  • full name: tenpy.algorithms.truncation

  • parent module: tenpy.algorithms

  • type: module

Classes

TruncationError([eps, ov])

Class representing a truncation error.

Functions

svd_theta(theta, trunc_par[, qtotal_LR, …])

Performs SVD of a matrix theta (= the wavefunction) and truncates it.

truncate(S, trunc_par)

Given a Schmidt spectrum Y, determine which values to keep.

Module description

Truncation of Schmidt values.

Often, it is necessary to truncate the number of states on a virtual bond of an MPS, keeping only the state with the largest Schmidt values. The function truncation() picks exactly those from a given Schmidt spectrum \(\lambda_a\), depending on some parameters explained in the doc-string of the function.

Further, we provide TruncationError for a simple way to keep track of the total truncation error.

The SVD on a virtual bond of an MPS actually gives a Schmidt decomposition \(|\psi\rangle = \sum_{a} \lambda_a |L_a\rangle |R_a\rangle\) where \(|L_a\rangle\) and \(|R_a\rangle\) form orthonormal bases of the parts left and right of the virtual bond. Let us assume that the state is properly normalized, \(\langle\psi | \psi\rangle = \sum_{a} \lambda^2 = 1\). Assume that the singular values are ordered descending, and that we keep the first \(\chi_c\) of the initially \(\chi\) Schmidt values.

Then we decompose the untuncated state as \(|\psi\rangle = \sqrt{1-\epsilon}|\psi_{tr}\rangle + \sqrt{\epsilon}|\psi_{tr}^\perp\rangle\) where \(|\psi_{tr}\rangle = \frac{1}{\sqrt{1-\epsilon}} \sum_{a < \chi_c} \lambda_a|L_a\rangle|R_a\rangle\) is the truncated state kept (normalized to 1), \(|\psi_{tr}^\perp\rangle = \frac{1}{\sqrt{\epsilon}} \sum_{a >= \chi_c} \lambda_a |L_a\rangle|R_a\rangle\) is the discarded part (orthogonal to the kept part) and the truncation error of a single truncation is defined as \(\epsilon = 1 - |\langle \psi | \psi_{tr}\rangle |^2 = \sum_{a >= \chi_c} \lambda_a^2\).

Warning

For imaginary time evolution (e.g. with TEBD), you try to project out the ground state. Then, looking at the truncation error defined in this module does not give you any information how good the found state coincides with the actual ground state! (Instead, the returned truncation error depends on the overlap with the initial state, which is arbitrary > 0)

Warning

This module takes only track of the errors coming from the truncation of Schmidt values. There might be other sources of error as well, for example TEBD has also an discretisation error depending on the chosen time step.

Todo

The TEBD wikipedia article (in the section ‘Errors coming from the truncation of the Hilbert space’) claims that there is a second more subtle error, which stems from the change of the Schmidt basis \(|R_a\rangle\) on bond i-1 if we truncate bond i. In the end, that leads just to a factor of 2 in TruncationError.__init__ ??? (I couldn’t follow the argument completely, and the factor was definetly not included in the old TenPy.)