I find the following issues with MPS class, which I assume are hidden bugs(certainly, fault could be mine). Generally, under some circumstances, the memory allocated to the program exceeds severely it's supposed to need and the whole program seems to fail to terminate peoperly. By saying "some circumstances" I refer to:
when a MPS object is modified by functions(for example, readFromFile) to which the MPS object is passed by reference and functions, which involve matrix multiplication such as overlap and exactApplyMPO, are applied to it.
Specifically, the system I'm working on is a toy-like 4*4 lattice with nearest neighbor Heisenberg Model. It's observed via htop that over 10GB memory is allocated for such calculation, while when such calculation is carried out properly it only requires a few hundreds MB and less than a second.
The way I work this around is to define and modify all MPS inside the main function, which will not be a good idea as the project grows larger. I eagerly look for help and present my thank in advance.