Measuring entanglement spectrum in infinite DMRG

+1 vote

Hi Miles,

I'm trying to extract the entanglement spectrum from the infinite DMRG ground state wavefunction of Heisenberg model by adding the following code to /sample/idmrg.cc (basically copying from http://itensor.org/docs.cgi?page=formulas/entanglement_mps):

psi.position(Nuc);
auto wf = psi.A(Nuc)*psi.A(Nuc+1);

auto U = psi.A(Nuc);
IQTensor S,V;
auto spectrum = svd(wf,U,S,V);

auto P = spectrum.eigsKept();
Real SvN = 0;

for (auto p : P)
{
if (p > 1e-12)
{
SvN += -p * log(p);
std::cout << "-log p = " << -log(p) << "\n";
}
}
std::cout << "SvN = " << SvN << "\n";


However, the result is not reasonable, with the largest p >> 1 and SvN < 0. The interesting part is that, if I calculate the entanglement between site 0 & 1 (instead of cutting in the middle), I get a plausible result. From my understanding these two approaches should give the same results, so I think maybe I have not really understood what's going on. Can you explain a little bit about this? Thanks very much!

Best,
Chengshu

+1 vote
answered Feb 27 by (12,650 points)
selected Feb 27 by chengshu

Hi Chengshu,
So this involves a feature of ITensor that's not well documented yet. It has to do with the return value of the idmrg function. The wavefunction that is returned is in a fully right-orthogonal gauge, with the center tensor (singular values when doing an SVD of an MPS) stored in the tensor psi.A(0). So to properly gauge the MPS you have to multiply psi.A(0) into the first MPS tensor, then use SVDs to move the gauge to other sites (or call the .position method after doing psi.Aref(1) *= psi.A(0)).

The reason the singular values are separated off into psi.A(0) is so that you can chain the returned MPS into a longer wavefunction that repeats infinitely. See for example the sample idmrg code (in the sample/ folder). Toward the end it computes a correlation function to a much longer distance than the size of the MPS returned by idmrg. Note how the code puts psi.A(0) into the tensor that is used to compute the correlator.

Hope that helps -

Miles

commented Feb 27 by (510 points)