Skip to content

Releases: TaN-MM-Org/hamop

v0.5.0: Hofstadter, point-group detection, dephasing networks, Chern marker, Fourier interpolation

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 05 Sep 08:15
139edd9

Every 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.

v0.4.0: magnetic fields, symmetry folding, SCBA, two Berry frames, dipole optics, sparse everything

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 04 Sep 22:52
3a21102

Every item on the v0.3.0 "not yet implemented" list is now implemented, each pinned to exact anchors (100 tests total, up from 69):

Magnetic fields by Peierls substitution (with_peierls): uniform out-of-plane fields on finite models (Peierls, Z. Phys. 80, 763 (1933)). The midpoint line integral is exact for linear gauges, so the anchors are machine-precision statements, not approximations: the flux-threaded ring reproduces 2t cos((2 pi j + Theta)/N) to 1e-12, Landau and symmetric gauges give identical spectra, the plaquette-flux product is exactly e^(2 pi i phi), the spectrum is exactly periodic in the flux quantum -- and the lowest Landau level of a 1600-site square flake sits at -4|t| + hbar omega_c/2 to 3%, macroscopically degenerate. Periodic models are refused (magnetic unit cells stay out of scope, stated).

Point-group k-mesh folding (symmetry_fold): folds the grid by a user-supplied point group, and refuses anything unverified -- each operation must map the reciprocal lattice to itself (integer fractional matrix) AND leave the spectrum invariant at random test k-points. Graphene's C6 fold (about x6 fewer points) reproduces full-grid DOS and chemical potentials to 1e-12; the fold also passes on the time-reversal-broken Haldane model (C6 remains a spectral symmetry -- verified, not assumed) while a 90-degree rotation and a bond-stretched model are refused. Valid for spectral observables only, stated plainly.

Elastic self-consistent Born self-energy (scba_transmission): Sigma_i = W^2 diag(G_ii) iterated to a verified fixed point (residual < 1e-10, Im Sigma <= 0). Anchors: W = 0 is the coherent result exactly, and the central layer of a long chain reproduces the independent bulk scalar SCBA equation -- built in the tests from the closed-form chain Green function, a completely separate code path -- to 1e-3. Inelastic (Keldysh) electron-phonon SCBA and vertex corrections remain out of scope, stated.

Berry phases beyond the Loewdin frame (frame="atomic"): links built from the same atomic-gauge assembly and site-diagonal position convention as the velocity operator, midpoint overlap metric, explicit zone-wrap closure. The Chern number is frame-independent and the two frames return the same exact integers on the overlap Haldane model in both phases; the atomic-frame SSH Zak phases are -/+ pi/2 (the intracell-position contribution) with the exact pi difference, and inversion antisymmetry survives the overlap.

KPM for nonorthogonal bases: kpm_dos now runs the recurrence on S^-1 H through a sparse LU of S. The nonorthogonal chain reproduces its band-center DOS 1/(2 pi |t|), integrates to the orbital count, and vanishes identically outside the exact band edges 2t/(1 +- 2s).

Sparse optics, topology and transport: kpm_sigma (double-Chebyshev Kubo-Greenwood conductivity, Weisse et al., RMP 78, 275 (2006)) matches the kernel-independent molecular line weight to 3% and the dense Kubo route on a dimerized chain to 2%; berry accepts solver="sparse" (same integers as dense, C = 2 on stacked Haldane copies); transmission_sparse (sparse-LU device solver) equals dense direct inversion to machine precision, overlap and complex Sigma(E) included. bloch_derivative_sparse completes the sparse assembly.

Intra-atomic dipole velocity term (model.set_dipole): v gains i(E_n - E_m) X_nm from on-site position blocks. The site-diagonal approximation leaves an atomic s->p transition exactly dark; the dipole block makes it bright with the hand-derived peak spin 4 pi (Delta d)^2/(eta sqrt(2 pi) Delta) to 1e-3, and a dipole that commutes with H changes nothing identically. Orthogonal bases only, refused otherwise.

Install: pip install hamop -- archived on Zenodo under concept DOI 10.5281/zenodo.22311381.

v0.3.0: Hall tensor, nonorthogonal topology, spin-orbit, dephasing, sparse solvers

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 04 Sep 22:15
6859191

Every item on the v0.2.0 "not yet implemented" list is now implemented, each pinned to exact anchors (69 tests total, up from 40):

Finite-frequency Hall conductivity (sigma_tensor): the full complex interband conductivity tensor sigma_ab(omega). Its omega -> 0 Hall limit reproduces the TKNN quantization sigma_xy(0) = C e^2/h (PRL 49, 405 (1982)) against the package's own Chern number to 1e-6 -- sign included, via two independent routes through the code. Vanishes in the trivial Haldane phase, antisymmetric to machine precision, longitudinal part agrees with sigma_optical, exactly gauge invariant with overlap.

Nonorthogonal topology: Berry phases, Berry curvature and Chern numbers now accept overlap models through the smooth Loewdin frame d = S(k)^1/2 c -- a bundle isomorphism, so the Chern number is frame-invariant. Anchors: the overlap-deformed Haldane model keeps its exact integer Chern numbers in both phases; the overlap-SSH chain keeps quantized Zak phases with the exact pi difference.

Spin and spin-orbit as a first-class convention (with_spin, PAULI, kane_mele): spin doubling (exact doublets), Pauli-block Zeeman/SOC terms (splitting exactly 2B), and the Kane-Mele model (PRL 95, 226801 (2005)) -- equal to two Haldane copies to machine precision, spin-orbit gap exactly 6 sqrt(3) lambda_so at K, total Chern zero, spin sectors +/-1.

Interaction self-energies in transport: transmission / transmission_direct accept per-layer retarded Sigma(E) (constant or callable); a constant Sigma reproduces the impurity closed form, and RGF equals direct inversion with complex Sigma to machine precision. buttiker_transmission adds the current-conserving dephasing probe (PRB 33, 3020 (1986)): exact coherent limit at gamma = 0, hand-written scalar closed form on a single-site device, resonance suppression in a double barrier. Self-consistent (SCBA-type) self-energies remain out of scope, stated plainly.

Sparse / large systems (bloch_sparse, lowest_bands, kpm_dos): CSR assembly identical to the dense path element for element, Lanczos low-energy bands (generalized problem included) pinned to the open chain's closed form 2t cos(pi j/(N+1)), and the kernel polynomial DOS with the Jackson kernel (Rev. Mod. Phys. 78, 275 (2006)), matching the chain's closed-form DOS and integrating exactly to the orbital count.

Time-reversal k-mesh folding: monkhorst_pack(mesh, time_reversal=True) halves the grid for k-even observables, reproducing full-grid DOS, sigma and Drude weight to 1e-12; offered only when every block is real, refused otherwise.

Also: optional overlap parameters on the ssh and haldane builders, README rewritten with the new validation anchors and the updated honest scope list.

Install: pip install hamop -- archived on Zenodo under concept DOI 10.5281/zenodo.22311381.

v0.2.0: topology, Drude weight, verified device partitioning

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 04 Sep 21:43
be41c86

Three new capability areas, each pinned to exact anchors (40 tests total, all closed-form or machine-precision):

Topology (new module berry): Wilson-loop Berry phases, lattice Berry curvature and Chern numbers in the gauge-invariant formulation of Fukui, Hatsugai and Suzuki (J. Phys. Soc. Jpn. 74, 1674 (2005)). Validated on the Haldane model's known phase diagram (Haldane, PRL 61, 2015 (1988)): Chern number an exact integer to 1e-12, +/-1 inside the topological phase, 0 outside, sign reversal with flux direction, zero total over all bands; the SSH chain's Zak phase is quantized and its two dimerizations differ by exactly pi. New lattice builders ssh and haldane. Orthogonal bases only for now; models with overlap are refused explicitly.

Intraband optics (drude_weight): the Drude weight from the same nonorthogonal velocity operator as the interband conductivity, exactly invariant under a shift of the energy zero, pinned to the closed form 8 spin |t| a of the half-filled chain. sigma_optical gains a Lorentzian lineshape option, validated on the exact molecular peak height.

Verified device partitioning (principal_layers): a finite model is cut into NEGF principal layers automatically, reproducing hand-built blocks exactly and the single-impurity transmission closed form end to end - and a layer width smaller than the interaction range is refused rather than silently truncated.

Also: k_path band-structure path helper, DOI badge (Zenodo concept DOI 10.5281/zenodo.22311381), README updated with the new validation anchors and honest scope.

v0.1.1: first archived release

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 04 Sep 21:23
a32c23c

Identical in content to v0.1.0 (see its notes for the full description and the closed-form validation list); this release exists so the package's Zenodo archive begins with its first preserved version, now that the repository is connected to Zenodo. Also the first version whose PyPI upload runs through the configured trusted publisher.

One tight-binding Hamiltonian, every observable: bands, DOS, Kubo-Greenwood optical conductivity and Landauer (NEGF) transmission from the same real-space blocks, nonorthogonal bases included. Validated against closed forms (23 tests). Dependencies: NumPy and SciPy.

v0.1.0: one Hamiltonian, every observable

Choose a tag to compare

@Tanvir-Mahmud-Mahim Tanvir-Mahmud-Mahim released this 04 Sep 20:53
8042eeb

First release. Build a tight-binding Hamiltonian once, as real-space blocks in an orthogonal or nonorthogonal (LCAO-style) basis, and compute its band structure, density of states, Kubo-Greenwood optical conductivity and Landauer (NEGF) transmission from the same Bloch matrices, so spectral, optical and transport statements about one model can never disagree.

Validated against closed forms in the test suite (23 tests): exact chain and SSH dispersions, the analytic chain density of states, graphene Dirac-point closure and the universal optical sheet conductivity e^2/(4 hbar) as the absolute unit anchor, a hand-derived molecular absorption line, exact gauge invariance of the nonorthogonal Kubo velocity, the closed-form chain surface Green function, unit and multichannel transmission, the closed-form single-impurity transmission, and machine-precision agreement between the recursive Green function sweep and dense direct inversion.

Methodological basis: the engine distilled from the pipeline of "Learning the quantum Hamiltonian of defective monolayer MoS2 reveals collective vacancy brightness decoupled from defect count" (https://github.com/Tanvir-Mahmud-Mahim/mos2-vacancy-optics). Dependencies: NumPy and SciPy.