0 votes
asked by (260 points)

Hi

I am facing a Segmentation fault error with the function expH (my goal is to simulate the dynamics of a spin boson hamiltonian with long-range interactions)

Please find below a minimal example which causes the crash:

It seems to be due to the interplay between the Complex argument Cplxi + the flip-flip terms Sm S_m..

Thanks for your help

Benoit

int main(int argc, char* argv[])
{
auto sites = SpinHalf(3);
auto ampo = AutoMPO(sites);
ampo += "Sm",1,"Sm",2;
ampo += "Sp",1,"Sp",2;
ampo += "Sp",2,"Sp",3;
ampo += "Sm",2,"Sm",3;
auto H = MPO(ampo);
PrintData(H);
auto tau = 0.1;
auto expH = toExpH(ampo,tau*Cplx_i);
PrintData(expH);
return 0;
}
~

commented by (680 points)
edited by
Hi Benoit,

Which version of ITensor are you using? Using version 2.0.11 retrieved on May 20, I can get the code running, provided that I change the toExpH line to

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

Hope that helps!

Best,
Chengshu
commented by (260 points)
Hi Chengshu,

I had itensor 2.0.11 but I just installed the new version 2.1.0 and now it works.
Thanks a lot!

Benoit

1 Answer

0 votes
answered by (70.1k points)

Marking this as answered because of the discussion above. Thanks Chengshu!

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

...