0 votes
asked by (640 points)

Hi, all.
When I try
auto sites =Hubbard(N,{"ConserveSz",false,"ConserveNf",false});
, it shows following error:
One of ConserveSz or ConserveNf must be true for Hubbard sites
It seems there's no such physical constraint in Hubbard sites.
Why couldn't I set that there's no QN conserve?
Thanks.
Best,
Victor

commented by (6.7k points)
Hi Victor,

If you don't want any QNs conserved, you should be able to use:

    auto sites = Hubbard(N,{"ConserveQNs=",false})

ConserveQNs=true by default, so unless you turn it off explicitly, the system will expect some sort of QN to be conserved. That is why you are getting the error when you turn off both ConserveSz and ConserveNf. I agree it is a bit confusing, perhaps what you tried should have the same result as ConserveQNs=false (I think one reason to not do that is if we add other kinds of symmetry, like fermion parity conservation, then Hubbard(N,{"ConserveSz",false,"ConserveNf",false}) could be taken to mean that parity is conserved).

Cheers,
Matt
commented by (640 points)
Hi, Matt.
It works. Thank you.

1 Answer

0 votes
answered by (6.7k points)

Please see the comments above for the answer.

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

...