Releases · Quantum-Many-Body/ExactDiagonalization.jl · GitHub
Skip to content

Releases: Quantum-Many-Body/ExactDiagonalization.jl

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 22 Jun 17:03

ExactDiagonalization v0.3.7

Diff since v0.3.6

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 in block_qr! for rank determination of initial and residual blocks.
  • orthₒ — used in block_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.

Parameter Default (old) Default (new) Purpose
tol 1e-10 2e-8 Lanczos convergence — stops when normres < tol
tolᵣ (same as tol) 1e-8 QR rank — vectors with norm < tolᵣ considered zero

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

Choose a tag to compare

@github-actions github-actions released this 17 Jun 13:00

ExactDiagonalization v0.3.6

Diff since v0.3.5

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-restricted

These 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-supplied table and sectors.
  • 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 both table and 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 OperatorGenerator to the imports from QuantumLattices.
  • Test suite updated: the ED(system, table, Sector(...)) call site replaced with ED(system, qn); the ED(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

Area Change
New constructors ED(system, dtype), ED(lattice, system, dtype), ED(system, qn, dtype), ED(lattice, system, qn, dtype)
Removed constructors ED(system, table, sectors), ED(lattice, system, table, sectors), ED(lattice, hilbert, terms, table, sectors), ED(lattice, hilbert, terms, table, qn)
Refactored ED(lattice, hilbert, terms; nbrs) and ED(lattice, hilbert, terms, qn; nbrs) now delegate through OperatorGenerator path
Imports Added OperatorGenerator
Version 0.3.5 → 0.3.6
Files changed Project.toml, src/Core.jl, src/ExactDiagonalization.jl, test/Core.jl

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 18 May 13:15

ExactDiagonalization v0.3.5

Diff since v0.3.4

Changes

Adapt to QuantumLattices type hierarchy refactoring

  • Widened internal valtype constraints in EDMatrixization and SectorFilter from Operators/OperatorSum to the more general OperatorSet, aligning with upstream changes in QuantumLattices.
  • Removed the unused eager keyword argument from the Generator call within the ED constructor.
  • Bumped QuantumLattices dependency from 0.14.8 to 0.15.0.

Configuration fingerprint support

  • Added contenttoconfig for EDMatrixization, exposing the lookup table and bra-ket sector identifiers.
  • Added contenttoconfig for ED, aggregating lattice, system, and matrixization configuration for use in SHA-512 based configuration stamping.

Display improvements

  • Base.show for AbelianBases now 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.show for BinaryBases now uses MIME "text/plain", with arrow (=>) delimiters replacing colon (:) delimiters.
  • Base.show for Sector now delegates to MIME"text/plain" by default.
  • EDMatrix gains showasleaf (returning false) and delegates show to showcontent for unified display formatting with the QuantumLattices ecosystem.
  • Added Base.show for BandLanczosMethod (prints parameter values) and ExactMethod.

Housekeeping

  • Expanded .gitignore to exclude data files (*.dat, *.dlm), lattice files (*.qld, *.qlc), and tool directories (.vscode/, .claude/).

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 22 Apr 09:47

ExactDiagonalization v0.3.4

Diff since v0.3.3

New Features

  • normalize function for ExactDiagonalization: added a normalize function that adjusts term factors for exact diagonalization. For Pairing terms, the factor is multiplied by 1//2 because ED does not use BdG-form symmetrization unlike TBA.

  • Sector constructor for ℤ₁ quantum number: added a new Sector(::ℤ₁, hilbert, ...) constructor, enabling sector construction with ℤ₁ quantum number symmetry.

  • BandLanczosMethod keepvecs default changed to true: the keepvecs parameter now defaults to true, retaining Lanczos vectors by default for better usability.

Dependency Updates

  • QuantumLattices: 0.14.40.14.7

Tests

  • Added GreenFunction ED vs TBA and GreenFunction ED vs BdG test sets comparing ED results against TBA/BdG calculations

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 12 Apr 12:55

ExactDiagonalization v0.3.3

Diff since v0.3.2

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 05 Apr 10:36

ExactDiagonalization v0.3.2

Diff since v0.3.1

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

Choose a tag to compare

@github-actions github-actions released this 28 Mar 02:56

ExactDiagonalization v0.3.1

Diff since v0.3.0

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

Choose a tag to compare

@github-actions github-actions released this 12 Mar 00:58

ExactDiagonalization v0.3.0

Diff since v0.2.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 BandLanczos module with BandLanczosIterator and BandLanczosFactorization types that extend KrylovKit's BlockLanczos with optional control over keeping Krylov basis vectors

Green Functions

  • Added GreenFunction and RetardedGreenFunction types for calculating Green's functions with BandLanczosMethod and ExactMethod methods

Quantum Number System

  • QuantumNumbers and related functions migrated from QuantumLattices
  • Added action of QuantumOperator on AbelianQuantumNumber

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

Choose a tag to compare

@github-actions github-actions released this 20 Aug 11:45

ExactDiagonalization v0.2.0

Diff since v0.1.7

Breaking changes

  • Redefine the construction function of BinaryBases, which uses quantum numbers, such as, 𝕊ᶻ, 𝕊ᶻ ⊠ ℕ, ℕ ⊠ 𝕊ᶻ or none to initialize.
  • Rename SpinBases to AbelianBases, which is in principle not restricted to spin systems any more, and uses quantum numbers, such as 𝕊ᶻ or none to initialize.
  • Generic interface Sector has been modified in accordance with BinaryBases and AbelianBases.
  • Redefine the construction function of ED, which uses quantum numbers, such as , 𝕊ᶻ, 𝕊ᶻ ⊠ ℕ, ℕ ⊠ 𝕊ᶻ or none to initialize.
  • Remove TargetSpace.
  • BinaryBasisRange, SectorFilter and basistype are no longer exported.

New features

  • Add EDEigen and EDEigenData.
  • Add GroundStateExpectation and GroundStateExpectationData.
  • Add StaticTwoPointCorrelator and StaticTwoPointCorrelatorData.
  • Add SpinCoherentState, SpinCoherentStateProjection and SpinCoherentStateProjectionData.
  • Add prepare!(::ED; timer), prepare!(::Algorithm{<:ED}) and release!(::Union{ED, Algorithm{<:ED}; gc) for more flexible memory control.
  • Add release keyword argument to matrix(::Union{ED, Algorithm{<:ED}}, args...; kwargs...) and eigen(::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:

v0.1.7

Choose a tag to compare

@github-actions github-actions released this 19 Apr 07:46

ExactDiagonalization v0.1.7

Diff since v0.1.6