0 votes
asked by (390 points)


So I've been trying to use this function: expHermitian(ITensor H, Cplx tau = 1)
but the operator that I want to exponentiate is the total Sz. Here is the code that I have so far:

auto ampo2 = AutoMPO(sites); for(auto k : range1(Nspins)) { ampo2 += "Sz",k; } auto proj = toMPO(ampo2); auto exp2H = expHermitian(proj,2);

but I get an error that the function expects an ITensor object as the first argument (as expected). Is it possible to somehow do what I am trying to do?

Thank you.

commented by (390 points)
I am sorry, I just realized that there is a new forum, just posted it there.
commented by (70.1k points)
Yes, thanks!

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.