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

Matrix-free design for KPM methods #66

Open
pablosanjose opened this issue Jun 12, 2020 · 0 comments
Open

Matrix-free design for KPM methods #66

pablosanjose opened this issue Jun 12, 2020 · 0 comments

Comments

@pablosanjose
Copy link
Owner

pablosanjose commented Jun 12, 2020

When dealing with very large systems, it might be undesirable to materialize the system in memory when using the KPM functionality. In these cases other specialized packages (e.g. Kite) use matrix-free approaches, by implementing matrix-vector multiplications without storing the matrix in memory.

We have the underpinnings to do this quite easily in Quantica. We can use a Hamiltonian{<:Superlattice} for this.

The idea here could be something like this

  • Move the 'modifiers' functionality currently in unitcell into hamiltonian(::Superlattice), so that a Hamiltonian{<:Superlattice} can incorporate the modifiers without materializing into a Hamiltonian{<:Lattice}
  • Create a new type of lazy LazyBlochMatrix::AbstractArray, to be passed to bloch!(::LazyBlochMatrix, h::Hamiltonian{<:Superlattice}, phases), that incorporates the base harmonics of h, any modifiers, any bloch phases if present, and the superlattice
  • Implement a 5-argument mul! method for LazyBlochMatrix that implements the product on a vector as efficiently as possible, preferably using threads and SIMD. This can potentially even be faster than the generic matrix-vector multiplication because of the fixed banded structure of all Bloch Hamiltonians of superlattices.
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

No branches or pull requests

1 participant