+1 vote
asked by (240 points)
edited by

Hello, sorry for my simple problem.
I used ITensor3 to construct Bose-Hubbard model with the Hamiltonian:@@\widehat{H}=\sum_{j=1}^L{\left[ -\mu \widehat{n}_j+\frac{U}{2}\widehat{n}_j\left( \widehat{n}_j-1 \right) -J\left( \widehat{a}_j\widehat{a}_{j+1}^{\dagger}+\widehat{a}_{j}^{\dagger}\widehat{a}_j \right) +V\widehat{n}_j\widehat{n}_{j+1} \right]}@@
And I used this code to get the ground state:

int L = 2;
auto sites = Boson(L, {"MaxOcc=", 1, "ConserveQNs", true, "ConserveNb", false});
auto sweeps = Sweeps(8);
sweeps.maxdim() = 40, 80, 400, 400, 800, 800, 1000, 1000;
sweeps.cutoff() = 1E-16;

Real miu = 1.0;
Real U = 1.0;
Real J = 1.0;
Real V = 1.0;

auto ampo = AutoMPO(sites);
for (int i = 1; i < L; i += 1)
{
    ampo += -miu - U / 2, "N", i;
    ampo += U / 2, "N", i, "N", i;
    ampo += -J, "A", i, "Adag", i + 1;
    ampo += -J, "Adag", i, "A", i + 1;
    ampo += V, "N", i, "N", i + 1;
}
ampo += -J, "A", 1, "Adag", L;
ampo += -J, "Adag", 1, "A", L;
ampo += V, "N", 1, "N", L;
auto H = toMPO(ampo);

auto state = InitState(sites);
for (int i : range1(L))
{
    if (i % 2 == 1)
        state.set(i, "1");
    else
        state.set(i, "1");
}
auto psi = randomMPS(state);

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

But I got wrong result comparing with ED result.
The ground state energy given by DMRG is -2.56 while ED gave -3.00.
I also tried the way in Seems like a simplified TEBD algorithm and got the same result as DMRG gave.
I have no idea what I did wrong. It seems that I constructed the Hamiltonian in a correct way.
Looking forward to the help.
My ED result for Bose-Hubbard model

commented by (70.1k points)
One question I would have is about the number of particles. In your ED solver it says the number of particles in the ground state is 1. But in your DMRG code it looks to me like you have prepared an initial state with two particles - is that correct? Can you check by printing totalQN(psi) before DMRG starts? Thanks -
commented by (240 points)
Thank you for your comment.
I think it doesn't matter for the particle number in the random initial state because I set the system no to conserve particle number. And there is no different when I set the particle number as 1 in initial state. The particle number in the ground state given by DMRG is also 1.
commented by (70.1k points)
Oh, so I think I noticed some problems with your summation to make your Hamiltonian. Your sum or for loop only goes up to L-1, which is fine, but then the on-site terms such as -U/2 ā€œNā€ i are not present on site L. Also this may not be a bug, but your mu is not multiplied by ā€œNā€.
commented by (240 points)
I got it...
I am so sorry and ashamed for my stupid mistake...
Thank you so much for your kind help...
Best wishes!
commented by (70.1k points)
No problem, it is good of you to ask if you are stuck. Hope that my diagnosis is right and you can get the codes to agree now!
commented by (240 points)
Yes, now I have good agreement between ED and DMRG result. I can go ahead now. I have stuck here for several days and felt depressed. Thank you so much for your kind help.

1 Answer

0 votes
answered by (70.1k points)

(Please see discussion above & marking this question as answered.)

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

...