Releases: Quantum-Many-Body/ExactDiagonalization.jl
Release list
v0.3.7
ExactDiagonalization v0.3.7
Overview
This release focuses on numerical robustness improvements to the band Lanczos algorithm and adopts the lattice-direct convenience API from QuantumLattices v0.15.4.
Band Lanczos: Dual Orthogonalizer Support & Separate Tolerances
The BandLanczosIterator and BandLanczosMethod now support independent choice of orthogonalizers for the QR decomposition step and the reorthogonalization step, along with separate convergence tolerances.
New Orthogonalizer Options
Both ModifiedGramSchmidt (single-pass) and ModifiedGramSchmidt2 (two-pass, superior numerical orthogonality) are now available independently for:
orthᵣ— used inblock_qr!for rank determination of initial and residual blocks.orthₒ— used inblock_reorthogonalize!for reorthogonalization against the Krylov basis during the Lanczos recurrence.
Default: orthᵣ = ModifiedGramSchmidt2(), orthₒ = ModifiedGramSchmidt().
Custom block_qr! and block_reorthogonalize! implementations with MGS2 paths were added to support this.
Separate Tolerances
The convergence tolerance tol (Lanczos residual norm) and the QR rank-determination tolerance tolᵣ are now separate parameters, replacing the single tolerance previously used for both purposes.
Constructor Changes
BandLanczosIterator (old → new):
# v0.3.6
BandLanczosIterator(operator, x₀, maxdim, tol=1e-10; keepvecs=true)
# v0.3.7
BandLanczosIterator(operator, x₀, maxdim, tol=2e-8, tolᵣ=1e-8,
orthᵣ=ModifiedGramSchmidt2(), orthₒ=ModifiedGramSchmidt();
keepvecs=true)BandLanczosMethod (old → new):
# v0.3.6
BandLanczosMethod(; tol=1e-10, keepvecs=true, maxdim=200)
# v0.3.7
BandLanczosMethod(orthᵣ=ModifiedGramSchmidt2(), orthₒ=ModifiedGramSchmidt();
tol=2e-8, tolᵣ=1e-8, keepvecs=true, maxdim=200)Backward compatibility with the v0.3.6 constructors is preserved — all existing positional and keyword arguments remain at the same positions; new parameters (tolᵣ, orthᵣ, orthₒ) are appended with sensible defaults.
Comprehensive Docstrings
All BandLanczos module structs and functions now have full docstrings documenting their mathematical roles, fields, and interface contracts.
Lattice-Direct API for ReciprocalPath & BrillouinZone
Tests have been updated to use the lattice-direct convenience constructors:
# v0.3.6
ReciprocalPath(reciprocals(unitcell), rectangle"Γ-X-M-Γ")
BrillouinZone(reciprocals(unitcell), 100)
# v0.3.7
ReciprocalPath(unitcell, rectangle"Γ-X-M-Γ")
BrillouinZone(unitcell, 100)This matches the API introduced in QuantumLattices v0.15.4 where ReciprocalPath and BrillouinZone accept a lattice directly, deriving the reciprocal vectors internally.
Affected test files: test/Assignments.jl (7 call sites), test/GreenFunctions.jl (2 call sites).
Dependency Bump
| Dependency | v0.3.6 | v0.3.7 |
|---|---|---|
| QuantumLattices | 0.15.0 | 0.15.4 |
Files Changed
| File | Summary |
|---|---|
Project.toml |
Version 0.3.6 → 0.3.7; QuantumLattices compat 0.15.0 → 0.15.4 |
src/BandLanczos.jl |
Dual orthogonalizer support, separate tolerances, custom MGS2 block_qr!/block_reorthogonalize!, docstrings |
src/GreenFunctions.jl |
BandLanczosMethod updated to expose new parameters and Base.show |
src/ExactDiagonalization.jl |
Version bump (docstring) |
test/BandLanczos.jl |
Tests for new constructor variants and MGS2 orthogonalization |
test/GreenFunctions.jl |
Lattice-direct API migration for ReciprocalPath |
test/Assignments.jl |
Lattice-direct API migration for ReciprocalPath/BrillouinZone |
Summary
- Major: Band Lanczos now supports dual independent orthogonalizers (
ModifiedGramSchmidt/ModifiedGramSchmidt2) with separate convergence and QR-rank tolerances, improving numerical stability for challenging problems. - Minor: Test suite updated to use QuantumLattices lattice-direct convenience API.
v0.3.6
ExactDiagonalization v0.3.6
Refactored
ED Constructor Overhaul — Pre-built OperatorGenerator Path
The ED (exact diagonalization) constructor family has been streamlined. The primary driver is support for pre-built OperatorGenerator instances — allowing downstream code to construct the operator system with full control (e.g., via Embedding + OperatorGenerator(operators, bonds, hilbert, terms)) and then hand it directly to ED.
New constructors (4 variants):
ED(system::OperatorGenerator, dtype)— from a pre-built operator system, using the full Hilbert space.ED(lattice, system::OperatorGenerator, dtype)— same with an explicit lattice.ED(system::OperatorGenerator, qn, dtype)— from a pre-built operator system, restricted to given quantum number sector(s).ED(lattice, system::OperatorGenerator, qn, dtype)— same with an explicit lattice.
In each case, the Table and Sector are constructed internally from the OperatorGenerator's Hilbert space — the caller no longer needs to manage them.
Streamlined from-scratch constructors:
ED(lattice, hilbert, terms; nbrs) # full Hilbert space
ED(lattice, hilbert, terms, qn; nbrs) # quantum-number-restrictedThese now build an OperatorGenerator internally via Generator(bonds(lattice, neighbors), hilbert, terms) and delegate to the new pre-built-OperatorGenerator constructors, eliminating the intermediate table/sectors plumbing.
Removed (Dead Code)
The following constructor signatures have been removed:
ED(system, table, sectors)— pre-built system but with externally-suppliedtableandsectors.ED(lattice, system, table, sectors)— same with lattice.ED(lattice, hilbert, terms, table, sectors)— from-scratch with externally-supplied table.ED(lattice, hilbert, terms, table, quantumnumbers)— hybrid constructor accepting bothtableand quantum numbers.
The table and sector building logic has been folded into the new constructors, so callers no longer need to construct a Table(Metric(EDKind(hilbert), hilbert)) manually.
Internal Changes
- Added
OperatorGeneratorto the imports fromQuantumLattices. - Test suite updated: the
ED(system, table, Sector(...))call site replaced withED(system, qn); theED(system)single-argument constructor is newly covered. - Version bumped to 0.3.6.
Migration Guide
| v0.3.5 pattern | v0.3.6 replacement |
|---|---|
ED(system, table, sectors) |
ED(system) (full space) or ED(system, qn) (sector-restricted) |
ED(lattice, system, table, sectors) |
ED(lattice, system) or ED(lattice, system, qn) |
ED(lattice, hilbert, terms, table, sectors) |
ED(lattice, hilbert, terms) or ED(lattice, hilbert, terms, qn) |
ED(lattice, hilbert, terms, table, qn) |
ED(lattice, hilbert, terms, qn) |
In all cases, manual Table and Sector construction is no longer needed — it's handled internally.
Summary
v0.3.5
ExactDiagonalization v0.3.5
Changes
Adapt to QuantumLattices type hierarchy refactoring
- Widened internal
valtypeconstraints inEDMatrixizationandSectorFilterfromOperators/OperatorSumto the more generalOperatorSet, aligning with upstream changes in QuantumLattices. - Removed the unused
eagerkeyword argument from theGeneratorcall within theEDconstructor. - Bumped
QuantumLatticesdependency from 0.14.8 to 0.15.0.
Configuration fingerprint support
- Added
contenttoconfigforEDMatrixization, exposing the lookup table and bra-ket sector identifiers. - Added
contenttoconfigforED, aggregating lattice, system, and matrixization configuration for use in SHA-512 based configuration stamping.
Display improvements
Base.showforAbelianBasesnow uses MIME"text/plain", with grouped exponent notation (e.g.,(S=1/2^[1 2 3] ⊗ ...) => QN) instead of the previous bracket-delimited format.Base.showforBinaryBasesnow uses MIME"text/plain", with arrow (=>) delimiters replacing colon (:) delimiters.Base.showforSectornow delegates toMIME"text/plain"by default.EDMatrixgainsshowasleaf(returningfalse) and delegatesshowtoshowcontentfor unified display formatting with the QuantumLattices ecosystem.- Added
Base.showforBandLanczosMethod(prints parameter values) andExactMethod.
Housekeeping
- Expanded
.gitignoreto exclude data files (*.dat,*.dlm), lattice files (*.qld,*.qlc), and tool directories (.vscode/,.claude/).
v0.3.4
ExactDiagonalization v0.3.4
New Features
-
normalizefunction for ExactDiagonalization: added anormalizefunction that adjusts term factors for exact diagonalization. ForPairingterms, the factor is multiplied by1//2because ED does not use BdG-form symmetrization unlike TBA. -
Sectorconstructor for ℤ₁ quantum number: added a newSector(::ℤ₁, hilbert, ...)constructor, enabling sector construction with ℤ₁ quantum number symmetry. -
BandLanczosMethodkeepvecsdefault changed totrue: thekeepvecsparameter now defaults totrue, retaining Lanczos vectors by default for better usability.
Dependency Updates
QuantumLattices:0.14.4→0.14.7
Tests
- Added
GreenFunction ED vs TBAandGreenFunction ED vs BdGtest sets comparing ED results against TBA/BdG calculations
v0.3.3
ExactDiagonalization v0.3.3
v0.3.2
ExactDiagonalization v0.3.2
This release improves the RetardedGreenFunction API, fixes a spectral function calculation bug, and enhances logging and code clarity.
New features
- Add e₀, v₀, sector₀ keyword arguments to RetardedGreenFunction constructors. When all three are provided, eigen-computation is skipped for efficiency.
Bug fixes
- Fix spectral function calculation by removing an erroneous factor of 2.
- Fix scalartype dispatch for ED with L<:Union{AbstractLattice, Nothing} and CategorizedGenerator.
Improvements
- Rename reset! to set! in GreenFunctions to better reflect its purpose.
- Rename Greek-letter variables (Ω → v₀, E₀ → e₀, sector → sector₀) to Latin equivalents for clarity and Julia naming conventions.
- Add RawStderrLogger for verbatim @info log output; refine logging messages throughout GreenFunctions.jl.
- Reformat function signatures in RetardedGreenFunction for readability.
- Use scalartype(ed) instead of scalartype(Ω) in GreenFunction for consistency.
Dependencies
- Add Logging dependency to Project.toml.
v0.3.1
ExactDiagonalization v0.3.1
Release Notes for ExactDiagonalization v0.3.1
Features
-Makie plotting support: Added ExactDiagonalizationMakieExt extension providing Makie-based plotting for StaticChargeStructureFactor, StaticSpinStructureFactor, and SpinCoherentStateProjection. Tests now run both Plots and Makie backends with separate output files.
Bug Fixes
- GreenFunction sector calculation: Fixed incorrect sector computation by using adjoint(operator) instead of raw operator. Also switched to OrderedDict to preserve operator ordering.
v0.3.0
ExactDiagonalization v0.3.0
ExactDiagonalization v0.3.0 Release Notes
Version Information
- Version: v0.3.0
- Release Date: 2026-03-12
- Julia Version: 1.10 - 1.12
Dependency Updates
- QuantumLattices: 0.14.2
- RecipesBase: Converted to weakdeps, now using extension mechanism
Breaking Changes
- See new features
New Features
BandLanczos Module
- Added new
BandLanczosmodule withBandLanczosIteratorandBandLanczosFactorizationtypes that extend KrylovKit's BlockLanczos with optional control over keeping Krylov basis vectors
Green Functions
- Added
GreenFunctionandRetardedGreenFunctiontypes for calculating Green's functions withBandLanczosMethodandExactMethodmethods
Quantum Number System
QuantumNumbersand related functions migrated from QuantumLattices- Added action of
QuantumOperatoronAbelianQuantumNumber
Bug Fixes
- Fixed various documentation and typo issues
Closed issues:
- Low cpu usage in 4*4 case for Fermi Hubbard Model (#9)
v0.2.0
ExactDiagonalization v0.2.0
Breaking changes
- Redefine the construction function of
BinaryBases, which uses quantum numbers, such asℕ,𝕊ᶻ,𝕊ᶻ ⊠ ℕ,ℕ ⊠ 𝕊ᶻor none to initialize. - Rename
SpinBasestoAbelianBases, which is in principle not restricted to spin systems any more, and uses quantum numbers, such as𝕊ᶻor none to initialize. - Generic interface
Sectorhas been modified in accordance withBinaryBasesandAbelianBases. - Redefine the construction function of
ED, which uses quantum numbers, such asℕ,𝕊ᶻ,𝕊ᶻ ⊠ ℕ,ℕ ⊠ 𝕊ᶻor none to initialize. - Remove
TargetSpace. BinaryBasisRange,SectorFilterandbasistypeare no longer exported.
New features
- Add
EDEigenandEDEigenData. - Add
GroundStateExpectationandGroundStateExpectationData. - Add
StaticTwoPointCorrelatorandStaticTwoPointCorrelatorData. - Add
SpinCoherentState,SpinCoherentStateProjectionandSpinCoherentStateProjectionData. - Add
prepare!(::ED; timer),prepare!(::Algorithm{<:ED})andrelease!(::Union{ED, Algorithm{<:ED}; gc)for more flexible memory control. - Add
releasekeyword argument tomatrix(::Union{ED, Algorithm{<:ED}}, args...; kwargs...)andeigen(::Union{ED, Algorithm{<:ED}}, args...; kwargs...)so that the memory cached to construct the sparse matrix representation of the Hamiltonian can be released immediately after the construction.
Merged pull requests:
- spin coherent states (#7) (@qscdesz)
- Green function (#8) (@ZongYongyue)
