0 votes
asked by (120 points)

if this question is off-topic, pls. just delete it from the forum.

I want to consider 2D frustrated spin systems using PEPS. I am a student, new to the field and I don't want to reinvent the wheel. So, I would like to employ one of the publicly available libraries. However, in view of the sheer number of them (iTensor, TeNPy, Uni10, TNT, OSMPS, ...) and all of their very steep learning curves, it seems a bad idea to "try" several of them, until maybe the "proper" one surfaces.

Is there any comparison of pros/cons of all those libraries available somewhere?

While iTensor developers may want to refrain from commenting in depth on many other open source libraries, I would still be very grateful if at least, I could get a hint from users of this forum if, say, using
iTensor vs. TeNPy
would give me similar functionality regarding physics, or if there are major differences? (I'm not referreing to C++, C, Python or whatever language.)

Any other comments along this line would be very much appreciated!

Xaver

1 Answer

0 votes
answered by (26.2k points)

Hi Xaver,
I think this is a good question. I can't really speak with much knowledge about the others besides ITensor, except to say that Uni10 and TenPy are also good choices. TensorOperations in Julia may also be a reasonable choice. The main difference between these are probably:
(1) which language they are in (C++ for ITensor, Uni10; python for TenPy; Julia for TensorOperations; etc.)
(2) availability of certain operations you might need, such as quantum numbers and certain advanced tensor "index merging/folding" operations etc.
(3) how much they make you deal with lower-level details, such as the ordering of indices and reshaping of tensors

For #1, this is a big difference so you'll have to decide what language you're most comfortable using. My feeling is that while python is easy to learn, later on you'll be frustrated by bugs that keep occurring and are hard to find and by parts of the code that will be slow and will be hard to speed up without putting in pieces of C/C++. Julia is great and I would recommend that language unreservedly. C++ is also good, but has a steep learning curve for the more advanced sort of features. However, if you write C++ similar to how you'd write python or Julia there is a subset of modern C++ that is nice and fairly easy to use.

For #2 you'll have to check the status of each library yourself. I think quantum numbers are particularly easy to work with and nicely handled in ITensor, and less so in some other libraries I've seen. But this may have changed. Also you might be more focused on other features.

For #3, this is where ITensor particularly excels. You hardly ever have to think about the ordering of indices and you never have to reshape a tensor. These details can be quite a pain in more sophisticated algorithms beyond MPS algorithms. One concern that more advanced people I know had about ITensor was that for PEPS, sometimes it's quite important to control the order of indices so as to avoid extra reshaping during the contraction step. But ITensor now offers a .order(...) method that lets you change the index ordering for cases like PEPS codes. So if you find this is an issue for you when trying ITensor, we can discuss and I can help you to make this no longer an issue.

So in summary I think ITensor would be quite a good choice for writing a PEPS code, provided that you are comfortable using C++. I would say also to check out Uni10, which is aimed at 2D tensor networks specifically, and also TenPy which is written by some top people in the field of tensor networks. TensorOperations in Julia is reasonable too if you want to do a lot "by hand" with the other features using Julia built-in tensor manipulations. TNT and the others I'm less knowledgeable about but hopefully someone else can say something about them here.

Best regards,
Miles

commented ago by (770 points)
Hi Miles,

Does Julia has a library which can do tensor operations within conserved quantum numbers, like what ITensor does using iqtensors? Thanks.

Jin
commented ago by (26.2k points)
To my knowledge there is not one. But I think there are some on the way so keep an eye out for that.
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

...