-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 2D Heisenberg Example #95
Conversation
Thanks Ryan, can you add a test that it is outputting the correct Hamiltonian? |
Since this is an example, what sort of test were you thinking of? (As a side note, this has me thinking an ITensorMPS tool that converts a opsum into an adjacency graph matrix might be useful) |
We could split off the Hamiltonian definition into a separate file and then include it into this example and also into a test.
That could be useful, though we'd have to think carefully about what it should output (i.e. does it include the operators and weights as well?), how to make it general to handle terms that are beyond 2-site, etc. Maybe better as an external tool. I think the same kind of thing can be accomplished by outputting a dictionary from the set of sites to the corresponding term of the Hamiltonian, which is easy enough to write, say using https://github.com/JuliaData/SplitApplyCombine.jl. |
I've added the model internally and added a reference. The width=4 with OBC seems to work, but PBC the symmetry breaking in the unit cell is bad and we don't quite reach the correct value. |
I was picturing that we could just check that some subset of the terms are correct, i.e. check the |
Looks good, thanks! |
(Reported in the discourse) In removing the
mod
of the previous PR the yperiodic term was incorrect - there arewidth
Horizontal bonds andwidth-1
vertical and 1 potential wrapping. This should be the correct terms (and looks nicer than the previous version)With
yperiodic=true
and
yperiodic=false