Saved in:
Bibliographic Details
Main Authors: Tobias Wolf, vigoleis, JacobMacWilliams
Format: Recurso digital
Language:
Published: Zenodo 2026
Online Access:https://doi.org/10.5281/zenodo.20032394
Tags: Add Tag
No Tags, Be the first to tag this record!
Table of Contents:
  • <h2>Highlights</h2> <p>This release closes a long stretch of internal modernisation since v0.8.0 — the parallelism layer, mean-field SCF, and BdG path all get substantial rework, and a wave of dead code is removed. CI and docs are migrated from GitLab CI to GitHub Actions, the docs site is published, and several silent regression sources are now covered by tests.</p> <h2>Parallelism rewrite</h2> <ul> <li>New <code>LatticeQM.Parallel</code> module with a single primitive <code>kspace_foreach!</code> (foreach loop) and <code>kspace_reduce!</code> (reductive loop) parameterised on a unified <code>Executor</code> type (<code>SerialExec</code>, <code>ThreadedExec</code>, <code>DistributedExec</code>). All k-loops in <code>Spectrum.bandmatrix</code>, <code>Operators.densitymatrix</code>, <code>Spectrum.dos</code>, <code>LinearResponse.opticalconductivity</code>, and <code>Spectrum.statesgrid</code> go through this primitive, gaining <code>:auto</code> / <code>:multithreaded</code> / <code>:serial</code> paths and per-task scratch reuse.</li> <li>KrylovKit replaces Arpack as the default sparse eigensolver (pure Julia, thread-safe, tighter residuals).</li> <li>BLAS pinning is automatic via <code>configure_blas!(exec)</code> to avoid the 100× oversubscription footgun on multi-core hosts.</li> </ul> <h2>Mean-field SCF</h2> <ul> <li>Shared <code>_scf_driver!</code> skeleton between <code>solveselfconsistent!</code> (k-space) and <code>solveselfconsistent_purification!</code> (real-space McWeeny).</li> <li>Anderson Type-II acceleration (<code>acceleration=:anderson</code>, opt-in) — typically 5–10× fewer iterations than linear mixing on well-conditioned problems.</li> <li>New commutator residual mode (<code>residual_norm=:commutator</code>) using <code>commutator_kspace_norm</code>, plus <code>enrichkeys!</code> to expand <code>keys(ρ)</code> for faithful <code>‖[H, ρ]‖_F</code> evaluation. Hard convergence criterion: at self-consistency <code>[H_MF, ρ] = 0</code> exactly.</li> <li><code>HartreeFock</code> modernised: <code>const</code> fields, separate <code>Th</code>/<code>Tv</code> parametrization (dense <code>h</code> with sparse <code>v</code> now supported), per-iteration Hermiticity check gated on <code>HARTREEFOCK_DEBUG[]</code>.</li> <li>Energy decomposition: separate <code>ϵH</code>, <code>ϵF</code>, <code>ϵband</code>, <code>ϵkin</code> fields with physical-sign helpers <code>hartree_energy</code> / <code>fock_energy</code>. The total HF energy is now expressible three equivalent ways at the SCF fixed point.</li> <li><code>log_callback(iter, ϵ, residual)</code> plumbing for SCF telemetry; <code>residual_fn</code> callback in <code>fixedpoint!</code> for custom convergence criteria.</li> </ul> <h2>Superconductivity (BdG)</h2> <ul> <li><code>addpairing!</code> checks closure-under-negation on <code>keys(Δ)</code>; surfaces a clean error instead of a cryptic <code>KeyError</code>.</li> <li>Final <code>ishermitian</code> guard catches drift from external mutation.</li> <li>Pairing-block helpers moved to <code>Superconductivity/hartreefock.jl</code> next to their sole caller (they'd been mis-located in <code>Meanfield/hartreefock.jl</code>).</li> </ul> <h2>Spectrum & operators</h2> <ul> <li><code>Spectrum.statesgrid</code> retrofitted onto <code>Parallel.kspace_foreach!</code>, gaining threaded mode and scratch reuse (was distributed-only via raw <code>@distributed for</code>).</li> <li><code>bandmatrix</code> skips eigenvectors when no projectors are requested — ~2.5× speedup on the dense Hermitian path used by chemical-potential solves.</li> <li><code>Operators.getcurrentoperators(::AbstractMatrix)</code> overload removed (unused, hardcoded <code>d=2</code>); the <code>Hops</code> overload now returns <code>latticedim</code> operators (was <code>spacedim</code>, producing identically-zero extras for 2D-in-3D lattices).</li> </ul> <h2>Tests added</h2> <ul> <li>Haldane Chern numbers via <code>Spectrum.berry()</code> (±1 on lower/upper bands at ±π/2 phases).</li> <li>Graphene σ_xx symmetries (xx == yy, Re σ_xy = 0, Re σ_xx ≥ 0) — the LinearResponse module had zero unit tests before.</li> <li>Anderson acceleration must converge ≥3× faster than β=0.20 linear baseline.</li> <li>Purification SCF actually iterates (regression for an in-place rebinding bug).</li> <li>Commutator residual decay.</li> </ul> <h2>Cleanup</h2> <p>~640 lines of dead code removed: <code>types_proposal.jl</code>, <code>bands_pyplot.jl</code>, <code>legacymacros.jl</code>, dead helpers in <code>TightBinding/types.jl</code> (<code>gethopsview</code>, <code>SubarrayHops</code>, <code>decidetype</code>, <code>ensuretype</code>, <code>efficientformat</code>, <code>flexibleformat</code>), and various commented-out experiment blocks in <code>Eigen.jl</code>, <code>Utils.jl</code>, <code>peierls.jl</code>.</p> <h2>Docs & CI</h2> <ul> <li>CI migrated from GitLab to GitHub Actions; matrix <code>ubuntu-latest × julia ['1.11', '1.12']</code>, both threads=2 and threads=2+procs=2 paths.</li> <li>Documentation built and deployed to https://tobiaswolf.net/LatticeQM.jl/master/.</li> <li>Action versions bumped to Node 24 (<code>actions/checkout@v6</code>, <code>actions/cache@v5</code>, <code>julia-actions/setup-julia@v3</code>) ahead of the 2026-09-16 Node 20 sunset.</li> </ul> <p> Generated with <a href="https://claude.com/claude-code">Claude Code</a></p>