0 votes
asked by (390 points)

Dear Miles,

I was wondering if it's possible to apply a commuting set of gates in the trotter time evolution in parallel with openMP.
If not is there any other way to parallelize the trotter code? (there is not much documentation online on parallelization and ITensor)
Thanks a lot!

Best,
Jacopo.

1 Answer

0 votes
answered by (70.1k points)

Hi, so we have not explored parallelism with OpenMP very much. But please do try it and let us know if you run into any issues. The kind of parallelism you are describing would sit outside of ITensor, which is why we have not documented it (it's not a feature of ITensor, but just a way of using ITensor inside of a larger code).

In the past, I have used ITensor within a multi-threaded code where I created a parallel for loop using the C++ threading library and it worked extremely well. So hopefully you can use an OpenMP parallel for loop in the same way. The reason I say "let us know if you run into any issues" is that there may be some special handling of certain parts of ITensor we need to put in to make things thread safe within OpenMP. We can do this and add a compiler flag to turn it on, but please just try it first.

Best regards,
Miles

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

...