+1 vote
asked by (240 points)
edited by

Hi,
I am studying the Bose-Hubbard model using Boson site:

sites = Boson(L, {"MaxOcc=", n, "ConserveQNs", true, "ConserveNb", false});

The reason why I set "ConserveNb" as false is that there is a term in Hamiltonian which breaks the particle number conservation: $$H_e=\sum_i{\left( \hat{a}_{j}^{\dagger 2}+\hat{a}_{j}^{2} \right)}$$. At this case, the U(1) symmetry of the system is broken and so it is very slow to get the ground state MPS using DMRG. Without symmetry the DMRG cannot spped up and calculate slowly. In my personal computer I can simply calculate @@L=12, n=3@@, which is a really small system when I want to study the correlation function. I am wondering if there is any efficient way to deal with this case while U(1) symmetry is broken.
Looking forward to the help. Thank you.

My Hamiltonian is:
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]}+em\sum_i{\left( \hat{a}_{j}^{\dagger 2}+\hat{a}_{j}^{2} \right)}@@
And my parameters are as follows:

auto sweeps = Sweeps(8);
sweeps.maxdim() = 40, 80, 400, 400, 800, 800, 1000, 1000;
sweeps.cutoff() = 1E-16;

Real mu = 1.0;
Real U = 1.0;
Real J = 1.0;
Real V = 1.0;
Real em = 1.0;

It takes me around 3 hours to calculate the ground state as L = 12, N = 3.
When I set the "ConserveNb" as true, it just take around 1 hour to calculate as L = 24, N = 3.

The total code is as follow:

auto sweeps = Sweeps(8);
sweeps.maxdim() = 40, 80, 400, 400, 800, 800, 1000, 1000;
sweeps.cutoff() = 1E-16;

Real mu = 1.0;
Real U = 1.0;
Real J = 1.0;
Real V = 1.0;
Real em = 1.0;
int L = 12;
int n = 3;
auto sites = Boson(L, {"MaxOcc=", n, "ConserveQNs", true, "ConserveNb", false});

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 += -em / 2, "Adag", i, "Adag", i;
    ampo += -em / 2, "A", i, "A", i;
}
ampo += -miu - U / 2, "N", L;
ampo += U / 2, "N", L, "N", L;
ampo += -em / 2, "Adag", L, "Adag", L;
ampo += -em / 2, "A", L, "A", L;
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");
commented by (70.1k points)
Hi, so for an L=12 n=3 system, the difference between having the symmetry or not should not affect the calculation time so much.

What DMRG parameters are you using, such as cutoff, maxdim, number of sweeps?
commented by (70.1k points)
Or rather what are the system sizes where the DMRG begins to become slow? And what DMRG parameters did you use for those system sizes?
commented by (240 points)
Dear Miles:
Thank you so much for your reply.
I updated the question and attached my code on it.
It takes me around 3 hours to calculate the ground state as L = 12, N = 3.
When I set the "ConserveNb" as true, it just take around 1 hour to calculate as L = 24, N = 3.

I read a paper about U(1) symmetry breaking Fermi-Hubbard model using DMRG and they could also only calculate a system with no more than 40 sites applying parity symmetry. It seems that without symmetry it is uneasy to calculate even for a small system. The paper is PHYSICAL REVIEW B 76, 235105 (2007).
commented by (70.1k points)
Hi, so I think the problem is mainly that your DMRG parameters are asking for much more accuracy than you probably need. For a one-dimensional system, you can usually put the maxdim to at most a few hundred and be ok. But more importantly, there's no need to use such a small cutoff. Already a cutoff of 1E-6 will give good accuracy and 1E-8 excellent accuracy. If you raise the cutoff to one of those values, then even if you set a large maxdim, the actual MPS bond dimensions won't end up as large and your code will run much faster.

A length 12 system with DMRG ought to only take a handful of seconds.

Hope that helps!

Miles
commented by (240 points)
Dear Miles:
Oh god, when I set cutoff as 1E-6 it do run much faster than before......
Before that when I used to calculate spin system it was fast and I didn't notice this.....
I am so sorry for troubling you with such a naive problem.....and thank you so much for your kind help.
commented by (70.1k points)
No problem - first time for everything. Thanks for your question.

1 Answer

0 votes
answered by (70.1k points)

(Please see discussion above.)

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

...