diag_func(t_val, p_val, q_val, A_UC_val, vec_group, k_val, dJ_val, J_idx_val)[source]

The diagonal function.

The function that populates the diagonals of the Harper matrix is given by

\[\begin{split}\Lambda_{l, n} = - \sum_\kappa \sum_{\langle ij \rangle_{\kappa}^l} t_\kappa e^{\\\mathrm{i}\theta_{ij}} e^{\\\mathrm{i}\\\mathbf{k}\cdot\\\mathbf{r}},\end{split}\]

where \(\langle \dots \rangle^l_\kappa\) denotes the subset of \(\kappa\)-th nearest neighbors with a net \(y\) unit cell displacement of \(l\), \(\theta_{ij}\) is the Peierls phase, \(\\\mathbf{k}\) is the momentum vector, and \(\\\mathbf{r}\) is the displacement vector.

  • t_val (list) – The list of hopping amplitudes in order of ascending NN.

  • p_val (int) – The numerator of the flux density.

  • q_val (int) – The denominator of the flux density.

  • A_UC_val (float) – The unit cell area in units of a2 (possibly scaled by a periodicity factor).

  • vec_group (ndarray) – The array of relevant nearest neighbors grouped by dJ.

  • k_val (ndarray) – The momentum vector.

  • dJ_val (int) – The y-displacement in terms of unit cells.

  • J_idx_val (int) – The y-position in terms of unit cells.


term – The diagonal term.

Return type: