0 votes
asked by (340 points)

Hello,

I'm new to iTensor and wanted to simulate Lindblad dynamics but for that I need some method to exchange between MPS and MPO. This is simply combining indices so I tried using the Combiner method. However, even the most basic code http://itensor.org/docs.cgi?page=classes/combiner gives segmentation fault.

Could you help me?

P.S.: There are no errors while compiling

1 Answer

+1 vote
answered by (70.1k points)

Hi, thanks for the bug report. We'd like to strive to make all of the sample code on the website compile, so this is helpful. But sometimes the codes on the site skip over a few steps, such as setting elements of tensors when initializing them, which can lead to errors.

I just updated the code on that page and it runs now. What I added was a line

randomize(T);

that sets the elements of the tensor T to be random elements. That allows the rest of the code to run correctly. The reason you were getting that error is that no elements of T had been set, so T had no storage. In the future we'll fix combiners to work even for this case.

One other note is that, if you get an error like a segmentation fault, please try compiling and running your code in "debug mode".
http://itensor.org/docs.cgi?page=formulas/debug_mode

Running your code this way will help to give more informative error messages.

Glad you are trying out ITensor!

Best regards,
Miles

commented by (340 points)
Thanks for the fast reply.
Got it to work but only after multiplying the combiner on the right of the tensor.

Best regards,
João
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

...