How to calculate Chern number of a band numerically? I have a tight-binding Hamiltonian with an aperiodic potential which shows non-trivial topological properties. I wanted to calculate the Chern number of it's bands. How can I do it numerically?
 A: I hope this is not too late to do some good.  You have many options to compute a Chern number numerically.  There are several real-space formulas and a formula based on scattering theory.  Let me discuss some of the real-space formulas.
The first is called, in physics anyway, the Bott index.  This will work if the following hold:  you are on a regular lattice; the Hamiltonian involves hopping terms only to nearest and next-nearest neighbors; the ratio of the norm of the Hamiltoninan to the gap size is about 10 or smaller.
To compute the Bott index, take a lattice model of about 15-by-15 and impose periodic boundary conditions.  Now take the (diagonal) position observables, scale them so the width and length is $2\pi$, and form exponentials $U_0=\mathrm{exp}(iX)$  and $V_0=\mathrm{exp}(iY)$.  Do a full eigensolve of the Hamiltoninan and find the projector $P$ corresponding to all energy below a certain gap.  Now form invertible matrices $U= PU_0P + (I-P)$ and $V= PU_0P + (I-P)$.
Compute all eigenvalues of $VU{V^\dagger}{U^\dagger}$, take the log of all of these, now sum them up.  The real part of this complex number will be the Chern number (or minus the Chern number).
Be sure to repeat this with a larger system size, to get some evidence you are avoiding the effects of small system size.  As to why, and when, the Bott index equals the Chern number, you can look here:  "On the equivalence of the Bott index and the Chern number on a torus, and the quantization of the Hall conductivity with a real space Kubo formula" by
Toniolo, Arxiv:1708.05912.
A recent decription of the Bott invariant is here:  "Topological Photonic Quasicrystals: Fractal Topological Spectrum and Protected Transport" by Bandres, Rechtsman, and Segev, Phys. Rev. X, 6(2), 011016, 2016.  Sample code implementing this in Matlab is here:   http://digitalrepository.unm.edu/math-statsdata/5/
This invariant will fail you if you have a small gap between bands.  If the gap is about 1/100 of the norm of the Hamiltonian, you will need system size like 100-by-100, and so the dense matrix methods above are too slow and memory intensive.  If you are going beyod the classical band insulator, say working on a quasicyrstal, then periodic boundary conditions will be difficult to define so as to preserve the gaps.  The mathematical version Bott index is twenty years old and not suited to large matrix calculations.
A more modern approach is to use a local index.  For example, there is an index due to Kitaev that was computed as a local index here:  "Amorphous topological insulators constructed from random point sets" by Mitchell, Nash, Hexner, Turner & Irvine, Nature Physics (2018)
doi:10.1038/s41567-017-0024-5.
My take on a local index, which works with sparse matrix calculations and so on rather large systems, is detailed here:  "K-theory and pseudospectra for topological insulators", Annals of Physics Volume 356, 383-416, 2015.  Sample code is also here:  http://digitalrepository.unm.edu/math-statsdata/5/ 
There are issues in how to rescale the position observables with combining these into a single matrix.  These are just now getting resolved in joint work with Scultz-Baldes available on the Arxiv.  
I suggest you try the Bott index unless you have an exotic situation.  Best of luck.
