You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
unitcell
intohamiltonian(::Superlattice)
, so that aHamiltonian{<:Superlattice}
can incorporate the modifiers without materializing into aHamiltonian{<:Lattice}
LazyBlochMatrix::AbstractArray
, to be passed tobloch!(::LazyBlochMatrix, h::Hamiltonian{<:Superlattice}, phases)
, that incorporates the base harmonics of h, any modifiers, any bloch phases if present, and the superlatticemul!
method forLazyBlochMatrix
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.The text was updated successfully, but these errors were encountered: