0 votes
asked by (230 points)

I'm trying to perform real-time evolution of the Heisenberg anti-ferromagnet on a Kagome lattice using fitApplyMPO. When I try to do this with a spin-half chain I don't get any errors. For the kagome lattice, the Hamiltonian I generate gives me a reasonable ground state so I think the problem isn't in the MPO itself. Furthermore, I also don't get errors (even in debug mode) when I do

auto expH = toExpH<ITensor>(aH, tau*Cplx_i);        

The problem only occurs during this line:

psi = fitApplyMPO(psi, expH, args);    

This is the error I get:

terminate called after throwing an instance of 'std::bad_alloc' 
   what():  std::bad_alloc    

Any idea what is going on? I'm confused because this exact code works for a spin chain and the Hamiltonian itself, which is the only thing that is different, isn't causing issues directly.

Thanks in advance for the help!

commented by (70.1k points)
Hi, so I'm not sure a priori what the problem is, but a std::bad_alloc could mean your system is running out of RAM. This is quite possible when dealing with 2D systems. So one thing to try is to make a smaller MPS psi (by redoing the DMRG but limiting the "maxm" to something like 100) and then trying your fitApplyMPO call to see if it then works. Also of course you can take a look at the system monitor to see what the RAM usage is like.

If the above test (with a smaller MPS) still fails, then I'd need to know a bit more & perhaps you can send me a minimal sample code that reproduces the bug.

Please log in or register to answer this question.

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

...