Generalize implementation to treat non-Hermitian models#106
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
- also a fix for an error in the docs CI (add a docstring for `TightBindingTerm`)
…k` for multiple/single **k**-points - `spectrum_single_k` now handles case where a *single* **k**-point is provided and `spectrum` is strictly for *multiple* of **k**-points - by splitting up like this, we also enable the introduction of convenience method for 1D models, using `spectrum(..., ks)` with a plain (abstract) vector of real numbers; this is just much nicer in day-to-day use.
a6b4e52 to
9cb8eea
Compare
Collaborator
Author
|
Seems to work well now; there's some examples in the preview docs. A few things that would still be good to do before merging:
|
0824582 to
ecc22df
Compare
- mainly, this is a matter of lifting 1D properties (points and unit cell boundaries) to 2D points - while there, we also fix a few old bugs (e.g., the fact that `context.limits` was not properly propagated, which made visualization of model terms with different extents display in a way where their overall extent was not comparable) - co-developed with Claude
- also fix some writing that referenced terms hopping the opposite way relative to what they actually did - extend non-Hermitian SSH example a bit
…ired" - This ensures that every term in a nonhermitian TB model has a counterpart that it would be mapped to under Hermitian conjugation. This is just much more natural and aligned with what a user would expect. The issue only arose for diagonal blocks of a Hamiltonian, with the canonical case being e.g., a (2c|A) EBR model in p4. - This also fixes a related issue, arguably a bug, in the (ANTI)HERMITIAN case, where some orbits weren't sufficiently "wide" (not enough hopping terms) to close under (anti-)Hermiticity, unless `Rs` was provided in such a way that for every positive element `R` there was also a negative element `-R`. We fix this by explicitly checking in `add_reversed_hoppings!` whether for every a→b+R term of separation δ, there is a corresponding b→a-R term at separation -δ.
Collaborator
Author
|
I will merge this as-is now Antonio: I've tested the new functionality in a number of ways and I'm confident it's sound. There are also a few fixes and improvements that aren't related to the non-Hermitian aspect: but they're all in their own separate commits. So I'll merge without squashing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows us to build non-Hermitian tight-binding models via
tb_hamiltonian(cbr, Rs, Val(NONHERMITIAN)).There's some restructuring of the various structs here to encode the kind of hermiticity a model has in the type domain, so that we can be guaranteed that
spectrumtype-stably returnsFloat64in the Hermitian case. Aside from that, it's actually mainly a matter of removing assumptions about hermiticity.Pushing early (WIP; docs e.g., are not yet done), to see what docs and CI look like.