I am exploring the "randomMPS(sites, state, linkdim)" function in the Julia version of the code, used to initialize a random MPS under QN conservation. I toyed around with the following basic code:
N = 100
linkdim = 1
sites = Index[]
sites = siteinds("S=1/2", N, conserve_qns=true)
ampo_H = AutoMPO()
for j = 1:N-1
add!(ampo_H, 1, "S+", j, "S-", j+1)
end
H = MPO(ampo_H, sites)
sweeps = Sweeps(10)
maxdim!(sweeps, 10,20,100,100,200)
cutoff!(sweeps, 1E-10)
init_state = [isodd(n) ? 1 : 2 for n = 1:N]
psi0 = randomMPS(sites, init_state, linkdim)
energy, psi = dmrg(H, psi0, sweeps)
println("Ground state energy = $energy")
When I used linkdim = 0 or linkdim = 1, I got the following (the times were different, but the energies after each sweep were identical):
After sweep 1 energy=-20.093813857715 maxlinkdim=3 time=46.208
After sweep 2 energy=-19.645716775053 maxlinkdim=6 time=0.633
After sweep 3 energy=-23.704160971099 maxlinkdim=21 time=0.837
After sweep 4 energy=-21.976581439869 maxlinkdim=50 time=1.242
After sweep 5 energy=-17.979053940609 maxlinkdim=113 time=2.240
After sweep 6 energy=-12.781825304274 maxlinkdim=200 time=4.182
After sweep 7 energy=-18.735327685101 maxlinkdim=200 time=6.456
After sweep 8 energy=-17.554817334205 maxlinkdim=200 time=6.428
After sweep 9 energy=-11.592260452089 maxlinkdim=200 time=6.489
After sweep 10 energy=-18.150972193173 maxlinkdim=200 time=6.039
Ground state energy = -18.150972193173168
When I used linkdim = 2, I got the following:
After sweep 1 energy=-17.138433694197 maxlinkdim=7 time=16.842
After sweep 2 energy=-19.329082230479 maxlinkdim=20 time=0.785
After sweep 3 energy=-14.965351818888 maxlinkdim=55 time=1.271
After sweep 4 energy=-14.037715046585 maxlinkdim=100 time=2.089
After sweep 5 energy=-18.253177305167 maxlinkdim=200 time=4.063
After sweep 6 energy=-17.967870954570 maxlinkdim=200 time=6.248
After sweep 7 energy=-19.513691584655 maxlinkdim=200 time=6.625
After sweep 8 energy=-18.245438077285 maxlinkdim=200 time=6.188
After sweep 9 energy=-17.493978866991 maxlinkdim=200 time=6.266
After sweep 10 energy=-17.804622748715 maxlinkdim=200 time=5.827
Ground state energy = -17.804622748714813
Finally, when I used linkdim = 10, I got the following:
After sweep 1 energy=-18.432676648899 maxlinkdim=10 time=17.006
After sweep 2 energy=-19.905158282446 maxlinkdim=20 time=0.990
After sweep 3 energy=-23.774621818681 maxlinkdim=65 time=1.544
After sweep 4 energy=-16.035532730501 maxlinkdim=100 time=2.895
After sweep 5 energy=-10.002545372991 maxlinkdim=200 time=5.878
After sweep 6 energy=-25.311587050851 maxlinkdim=200 time=7.119
After sweep 7 energy=-17.279971718254 maxlinkdim=200 time=7.238
After sweep 8 energy=-13.021013397538 maxlinkdim=200 time=7.013
After sweep 9 energy=-18.874581289730 maxlinkdim=200 time=7.202
After sweep 10 energy=-28.130306372441 maxlinkdim=200 time=6.768
Ground state energy = -28.13030637244088
These results were quite perplexing. Furthermore, in a more complicated setup, I ended up getting an error "MPS center bond dim less than requested". (I was trying to set up the Schwinger model, in line with http://itensor.org/support/2140/implementing-local-gauge-symmetries. I can post the code if you want, but I'm not sure how helpful it would be here.) I got this error with several values of linkdim, including 4, 10, and 100, although I did not get it with the default linkdim = 1.
As a result of all of these things, I had a number of questions:
(1) As you can see in all of the above examples, the energy is not decreasing with each sweep as one would naturally expect. Instead it is jumping all over the place. Am I doing something fundamentally wrong here?
(2) As you can see above, one can set linkdim to 0, and that it gives the same answer as linkdim=1. Why is a linkdim of 0 even allowed? Maybe I'm totally misunderstanding what this is representing here, but I thought it had to be at least 1. I assume an answer to this will also explain why the code gives identical results for linkdim=0 and linkdim=1.
(3) What is the source of the error "MPS center bond dim less than requested", and how does one make sure it doesn't happen? I looked for it in the code, but I really didn't understand it.
(4) More broadly, are there some general pointers for how one should choose the linkdim value for a given situation? It seems based that the default of linkdim=1 will just return the state you specified without introducing any randomness, so I am assuming you should not pick this for sure.