Converting MPS to State Vector

How do I use this algorithm? What does that parameter do?
Post Reply
quarkonia
Posts: 10
Joined: 27 Jul 2022, 15:51

Converting MPS to State Vector

Post by quarkonia »

Bear in mind that I just started learning about MPS and DMRG, hence this might be a stupid question. Is it possible to obtain the state vector representation of a quantum state provided that we have the MPS representation? Basically, can we convert a given MPS ground state to the linear superposition of all the product states (basis states spanning the Hilbert space), i.e., ending up having a vector with dim(H) entries?
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Converting MPS to State Vector

Post by Johannes »

Formally yes, you can do it by just contracting all the tensors of the MPS, leaving the physical legs open. Depending on your preferred form, you might want to combine the L physical legs of dimension \(d\) into a single, big leg of dimension \(dim(\mathcal{H})= d^L\), but this is essentially just a reshaping of the state vector.

In practice, however, no this is exactly what you don't want to do: it requires arrays with the exponentially large Hilbert space dimension. The hole point of tensor networks in general is to bring down the memory requirements from exponentially many numbers (= full Hilbert space dimension) to just polynomially many, and whatever we do, we try to do it locally, i.e. for MPS contracting the tensor networks for expectation values etc coming from the left/right, instead top to bottom.

That being said, of course you still can do the contraction when your system size is small enough - basically, whenever you can do exact diagonalization, so L =10-20 (of you really push it and only need pure states, not operators, about 30 to maybe 40 with big enough computers).
The easiest way to do it in TeNPy is just to call psi.get_theta(0, L).
A bit of wrapping on top of that is done in tenpy.algorithms.exact_diag.ExactDiagonalization.mps_to_full. Since this is just used for testing and out of the intended scope of using the library, it's not even documented.
quarkonia
Posts: 10
Joined: 27 Jul 2022, 15:51

Re: Converting MPS to State Vector

Post by quarkonia »

Thank you very much. After posting the question I actually wrote my own routine and I just wanted to make a comparison.
Post Reply