Open BacAmorim opened 10 months ago
This can totally be done, and it is quite trivial, since we have HybridSparseMatrix(b::OrbitalBlockStructure{B}, flat::SparseMatrixCSC{Complex{T},Int})
constructors that can convert the flat input matrices to the required hybrid matrices.
I would probably make the second argument a Dict, though, like Dict(SA[0] => h0, SA[1] => h1,...)
.
Regardless of this functionality, that would be good to have, the Wannier90 problem could alternatively/additionally use an approach of the type @hopping([s´, s] -> wannier90((s´.dn, s´.i), (s.dn, s.i))
, as described in #229, to import Wannier90 files, where wannier90::Wannier90
would be an object created from a Wannier90 output file, so we don't need to build the Dict
as an intermediate object.
With #229 and #264 now merged, I'm wondering if we still need this. @BacAmorim, could you make an argument for the usecase?
It would be useful to expose the creation of Hamiltonians / general operators by directly providing the matrices of the harmonics.
The interface could be the following:
Would create a Quantica Hamiltonian with 3 harmonics, where
h0
,h1
andh2
are matrices. This approach could be used to create Quantica Hamiltonians from a Wannier90 calculation, with the Harmonics being read using WannierIO.jl See also Wannier90 interface #4