+1 vote
asked by (140 points)

Hey,
I am currently using ubuntu and I know python a little and was made a program for Eigenvalus and eigen function for 1d Heisenberg hamiltonian in python using numpy and sympy.
But now I want to make a program for spin correlation function for same hamiltonian.
Am not sure how to make in python.
I never used Julia before. What to do....
I already installed DMRGpy but this is not working some import error it showing.
Please help me out

1 Answer

+1 vote
answered by (62.7k points)

Hi, so I could see two answers to your question. Could you clarify which one you are interested in discussing further?

(1) if your question is about how to use DMRGpy (i.e. regarding the error you got), you should contact the maintainer or DMRGpy, Jose Lado. Another Python package for DMRG is TeNPy which you might want to try if you are staying with Python.

(2) if you are willing to learn Julia, which is not too hard to learn especially if you start from example codes for DMRG and correlation functions which we provide in the ITensor documentation, then you could certainly use ITensor to compute spin correlation functions of the Heisenberg model.

For the case of (2), please see the following examples of how to do (a) DMRG of the Heisenberg model and (b) compute a spin correlation function using the ITensor function called correlation_matrix

(a) https://itensor.github.io/ITensors.jl/stable/tutorials/DMRG.html

(b) https://itensor.github.io/ITensors.jl/stable/examples/MPSandMPO.html#Computing-Correlation-Functions

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

...