There are two versions of code: Python version (MPScumulant.py) and Matlab version (in the matlab_code directory).
- Class
MPS_c
is defined inMPScumulant.py
.
With a cache for left environments and right environments, it is efficient in DMRG-2.
There's a problem in numpy.linalg.svd
. In Linux and OS X environments, sometimes we get numpy.linalg.linalg.LinAlgError: SVD did not converge
, but don't worry, this is rare, only under particular circumstances. On the other hand, if we transfer the problematic matrix to a Windows environment (with Intel MKL), SVD can be carried out. We ascribe this problem to the numerical implementation of SVD in the libraries such as OpenBLAS and LAPACK because mathematically SVD can always be done. If you have any idea about this issue, any advice will be appreciated!
-
In
./BStest
there's an easily repeated experiment, insensitive to most of the hyperparameters. -
./MNIST
consists data and code for the 1000 images experiment, including training and reconstruction.
- Class MPS is defined in
matlab_code/MPS.m
. It implements the same algorithm as the Python version.
- Simply run
matlab_code/demo_mnist.m