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.
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++.
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: