+1 vote
asked by (160 points)

Hi Miles,

I was trying to reproduce the calculation of von Neumann entanglement entropy (EE) as shown in Fig. 2 of this paper
Here, @@J_\text{leg} = \cos(\theta)@@, @@J_\text{rung} = \sin(\theta)@@.
I label sites of one leg from 1 to L and sites of another leg from L+1 to 2Nx.
When calculating the EE, I bipartite the ladder at site L

It looks that my code works pretty well (as attached below), except when theta is closed to pi/2.
In this case, we expect that the EE should reach its maximal value. However, from my simulation, I always get a zero EE for theta is closed to Pi/2. I am wondering is there any mistake in my code?


Please found my code here

1 Answer

0 votes
answered by (70.1k points)

Hi Jeffrey,
Thanks for the question & for the easy to read code.

Your code looks good to me to start with. So if you are getting an answer that seems wrong, then I would look at two things:

  1. is your DMRG converged for all of the different Hamiltonians you consider? Some simple checks for convergence are (a) does the truncation error printed by DMRG for the last two sweeps reach a small value, where small means less than 1E-6 and ideally less than 1E-8 or even smaller? (b) does the energy not change appreciably in the last two or three sweeps?

  2. when you compute the entanglement, try printing the eigenvalues. Are some of them funny looking? Like are there a lot which are very small or even negative? Not sure if this is really likely to happen, just chasing down all possible ways there could be an error.

If you try those two things and still have the error, please comment below and we can keep discussing it.


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.