+1 vote
asked by (650 points)

Hi Miles,

I am trying to use the new feature of building more-than-two-operator terms using AutoMPO with the sample code:

AutoMPO ampo(sites);
ampo += "Sz",1,"Sz",2,"Sz",3;
auto H = MPO(ampo);
auto E0 = dmrg(psi,H,sweeps,"Quiet");

And when running I get the error message

Only at most 2-operator terms allowed for exact AutoMPO conversion to MPO/IQMPO

What is the correct way of handling this?

Thanks!
Chengshu

1 Answer

+1 vote
answered by (32.3k points)
selected by
 
Best answer

Hi Chengshu,
So the multi-site operator support for AutoMPO is still a new feature that we are continuing to polish. Right now it only works for making IQMPO's (made out of quantum number conserving tensors). But we want to make it work for regular MPO's soon too.

Does your Hamiltonian have conserved quantum numbers? (Like the term you show clearly commutes with total Sz.) If so you can just change the code to read

auto H = IQMPO(ampo);

and change psi to be an IQMPS (see the sample/iqdmrg.cc code for how to do this; it's important to initialize the state). Then everything should work.

If your Hamiltonian does not conserve any quantum numbers, then unfortunately you'll have to wait for me to support that case. It shouldn't be too hard but it will take a bit of work.

Miles

commented by (650 points)
Hi Miles,

Thanks for the really fast reply! Unfortunately my Hamiltonian does contain terms like Sx, so I believe no conservative quantum number is available here.
commented by (32.3k points)
Hm, that is too bad. Ok I will see what I can do to fast track this code improvement, as it's a feature we definitely want to have anyway.  It should be easy in one sense: I just have to make the code "dumber" and not know about quantum numbers. But it's a complicated code so it's not totally trivial to modify it.
commented by (650 points)
Thanks a lot! It's of great help to know what is happening.
commented by (32.3k points)
Hi Chengshu,
I just pushed a change to the 'develop' branch of ITensor that fixes this issue (allowing AutoMPOs to have terms on more than two sites and be converted to regular MPOs and not just IQMPOs).

To try it out, pull the latest version of ITensor from github and do "git checkout develop" and recompile. If you try it out, let me know if you run into any issues - thanks.

Miles
commented by (650 points)
Hi Miles,

Thanks a lot for the update. Happy holidays!

Chengshu
commented by (210 points)
Dear Miles,
I am trying to construct a multi-site MPO now with the current version of ITensor and I obtain the same error "Only at most 2-operator terms allowed for AutoMPO conversion to MPO/IQMPO" even for a IQMPO. Is still not possible then to construct multi-site operators?

Thanks a lot!
Jacopo.
commented by (32.3k points)
Hi, which version are you using and are you making just an MPO or calling toExpH on the autompo? (The toExpH function only supports two site operators at the moment.)
commented by (32.3k points)
More than two site operators are definitely now supported for making MPOs and IQMPOs. If you’re still getting the error, please email me a minimal sample code - thanks!
commented by (210 points)
Dear Miles,

yes indeed, you are completely right, the problem is with calling toExpH and not with the making the MPO, I did not realize that. Thank you for your quick answer.
Are there ways to avoid this problem at the moment?
Thanks a lot!
commented by (32.3k points)
Hi, so unfortunately we just have too many other things we need to finish at the moment to add that feature to toExpH. But we hope to add it some time this year.

I would also add that a lot of evidence is coming out (see the recent article by Hubig et al.) that using MPO methods for time evolution is often the worst choice. I added toExpH because it was convenient to have (and I was hoping MPOs would perform better for time evolution) but apparently methods such as TDVP are much superior and can also handle long range interactions.

So actually our priority will really be to add a good TDVP code for ITensor.

In the meantime, if you need to time evolve with long-range interactions, I’d suggest you try your hand at writing TDVP. ITensor is a good choice for doing that.

If your model only has finite-range interactions (even if they’re not nearest-neighbor) then using Trotter gates plus swap gates is an excellent choice and gives really good results. Let me know if you have questions about doing that.

Best regards,
Miles
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

...