Basic concepts#
Matrix product state (MPS)#
Numerical simulations of quantum many-body systems prove to be hard due to the exponentially growing size of the matrix representation of the system with the number of constituent particles. In particular, if the local Hilbert space for the j-th particle, \(\mathcal{H}_j\), has dimension \(d_j\) (e.g., \(d_j=2\) for a qubit and \(d_j=3\) for a qutrit), then \(N\) sites will have the total Hilbert space \(\mathcal{H} = \bigotimes_{j=0}^{N-1} \mathcal{H}_j\) of dimension \(d = \prod_{j=0}^{N-1} d_j\). Bipartite tensor networks, such as matrix product states, introduce a concept of efficient separation of variables which splits groups of particles performing spectral decomposition, e.g., singular value decomposition (SVD). To form a matrix product state, SVD at first isolates 0-th site from 1-to-(N-1)-th, then 0-to-1 from 2-to-(N-1)-th, and so on until the state is decomposed into a product of N tensors.
A single tensor \(A_j\) is a rank-3 array of size \(D_{j-1,j}{\times}d_j{\times}D_{j,j+1}\), where \(d_j\) is, previously mentioned, dimension of local Hilbert space (or equivalently dimension of local variables) so–called physical dimension and \(D_{j-1,j}\) and \(D_{j,j+1}\) are virtual bond dimensions shared between sites \(j-1\) and \(j\) and between \(j\) and \(j+1\) respectively. The bond dimension is introduced by the spectral decompositon and can be interpreted as dimension encoding correlations between physical tensor variables. An example MPS tensor is shown in the diagram below.
# individual tensor in the MPS
___
A_j = D_{j-1,j}--|___|--D_{j,j+1}
|
d_j
yastn.tn.mps
implements operations on one-dimensional MPS with open boundary conditions.
The schematic picture for general MPS is shown below. Notice that for open boundary conditions,
we always have edge tensor with dimension \(1\times d_0{\times}D_{0,1}\)
on the left edge and \(D_{N-2,N-1}{\times}d_{N-1}{\times}1\) on the right edge, i.e. terminal
bond dimensions are \(D_{-1,0}=1\) and \(D_{N-1,N}=1\).
# MPS for N=5 sites with open boundary conditions
___ ___ ___ ___ ___
1-|___|-D_{0,1}-|___|-D_{1,2}-|___|-D_{2,3}-|___|-D_{3,4}-|___|-1
| | | | |
d_0 d_1 d_2 d_3 d_4
The above discussion presents top-to-bottom construction of the MPS. However, one can also treat MPS as an ansatz, that provides a good approximation of weakly entangled states. The paradigmatic example is energy minimization to find the best approximation of the ground state of a system. The MPS ansatz with fixed virtual dimensions defines the manifold of states we can reach. Virtual bond dimension controls the quality of the approximation, where the exact representation is recovered for \(D_{j,j+1}\rightarrow\infty\).
Note that the construction of MPS requires common virtual spaces to be matching. The MPS can be equipped with symmetries by making its individual tensors symmetric. For symmetric tensors both bond dimensions and blocks have to be matching.
Matrix product operator (MPO)#
Matrix product operator is an efficient representation of an operator acting in the space of \(N\) particles, in general a square matrix of dimension of dimension \(d = \prod_{j=0}^{N-1} d_j\), by a product of \(N\) tensors with two physical and two virtual indices. The concept of MPO is analogous to MPS.
A single tensor is a rank-4 array of size \(D_{j-1,j}{\times}d_j{\times}D_{j,j+1}{\times}d^j\) as depicted below.
# individual tensor in the MPO
d^j
_|_
D_{j-1,j}--|___|--D_{j,j+1}
|
d_j
The physical dimensions \(d_j\) and \(d^j\) represent left (bra) and right (ket) vector spaces. Similar to MPS, the virtual bond dimensions of a tensor are \(D_{j-1,j}\) and \(D_{j,j+1}\) shared between sites \(j-1\) and \(j\) and between \(j\) and \(j+1\) respectively. Those also encode correlations between physical tensor variables. The MPO ansatz is suitable to represent operators, e.g., Hamiltonian, operators of observables, a density matrix, transfer matrices.
yastn.tn.mps
implements operations on one-dimensional MPS with open boundary conditions.
The full MPO is diagrammatically depicted below. Notice, that for open boundary conditions,
terminal bond dimensions are \(D_{-1,0}=1\) and \(D_{N-1,N}=1\).
# MPO for N=5 sites with open boundary conditions
d_0 d_1 d_2 d_3 d_4
_|_ _|_ _|_ _|_ _|_
1-|___|-D_{0,1}-|___|-D_{1,2}-|___|-D_{2,3}-|___|-D_{3,4}-|___|-1
| | | | |
d_0 d_1 d_2 d_3 d_4
The MPO operators can be equipped with fermionic order.
For fermionic operators, swap gates
are used to enforce the correct fermionic ordering.
This allows to ensure antisymmetric nature of fermions and proper commutation relation of the operator.
For reference see P. Corboz and G. Vidal, Phys. Rev. B 80, 165129 (2009)
and P. Corboz et al. Phys. Rev. B 81, 165104 (2010).
Canonical form#
The practical success of matrix product states is closely related to their canonical forms and the possibility to efficiently transform between them. The canonical form is defined with respect to specific position in the MPS. Let us choose to write canonical form with respect to the j-to-j+1-th bond of the MPS. The diagrammatic representation of the MPS in the canonical form for that case is presented below.
# canonical form of the MPS
_________________ ___________________
| | __________________ | |
| L_{0,1\cdots j} |--|_\Lambda_{j,j+1}_|--| R_{j+1\cdots N-1} |
|_________________| |___________________|
|||...| |||...|
{d_0 x d_1...x d_j} {d_{j+1} x...x d_{N-1}}
In the canonical form, the MPS is split as in the Schmidt decomposition (or SVD) resulting in
\(D_{j,j+1}\) pairs of left Schmidt vectors \(|L_{0,1\cdots j}\rangle\) and right Schmidt vectors \(|R_{j+1,j+2\cdots N-1}\rangle\)
weighted by Schmidt values \(\Lambda_{j,j+1}\).
More generally, instead of a diagonal positive matrix \(\Lambda_{j,j+1}\),
one often works with a central matrix (block) \(C_{j,j+1}\) that can be obtained through QR decompositions
decomposition.
Keeping the canonical form we ensure efficient compression and globally optimal truncation of spectral decomposition
for a specific bond.
The left and right Schmidt vectors, forming columns of the matrix \(L_{0,1\cdots j}\) and rows of the matrix \(R_{j+1,j+2\cdots N-1}\) are orthonormal. It implies that the overlaps \(L^\dagger L=I_L\) and \(R R^\dagger=I_R\) (where physical indices are contracted) results in left (right) identity matrices \(I_{L(R)}\) on virtual indices. Canonical decomposition is also an integral element of every MPS algorithm, including energy minimization with DMRG or time evolution with TDVP allowing to avoid treating the state norm operator explicitely and allowing for optimal truncation.
If the right and left overlaps involve part of the MPS, we say it is in a mixed canonical form with respect to a bond. On the other hand, itf for every MPS tensor, the left environment is unitary, i.e., for corresponding left vectors \(L_j^\dagger L_j=I_L\) on virtuals, then we say that MPS is in the left canonical form. Similarly is the same holds for right environment then we say that MPS is in the right canonical form.
Note
In yastn.tn.mps
we refer to 0-th site as 'first'
, and N-1-th site as 'last'
.
Namely, left-canonical MPS is canonized to the last site, and right-canonical MPS is canonized to the first site.
Algorithms#
Density matrix renormalization group (DMRG) is an algorithm searching for the MPS which extremizes the expectation value of the hermitian operator written as MPO, usually the Hamiltonian.
Time-dependent variational principle (TDVP) allows for a variational approximation of the evolution of a state \(\Psi(0)\) under a Hamiltonian \(\hat H\), \(\Psi(t)=e^{- u t \hat H} \Psi(0)\). TDVP can be performed for the evolution of MPS under MPO for a time t, where u is real or imaginary unit.
Measurements#
Scalar product \(\langle\Phi|\Psi\rangle\), written in bra-ket notation, where \(|\Psi\rangle\) is the MPS and \(\langle\Phi|\) is a conjugation of the MPS. This overlap can be calculated for an arbitrary pair of vectors of matching physical indices. After contracting physical and virtual indices, an overlap gives a scalar value.
# overlap between MPS \Psi and conjugate MPS \Phi^\dagger
___ ___ ___ ___ ___
\Psi = |___|--|___|--|___|--|___|--|___|
| | | | |
_|_ _|_ _|_ _|_ _|_
\Phi^\dagger = |___|--|___|--|___|--|___|--|___|
The expectation value of operator \(\hat O\) is calculated as \(\langle\Psi|\hat O|\Psi\rangle\). The overlap can be efficiently calculated for any pair of vectors and operator in the MPO form, \(\langle\Phi|\hat O|\Psi\rangle\), provided they are consistent along physical indices.
# overlap between MPS \Psi and conjugate MPS \Phi^\dagger and MPO \hat O
___ ___ ___ ___ ___
\Psi = |___|--|___|--|___|--|___|--|___|
| | | | |
_|_ _|_ _|_ _|_ _|_
\hat O = |___|--|___|--|___|--|___|--|___|
| | | | |
_|_ _|_ _|_ _|_ _|_
\Phi^\dagger = |___|--|___|--|___|--|___|--|___|