+1 vote
asked by (130 points)

Dear Itensor users

I have tried to reproduce the density of the 1D Bose-Hubbard model using dmrg without success. Following are the Hamiltonian and the measurements I used for the simulations (I skip some not relevant parts).

auto sites = Boson(L, {"MaxOcc=", 5, "ConserveQNs", true, "ConserveNb", false});
auto ampo = AutoMPO(sites);

for (int i = 1; i < L; i += 1)
{
    ampo += - U / 2, "N", i;
    ampo += -mu, "N", i;
    ampo += U / 2, "N", i, "N", i;
    ampo += -t, "Adag", i + 1, "A", i;
    ampo += -t, "Adag", i, "A", i + 1;
}

ampo += U/2, "N", L, "N", L;
ampo += - U/2, "N", L;
ampo += -mu, "N", L;

auto H = toMPO(ampo);

auto state = InitState(sites);
for (int i : range1(L))
{
   state.set(i, "1");
}
auto psi0 = randomMPS(state);

auto [energy, psi] = dmrg(H, psi0, sweeps, "Quiet");

fptr = fopen(argv[6],"a");

auto ampo_a = AutoMPO(sites);
auto ampo_1 = AutoMPO(sites);
for (int i = 1; i <= L; i++)
{
  ampo_a += 1, "N", i;
  ampo_1 += 1, "A", i;
}
auto ope = toMPO(ampo_a);
auto ope1 = toMPO(ampo_1);

fprintf(fptr,"%.12f %.12f\n",inner(psi,ope,psi),inner(psi,ope1,psi));

Any help will be greatly appreciated.

Sincerely,
FJ

commented by (70.1k points)
Hi FJ,
I think first I would need to ask you some questions to understand better:
- how many sweeps of DMRG did you did?
- did you turn on the "noise term" meaning set a non-zero value of noise in the Sweeps object passed to DMRG?

When you say you did not reproduce the density you expected, I see you only measured the first site in the code above. Did you look at the entire density on every site also? What other results did you compare to to conclude that your result was incorrect?

Lastly, here are some general ideas about things you can also try when a DMRG calculation isn't giving the results expected: https://itensor.github.io/ITensors.jl/stable/faq/DMRG.html
commented by (130 points)
Dear Miles

  Thank you very much for your answers.

1. how many sweeps of DMRG did you do? ---> 40, sweeps.maxdim() = 2000
2. did you turn on the "noise term" meaning set a non-zero value of noise in the Sweeps object passed to DMRG? --> yes

I thought I measured the density of all sites because there is a " for loop " for carrying out the measurement. Is this not the way to perform the measurement?  

When t = 0.1, U = 1, mu = 0.2 (the system size L is L = 128), I should get \rho = 1 and < A > = 0 or something (very) close to these values (These are established in the literature).  However, what I found are still a little bit off.

Sincerely,
FJ
commented by (70.1k points)
I see thanks. I had misread the "i" as a "1". So I see you are averaging the operators over all sites now.

When you say a little bit off, by about how much? Could it just be a finite-size effect? How much does the result change when you lower L to 120 or raise it to 130?
commented by (130 points)
Dear Miles

For system sizes L = 24, 48, 64, 128, 256, 512, the densities I got are
0.9996, 0.99085, 0.99045, 0.97178, 0.97239, and 0.96985, respectively.
These numbers do not seem to converge to anything very close to 1, like 0.999.
commented by (70.1k points)

How well converged did the DMRG seem to be, especially on the larger systems? Was the energy still changing much from one sweep to the next?

1 Answer

0 votes
answered by (70.1k points)

Hi FJ,
Thanks for providing a short sample code to show what you were doing. I ran your code today to see what results I got, using t = 0.1, U=0.1, and mu=0.2 as you mentioned in your comments.

What I found was that I could get the density to be 0.99999 to many digits on L=24,48,64 if I just ran the DMRG calculation for long enough. I did 60 sweeps instead of the 40 that you reported doing, and I also made sure to ramp up the bond dimension very gradually, like this

auto sweeps = Sweeps(60);
sweeps.maxdim() = 10,10,10,10,20,20,20,20,40,40,40,40,100,100,200;

Slowly increasing the bond dimension can be a good technique for dealing with difficult systems, because you can do many sweeps without the initial sweeps taking a long time. Also I've found that increasing the bond dimension too soon can lead to DMRG getting "stuck" and having trouble finding the best basis to use for the ground state.

Best regards,
Miles

commented by (130 points)
Dear Miles

   Thank you very much for your answers. This solves my problem! I also learn a good technique of using dmrg to solve difficult systems. Thanks again.

Sincerely yours.
FJ
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...