+1 vote
asked by (190 points)

Dear Itensor,

I believe there is a bug in localop.h. On line 234, nc_ is first set to 2, then line 239 says it can only be 1.

223 inline LocalOp::
224 LocalOp(const ITensor& Op1,
225 const ITensor& L, const ITensor& R,
226 const Args& args)
227 :
228 Op1(nullptr),
229 Op2
(nullptr),
230 L(nullptr),
231 R
(nullptr),
232 size(-1)
233 {
234 nc
= args.getInt("NumCenter",2);
235
236 if(nc_ == 1)
237 update(Op1,L,R);
238 else
239 Error("In LocalOp(ITensor,ITensor,ITensor), NumCenter cannot be set other than 1");
240 }

Thanks,
Yantao

1 Answer

0 votes
answered by (47.7k points)

Thank you! I just fixed this in the latest version 3.1.4 based on your report

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

...