+1 vote
asked by (160 points)

I was wondering if you could help me with the following problem I ran into when using the Julia version of ITensor. When I define a composite on-site operator in the autoMPO of a Hamiltonian such as writing $C^\dagger{up} C{up}$ instead of $N_{up}$ when using "Electron" site types, I get unphysical results for the energy and ground state properties.

I have included a minimal code (based on your example of the Hubbard model) showing the problem I am having. It would be great if you could let me know how I can avoid this problem. In particular how can I avoid this problem in four Fermi terms where two fermi operators belong to one site.

Thank you.

============================================================

using ITensors

N = 5
Npart = 3
t1 = 1.0

sites = siteinds("Electron",N; conserve_qns=true);


ampo = AutoMPO()

for b=1:N-1
    ampo += -t1,"Cdagup",b,"Cup",b+1
    ampo += -t1,"Cdagup",b+1,"Cup",b
    ampo += -t1,"Cdagdn",b,"Cdn",b+1
    ampo += -t1,"Cdagdn",b+1,"Cdn",b
end


## The following two choices for including an on-site potential result in two different results for the energy and ground state properties. In particular the second choice seems defective.


## Choice 1:
ampo += 1000.,"Nup",1
ampo += 1000.,"Ndn",1

## Choice 2:
# ampo += 1000.,"Cdagup",1,"Cup",1
# ampo += 1000.,"Cdagdn",1,"Cdn",1


H = MPO(ampo,sites);
commented by (49k points)
Thanks! You are definitely right about this. An extra minus sign is resulting from the code in Choice 2 compared to Choice one whereas I agree these should be the same. I'll look into it and post a reply here.
commented by (9.7k points)
This may be related to this issue that I raised: https://github.com/ITensor/ITensors.jl/issues/514
commented by (49k points)
Yes, looks to be the same issue. Thanks for reporting that too, Matt. I'll try to prioritize this.

1 Answer

0 votes
answered by (49k points)
selected by
 
Best answer

Hi, so I just patched the latest ITensor (Julia) with a fix for this issue. Thank you for finding it and please let us know if anything else like this seems inconsistent in the future.

If you do update ITensors in the Julia pkg system you should now get this bug fix.

Related pull request:
https://github.com/ITensor/ITensors.jl/pull/519

Best,
Miles

commented by (160 points)
Hi Miles, thanks for the update.
It works correctly now, I tried a few examples of four Fermi interaction terms as well and they also gave correct results.
Thanks!
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

...