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

Generalize AbstractHamiltonian indexing #280

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Generalize AbstractHamiltonian indexing #280

merged 2 commits into from
Apr 25, 2024

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented Apr 25, 2024

Closes #279

With this we provide the same general indexing support for h::AbstractHamiltonians as for g::GreenSolutions. In particular we can index h with Siteselectors, CellSites or NamedTuples, including any mix of the three. When indexing with any CellSites, a SparseMatrixCSC is returned (for g it was a dense Matrix), while in all other cases it will be an OrbitalSliceMatrix (like for g).

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 92.49%. Comparing base (b385817) to head (234fcf5).

Files Patch % Lines
src/hamiltonian.jl 77.77% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #280      +/-   ##
==========================================
- Coverage   92.55%   92.49%   -0.06%     
==========================================
  Files          37       37              
  Lines        6176     6184       +8     
==========================================
+ Hits         5716     5720       +4     
- Misses        460      464       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fix docstring [skip tests]

fix docstring [skip tests]
@pablosanjose pablosanjose merged commit bc52afc into master Apr 25, 2024
4 checks passed
@pablosanjose pablosanjose mentioned this pull request Apr 25, 2024
@pablosanjose pablosanjose deleted the hindexing branch October 25, 2024 15:40
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 this pull request may close these issues.

Add selector indexing of AbstractHamiltonians
2 participants