Carrier compensation and even band filling in a square lattice (source code)

= Carrier compensation and even band filling in a square lattice

With <spin degeneracy> two, one full square-zone band has density $Q^2/(2\pi^2)$. Thus $n_e-n_h=n-Q^2/(2\pi^2)$. If $Q=\alpha\sqrt{2\pi n}$, compensation requires $\alpha=\sqrt\pi$ and the real-space cell contains two electrons. A global gap is also necessary for an insulator.