Commit 2c0990d
authored
Generalize implementation to treat non-Hermitian models (#106)
* Generalize to non-Hermitian models
* fix copilot finds & add docstring for `TightBindingTerm`
- also a fix for an error in the docs CI (add a docstring for `TightBindingTerm`)
* fix missing code loading in docs examples
* split `spectrum` into two functions: `spectrum` and `spectrum_single_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.
* move `Hermitian` wrapper to instantiation, not at callers
* update nonhermitian docs
* Make model visualization work for `D=1` as well
- 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
* add 1D visualization examples to non-Hermitian docs
- also fix some writing that referenced terms hopping the opposite way relative to what they actually did
- extend non-Hermitian SSH example a bit
* ensure that NONHERMITIAN models return terms that are "hermiticity-paired"
- 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 -δ.
* fix to `spectrum`; wrongly had `transform` as arg instead of kwarg.
* polish docs/src/nonhermitian.md and flesh out non-Hermitian SSH example
* improve consistency of arrow-shortening in model visualization23 files changed
Lines changed: 1100 additions & 304 deletions
File tree
- docs
- src
- examples
- ext
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
This file was deleted.
0 commit comments