A pedagogical realization of MPS method.
"A pedagogical realization of MPS method."
from AutoMPO.class_fsa import fsa
from AutoMPO.class_named_data import named_data
from AutoMPO.opr_pool import GenSpinOpr
from vMPS.class_mps import mps
if __name__ == "__main__":
# model parameter
N = 5
J = 1.0
g = 0.5
# define operator with a string as name
Sz = named_data('Sz', GenSpinOpr('Sz'))
Sx = named_data('Sx', GenSpinOpr('Sx'))
# construct finite state automata
fsa = fsa(N)
for i in range(0, N):
# add each term in the Hamiltonian
if (i < N - 1):
fsa.Add(J, [Sz, Sz], [i, i + 1])
fsa.Add(g, [Sx], [i])
# use the constructed fsa to generate MPO
list_mpo = fsa.GenMPO()
# visualize MPO represented by operator symbols
fsa.PrintSymbolMPO()
# vMPS/DMRG
D = 4
# construct mps
mps0 = mps(N, D, list_mpo)
# variation
E0, counter = mps0.vMPS(cvg=1e-9, if_print=True, update_sites=2)
Matrix product state (MPS) method is a series of powerful algorithms developed to solve a class of Hamiltonians with local interactions, based on the ansatz of “low entanglement”, or “area-law entanglement” precisely. MPS is the 1-dimensional case of tensor network, which plays a central role in modern quantum physics and beyond.
I would like to describe MPS in a nutshell as follows:
This repository is dedicated to provide an easy-to-understand implementation of MPS method. A number of ASCII sketches of tensors are presented in the comments to improve readability.
This repository will be updated continually in the near future (07/05/2021).
The author highly acknowledge the guidance from Professor Shuo Yang and her instructive course "Selected Topics in Computational Quantum Physics" in Tsinghua University.