RFC: bandstructure with correct connectivity around degeneracies #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #135
Fixing #135 required a deep redesign of the bandstructure machinery.
Old version: we sorted base neighbors to each band vertex by their "overlap amplitude", and chose the n of these with highest overlap, where n was the maximum of the source and target degeneracies, essentially. This turned out to be an approximation to the more correct algorithm in this PR
This PR: we build connectivity by choosing neighbors of any given band vertex so that at least one singular value of the projector between source and neighbor has square modulus greater than 1/2.
minoverlap
as a connectivity tuning parameter is no longer necessary and is removed.splitbands
kwarg inbandstructure
). The process can also be performed on a fully formed bandstructureb
with the exported functionsplitbands(b)
.Although this refactor should have little impact on a user (apart from the performance improvement), it is a profound change in the internal representation of bandstructures. In particular, we now compute and store the correct interpolating bases within each simplex, in the form of a tuple of projectors
ps
, stored inb.sbases::Vetctor{NTuple{D+1,Matrix}}
. For performance, an emptyp
is stored in the non-degenerate simplices, since that is a very common trivial case that can be reconstructed easily on the fly. The actual interpolating basis around a simplex vertexn
is computed withb.vbases[n] * p
, wherep
is the corresponding projector. This will be crucial to compute Greens functions and for shading bandstructures. It is also used to interpolate bandstructure with theb[(ϕs...)]
syntax now. This fixes the formerly broken test in #135. I believe with this PR Quantica can now compute rigorously correct bandstructure interpolations, although real-world testing will be necessary to weed out any bugs, as the PR is quite complex.