Skip to content
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

Add selector indexing of AbstractHamiltonians #279

Closed
pablosanjose opened this issue Apr 25, 2024 · 0 comments · Fixed by #280
Closed

Add selector indexing of AbstractHamiltonians #279

pablosanjose opened this issue Apr 25, 2024 · 0 comments · Fixed by #280

Comments

@pablosanjose
Copy link
Owner

With #277 we can now do h[sites(...), sites(...)] with h::AbstractHamiltonian. This gives a SparseMatrixCSC, a copy of the corresponding matrix elements of hamiltonian(h). It parallels g[sites(...), sites(...)] with g::GreenSolution, which gives a Matrix. But with g we can also do g[::SiteSelector, ::SiteSelector], which gives an OrbitalSliceMatrix. For consistency, we should also be able to do that with h, i.e. h[::SiteSelector, ::SiteSelector], also returning an OrbitalSliceMatrix

(Incidentally, h[sites(...), sites(...)] should return the corresponding block of default_hamiltonian(h), not of hamiltonian(h).)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant