v0.5.0: Hofstadter, point-group detection, dephasing networks, Chern marker, Fourier interpolation
LatestEvery item on the v0.4.0 "not yet implemented" list is now implemented, each pinned to exact anchors (119 tests total, up from 100; CI on Python 3.9 through 3.13).
Magnetic fields in periodic systems (magnetic_supercell): Hofstadter magnetic supercells at rational flux p/q, with a self-validating gauge check that refuses an incompatible flux and names the equivalent-flux remedy. Anchors: zero flux reproduces exact band folding; the pi-flux square lattice reproduces E = +-2|t| sqrt(cos^2 kx + cos^2 ky) to machine precision; the lowest 1/3-flux Hofstadter band's Chern number matches sigma_xy on the magnetic cell (TKNN, sign included), closing the whole quantization circle inside the package.
Automatic point-group detection (find_point_group): exact enumeration of the lattice automorphisms from the cell's Gram matrix, filtered by the spectral check -- no table lookup, nothing asserted that is not verified on the Hamiltonian. Group orders 12 (hexagonal), 8 (square), 2 (chain), a strict subset on a bond-stretched crystal, and the detected group folds the DOS exactly.
Multi-probe dephasing network (multiprobe_transmission, D'Amato-Pastawski, PRB 41, 7411 (1990)): probes on many layers, solved by exact linear-response current conservation. gamma=0 is coherent, a single probe equals the Buttiker formula to machine precision, current is conserved to machine precision, and uniform dephasing gives Ohmic linear-in-length resistance (R^2 > 0.9999).
Real-space topology of finite systems (chern_marker, Bianco-Resta, PRB 84, 241106(R) (2011)): the local Chern marker, whose whole-system total vanishes to 1e-8 and whose bulk average equals the periodic Chern number, sign included, and vanishes in the trivial phase. A finite-system KPM Hall conductivity is deliberately NOT offered: Im Tr[P x Q y] = 0 for any bounded system in the site-diagonal position formulation -- itself now a test -- so such a routine could only return broadening artifacts. The marker is the honest observable.
Intra-atomic dipoles in nonorthogonal bases: the eigenstate identity <n|[H,x]|m> = (E_n - E_m)<n|x|m> makes the orthogonal expression exact with overlap too. Two uncoupled atoms double exactly; energy-zero gauge invariance holds with overlap and dipole to 1e-10. The dipole term now also enters kpm_sigma through the exact sparse operator i(HX - XH).
Fourier band interpolation (fourier_interpolation): the exact-arithmetic Fourier backbone of Wannier interpolation -- sample H(k), S(k) on a grid, transform to H(R) on the torus, evaluate anywhere; exact to 1e-12 when the hopping range fits the sampling window (chain, nonorthogonal chain, graphene, SSH, Haldane), with a residual check that detects undersampling. (Maximally localized Wannier functions are the localization procedure built on this step and remain out of scope, stated plainly.)
Future-proofing: a CHANGELOG covering every release, and the CI matrix widened to Python 3.9, 3.11, 3.12 and 3.13.
Everything the package's original design roadmap named is now implemented. The scope items that remain -- inelastic Keldysh electron-phonon SCBA, maximally localized Wannier functions, and electron-electron self-consistency -- are research-frontier machinery with genuine methodological choices, kept out precisely so a user can tell a designed boundary from a gap.
Install: pip install hamop -- archived on Zenodo under concept DOI 10.5281/zenodo.22311381.