functions.butterfly.chern
- chern(pval, qval)[source]
Compute Chern numbers using the Diophantine equation.
For a rational flux, the energy gaps in the Hofstadter spectrum are characterized by the integers \(s\) and \(t\), which are related by the following Diophantine equation,
\[r = qs_r + pt_r, \;\;\; |t_r|\leq\frac{q}{2}, \;\;\; s_r,t_r\in\mathbb{Z},\]where \(r\) denotes the \(r\)-th energy gap and \(t_r=\sum_{i=0}^r C_i\) is the cumulative Chern number or Hall conductivity. [DiColandrea22]