What’s tensor network, and what is it good for?
A tensor network is a representation of a physical object as a partially or fully contracted product of many tensors. An example is the partition function of a statistical physical model, in which the tensor product is fully contracted to produce one number, i.e., the partition function. Another example is the tensor network representing a wave function of a quantum many-body system, in which indices specifying basis vectors (“physical indices”) are left uncontracted.
For example, the partition function of the square-lattice Ising model is usually expressed as the summation of a product of many factors of the form \(\exp(-KS_iS_j)\) with respect to the Ising spin variables, \(S_i\). By a simple mathematical transformation, we can re-express this as a contraction of the product of tensors each being defined on a unit square.
A wave function in quantum many-body system can also be expressed as a tensor network. In this case, it is not a partition function but the coefficient of the wave function that the contraction of the tensor product expresses. For example, in the case of \(S=1/2\) Heisenberg model on a square lattice, we often take the simultaneous eigenstates of all the z-components of spin operators. That is, a basis wave function is specified by a set of \(N\) eigenvalues, \((S_1, S_2, \dots, S_N)\), where \(N\) is the total number of spins in the system. While the coefficient is generally expressed as \(C(S_1, S_2, \dots, S_N)\), here we let it be expressed as the contraction of \(N\) tensors, \(T(S_1), T(S_2), \dots, T(S_N)\). We call such a tensor network as TNS (tensor network state) or PEPS (Projected Entangled Pair State). In contrast to the classical example of the Ising model, in this case, we still have unfixed degrees of freedom, \(S_1, S_2, \dots, S_N\), which we call physical indices, even after the contraction. (So, this contraction is partial contraction.) We use these degrees of freedom in the estimation of the expectation values of physical quantities, i.e., we consider two identical tensor networks corresponding to the bra and the ket vectors and contract the two by the physical indices.
These are merely ways of re-expressing things, and not solutions to our problems. However, there are many studies for efficient ways of contracting the tensor networks. The results of such studies are not only published in papers, but also found in some software packages.
Typically, such a package is not a single stand-alone application, but more like API that provides many handy tools for various tensor-network calculations. In this category falls software such as NCON,mptensor,TensorNetwork,ITensor,TeNPy,and Uni10. NCON and mpotensor are specialized in primitive tensor operations, e.g., optimization of the order of the bonds to be contracted in small subnetwork contraction. NCON comes as corrections of MATLAB functions whereas mptensor is a C++ library. In particular, mptensor supports MPI/OpenMP parallelization. TensorNetwork, which is based on TensorFlow, has been efficiently implemented on GPGPU machines. ITensor and TeNPy is particularly useful in dealing with one-dimensional quantum systems, e.g., it comes with a function of mapping a two-dimensional system to a one-dimensional one, in addition to tools for manipulating subnetworks in the forms of MPS and MPO. Uni10, whose main part is written in C++, supports tensor network calculation respecting the symmetry, and provides an interface that makes it possible to use Uni10 tools from python codes.
TeNeS is a stand-alone application for ground state calculation of two dimensional quantum systems. Based on mptensor mentioned above, it achieves higher-level tensor network calculations. In principle, it computes the TNS that approximates ground state of any two dimensional quantum systems. For the same purpose, it may be also a good option to modify one of the many stand-alone example programs associated with the API-like packages discussed above.
In the present small article, we have reviewed the tensor network method from the computational viewpoint. However, the tensor network representation is not only useful as a method of high precision computation but also serves as a framework of developing new concepts, e.g., the real-space renormalization group transformation and characterization of novel quantum state including topological states.