rewrite lattice.get_h0() to include the UHF case