Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Rewrite models based on Square struct, add LineMPO struct - #30

Merged
LinjianMa merged 4 commits into
ITensor:mainfrom
LinjianMa:main
Aug 3, 2021
Merged

Rewrite models based on Square struct, add LineMPO struct#30
LinjianMa merged 4 commits into
ITensor:mainfrom
LinjianMa:main

Conversation

@LinjianMa

@LinjianMa LinjianMa commented Aug 2, 2021

Copy link
Copy Markdown
Collaborator

Change the hamiltonians in the PEPS optimization experiments such that each local hamiltonian is a column/row of the overall H.

Comment thread test/Optimizations/runtests.jl
]
end

function bonds(lattice::Square, coord::Tuple{Colon,<:Integer})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful functionality!

In general what we could do is make this more generic, where you could ask for a general (hypercubic) slice of a HyperCubic lattice type and then ask for the bonds of that slice. But totally fine to have more specialized functions like this for now.

@mtfishman

Copy link
Copy Markdown
Member

Looks good, glad you were able to fix the bond iteration for the HyperCubic lattice type.

I think ideally we wouldn't have two different types LocalMPO and LineMPO, in principle we can merge them into one type where it stores the list or range of sites where that Hamiltonian term is acting. But the current design is fine for now.

We should make issues reminding us to:

  1. Merge LocalMPO and LineMPO into one type.
  2. Generalize the version of bonds that returns an iterator over the bonds of a hypercubic sublattice of a hypercubic lattice (and consider writing a general SubHyperCubic type which is a slice of a HyperCubic type, or allow adding slicing information into the HyperCubic type itself).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants