Example codes: VUMPS

Please look at the readme page if you have not done so already. Here we present an implementation of the variational uniform matrix product states (VUMPS) algorithm, which performs variational energy minimization to find an approximation to the ground state of an infinite 1D quantum system described by a nearest-neighbor Hamiltonian.  

The network contractions required for this algorithm (illustrated in the tutorial below) were created using TensorTrace. Click the button below to download the TensorTrace project save file containing these networks (change extension to .ttp before loading).

Code Language:
Python

VUMPS algorithm tutorial (or jump to completed code)

Section 1: The infinite MPS ansatz
Fig.1: 

The VUMPS algorithm makes use of an infinite MPS, which describes a quantum state on an infinite 1D lattice. 

  • we use an MPS with a 1-site unit cell, which has been gauged to have a single center of orthogonality, where `AL` and `AR` are isometries from the left and right respectively.

  • the center of orthogonality is either focused on a link, with singular weights `C`, or on a central tensor `AC`.

  • we call the local dimension as `d` (i.e. the dimension of the Hilbert space associated to each lattice site) and the MPS bond dimension as `m`.

Section 2: Contraction of the MPS with a local Hamiltonian
Fig.2: (i) 
+
(ii) 
+

An important part of the VUMPS is the contraction of the Hamiltonian against the MPS. Given that the system is infinite, this contraction cannot be performed directly. Instead we find the block Hamiltonians `HL` and `HR` that are the fixed points of the contractions in Fig.2(i) and Fig.2(ii), which represent the limit of contracting the Hamiltonian from the infinite boundaries.

  • before contracting, one needs to shift the spectrum of coupling `h`, adding an appropriate contribution of the identity operator in order to ensure the energy density is zero. Otherwise, the ground energy is extensive and the block Hamiltonians `HL` and `HR` will not converge.

  • the fixed point block Hamiltonians `HL` and `HR` can be solved using a gmres (generalized minimal residual method) as demonstrated below.

Section 3: Updating the singular weights
Fig.3: 
+
+

After contracting for the left/right block Hamiltonians `HL` and `HR` we are then able to update the singular weights `C`, which should be chosen as the smallest algebraic (i.e. lowest energy) eigenvectors of the Hamiltonian contraction depicted in Fig.3.

  • in practice, the most efficient way to solve for eigenvector `C` is to define a linear operator representing the contraction in Fig.3, and then to pass this to the `eigsh` routine.

  • after finding the new `C` matrix we also perform a gauge transformation to bring `C` into diagonal form (although this step is optional). 

Section 4: Updating the central tensor `AC`
Fig.4(i): 
(ii): 
=
=

We now turn to the problem of updating the central MPS tensor `AC`. First we are required two additional Hamiltonian terms `hL_mid` and `hR_mid` as shown in Fig.4. 

Fig.5: 
+
+
+

The new central MPS tensor `AC` can be found by solving an eigenvalue problem involving the Hamiltonian terms `HL`, `hL_mid`, `hR_mid` and `HR`, as shown in Fig.5.

  • again, in practice, the most efficient way to solve for eigenvector `AC` is to define a linear operator representing the contraction in Fig.5, and then to pass this to the `eigsh` routine.

Section 5: Updating left/right MPS tensors `AL` and `AR`

Given the updated weights `C` and central tensor `AC`, we are now able to update the left/right gauged MPS tensors `AL` and `AR`, which can be accomplished using either a polar decomposition or a singular value decomposition as demonstrated below.

Section 6: Putting everything together 

The VUMPS algorithm begins with a randomly initialized MPS and then iterates the steps described in Sects.2-5 until the energy is sufficiently converged.

Notes:

  • in practice, it is most efficient to first converge an MPS of small dimension `m` and then to reconverge for larger `m` (padding tensors with zeros) until the desired accuracy is reached.

  • the `tol` fields of the `gmres` and `eigsh` solvers may need to be adjusted according to the desired accuracy of the MPS approximation to the ground state. 

 
VUMPS optimization algorithm (function):
Initialization script:
'mainVUMPS' benchmark:

Method: VUMPS for an MPS of bond dimension χ = 64

Test problem: 1D anti-ferromagnetic Heisenberg model (on an infinite lattice)

Running time: approx 10 seconds

Quantities computed: ground energy density

Typical results:

Error in ground energy density (VUMPS): approx 4e-6

Site maintained by:

Glen Evenbly (www.glenevenbly.com)

Email: contact@tensors.net