+1 vote
asked by (180 points)

There is no example given in the ITensor Julia version for a sample code for a 2 dimensional hamiltonian. I want to find the 2D hamiltonian. What function for the Julia Version can be used to make a square lattice, similar to C++ ITensor version, whose example is also mentioned in the website.
https://itensor.org/docs.cgi?vers=cppv3&page=formulas/2d_dmrg

2 Answers

+2 votes
answered by (9.7k points)

Hi,

We need to advertise it better on the website and documentation, but there is an "examples" directory on the Github page here: https://github.com/ITensor/ITensors.jl/tree/master/examples/dmrg

The notation is nearly the same as in C++.

-Matt

commented by (180 points)
Thank you so much Matt, for your answer, I did check on github! great help !
+1 vote
answered by (49k points)

Thanks for asking about this. I would definitely suggest looking at the codes in the examples folder in the ITensor source, as Matt recommends.

Also I just added a new "code formula" for 2D DMRG based on one of the example codes. You can view it here:
http://itensor.org/docs.cgi?vers=julia&page=formulas/2d_dmrg

commented by (180 points)
Thanks a lot MIles, for adding the same for Julia version. !
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

...