Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2505.02901 · SciPost Physics Codebases

XDiag: Exact diagonalization for quantum many-body systems

Alexander Wietek, Luke Staszewski, Martin Ulaga, Paul L. Ebert, Hannes Karlsson, Siddhartha Sarkar, Henry Shackleton, Aritra Sinha, Rafael Diogo Soares

Published May 7, 2026• 5 citations
arXivHTMLPDF

Abstract

Exact diagonalization (ED) is a cornerstone technique in quantum many-body physics, enabling precise solutions to the many-body Schrödinger equation for interacting quantum systems. Despite its utility in studying ground states, excited states, and dynamical behaviors, the exponential growth of the Hilbert space with system size presents significant computational challenges. We introduce XDiag, an open-source software package designed to combine advanced and efficient algorithms for ED with and without symmetry-adapted bases with user-friendly interfaces. Implemented in C++ for computational efficiency and wrapped in Julia for ease of use, XDiag provides a comprehensive toolkit for ED calculations. Key features of XDiag include the first publicly accessible implementation of sublattice coding algorithms for large-scale spin system diagonalizations, efficient Lin table algorithms for symmetry lookups, and random-hashing techniques for distributed memory parallelization. The library supports various Hilbert space types (e.g., spin-1/2, electron, and t-J models), facilitates symmetry-adapted block calculations, and automates symmetry considerations. The package is complemented by extensive documentation, a user guide, reproducible benchmarks demonstrating near-linear scaling on thousands of CPU cores, and over 20 examples covering ground-state calculations, spectral functions, time evolution, and thermal states. By integrating high-performance computing with accessible scripting capabilities, XDiag allows researchers to perform state-of-the-art ED simulations and explore quantum many-body phenomena with unprecedented flexibility and efficiency.

DOI
10.21468/scipostphyscodeb.70

Related papers

Codebase release 0.4 for XDiag

Alexander Wietek, Luke Staszewski, Martin Ulaga +6 more

Exact diagonalization (ED) is a cornerstone technique in quantum many-body physics, enabling precise solutions to the many-body Schrödinger equation for interacting quantum systems. Despite its utility in studying ground states, excited states, and dynamical behaviors, the exponential growth of the Hilbert space with system size presents significant computational challenges. We introduce XDiag, an open-source software package designed to combine advanced and efficient algorithms for ED with and without symmetry-adapted bases with user-friendly interfaces. Implemented in C++ for computational efficiency and wrapped in Julia for ease of use, XDiag provides a comprehensive toolkit for ED calculations. Key features of XDiag include the first publicly accessible implementation of sublattice coding algorithms for large-scale spin system diagonalizations, efficient Lin table algorithms for symmetry lookups, and random-hashing techniques for distributed memory parallelization. The library supports various Hilbert space types (e.g., spin-1/2, electron, and t-J models), facilitates symmetry-adapted block calculations, and automates symmetry considerations. The package is complemented by extensive documentation, a user guide, reproducible benchmarks demonstrating near-linear scaling on thousands of CPU cores, and over 20 examples covering ground-state calculations, spectral functions, time evolution, and thermal states. By integrating high-performance computing with accessible scripting capabilities, XDiag allows researchers to perform state-of-the-art ED simulations and explore quantum many-body phenomena with unprecedented flexibility and efficiency.

SciPost Physics Codebases•May 7, 2026•0 citations

CERTIFY-ED: A Multi-Layer Verification Framework for Exact Diagonalization of Quantum Many-Body Systems

Sarang Vehale, Ritu Goel

Exact diagonalization (ED) is a workhorse technique in computational quantum many-body physics, but published ED results are rarely accompanied by machine-checkable evidence of their numerical correctness. The community typically relies on the implicit trust chain LAPACK $\to$ user code $\to$ result, with at most informal agreement against another package treated as confirmation. We argue that this practice is inadequate for a method whose output frequently underpins theoretical claims, and we present \textsc{certify-ed}, a verification framework designed to be used \emph{alongside} existing ED packages (QuSpin, XDiag, ALPS) rather than as a replacement for them. The framework consists of (i) a multi-oracle eigensolver that runs three independent LAPACK paths and reports their pairwise disagreement, (ii) thirteen logically independent validation layers covering algebraic invariants, analytic limits, alternative algorithms, arbitrary-precision reference computation, conservation laws, dynamical consistency, and finite-size scaling, and (iii) tamper-evident SHA-256 hashed certificates that downstream consumers can verify. The framework also ships an error-injection layer that confirms the entire pipeline detects six injected error classes. Running on sixteen physics models from one-dimensional spin chains to two-dimensional Kitaev honeycomb clusters, our reference implementation passes 53 of 53 unit tests and 81 of 81 individual validation tests in under thirty seconds, with maximum disagreement against QuSpin of $1.6\times 10^{-14}$ across 320 eigenvalue comparisons, and agreement with 50-digit \texttt{mpmath} reference values to $1.6\times 10^{-15}$. The package is released under the MIT license on Zenodo and Github

arXiv:2605.11787•May 12, 2026•0 citations

Computing eigenpairs of quantum many-body systems with Polfed.jl

Rok Pintar, Konrad Pawlik, Rafał Świętek +5 more

We present Polfed$.$jl, an open-source Julia package implementing the Polynomially Filtered Exact Diagonalization (POLFED) algorithm for computing mid-spectrum eigenvalues and eigenvectors (shortly, eigenpairs) of quantum many-body Hamiltonians. Access to such eigenpairs is essential for studying non-equilibrium many-body physics, but is hindered by the exponential growth of Hilbert-space dimension. POLFED addresses this challenge through a polynomial spectral transformation evaluated on the fly within a Lanczos iteration, preserving Hamiltonian sparsity and substantially reducing memory costs compared to other diagonalization methods. The package supports flexible energy targeting, automatic optimization of the spectral mapping for structured Hamiltonians, and GPU acceleration, which is particularly effective since the dominant computational cost reduces to repeated sparse matrix-vector multiplications. Benchmarks on disordered spin-chain and fermionic models demonstrate access to larger system sizes than alternative approaches, and CPU--GPU comparisons confirm significant speedups. In particular, we also provide code for constructing the quantum sun model Hamiltonian, a toy model of a many-body ergodicity-breaking transition. While our focus is on many-body Hamiltonians, Polfed$.$jl may be applied to any large sparse matrix.

cond-mat.stat-mechCross-listedarXiv:2605.10191•May 12, 2026•0 citations

Open source matrix product states: exact diagonalization and other entanglement-accurate methods revisited in quantum systems

Daniel Jaschke, Lincoln D. Carr

Abstract Tensor network methods as presented in our open source matrix product states software have opened up the possibility to study many-body quantum physics in one and quasi-one-dimensional systems in an easily accessible package similar to density functional theory codes but for strongly correlated dynamics. Here, we address methods which allow one to capture the full entanglement without truncation of the Hilbert space. Such methods are suitable for validation of and comparisons to tensor network algorithms, but especially useful in the case of new kinds of quantum states with high entanglement violating the truncation in tensor networks. Quantum cellular automata are one example for such a system, characterized by tunable complexity, entanglement, and a large spread over the Hilbert space. Beyond the evolution of pure states as a closed system, we adapt the techniques for open quantum systems simulated via the Lindblad master equation. We present three algorithms for solving closed-system many-body time evolution without truncation of the Hilbert space. Exact diagonalization methods have the advantage that they not only keep the full entanglement but also require no approximations to the propagator. Seeking the limits of a maximal number of qubits on a single core, we use Trotter decompositions or Krylov approximation to the exponential of the Hamiltonian. All three methods are also implemented for open systems represented via the Lindblad master equation built from local channels. We show their convergence parameters and focus on efficient schemes for their implementations including Abelian symmetries, e.g. symmetry used for number conservation in the Bose–Hubbard model or discrete symmetries in the quantum Ising model. We present the thermalization timescale in the long-range quantum Ising model as a key example of how exact diagonalization contributes to novel physics.

arXiv:1802.10052•Journal of Physics A Mathematical and Theoretical•Sep 27, 2018•13 citations

Sublattice coding algorithm and distributed memory parallelization for large-scale exact diagonalizations of quantum many-body systems

Alexander Wietek, Andreas Martin Läuchli

We present algorithmic improvements for fast and memory-efficient use of discrete spatial symmetries in exact diagonalization computations of quantum many-body systems. These techniques allow us to work flexibly in the reduced basis of symmetry-adapted wave functions. Moreover, a parallelization scheme for the Hamiltonian-vector multiplication in the Lanczos procedure for distributed memory machines avoiding load-balancing problems is proposed. We demonstrate that using these methods low-energy properties of systems of up to 50 spin-$1/2$ particles can be successfully determined.

arXiv:1804.05028•Physical review. E•Sep 26, 2018•49 citations

lattice-symmetries: A package for working with quantum many-body bases

Tom Westerhout

Exact diagonalization (ED) is one of the most reliable and established numerical methods of quantum many-body theory.It is precise, unbiased, and general enough to be applicable to a huge variety of problems in condensed matter physics.Mathematically, ED is a linear algebra problem involving a matrix called the Hamiltonian.For a system of spin-1/2 particles, the size of this matrix scales exponentially (as O(2 N )) with the number of particles N .Very fast scaling of memory requirements with system size is the main computational challenge of the method.There are a few techniques allowing one to lower the amount of storage used by the Hamiltonian.For example, one can store only the non-zero elements of the Hamiltonian.This is beneficial when the Hamiltonian is sparse, which is usually the case in condensed matter physics.One can even take it one step further and avoid storing the matrix altogether by instead computing matrix elements on the fly.

arXiv:2104.04011•The Journal of Open Source Software•Aug 26, 2021•17 citations
Exact diagonalization (ED) is a cornerstone technique in quantum many-body physics, enabling precise solutions to the many-body Schrödinger equation for interacting quantum systems. Despite its utility in studying ground states, excited states, and dynamical behaviors, the exponential growth of the Hilbert space with system size presents significant computational challenges. We introduce XDiag, an open-source software package designed to combine advanced and efficient algorithms for ED with and without symmetry-adapted bases with user-friendly interfaces. Implemented in C++ for computational efficiency and wrapped in Julia for ease of use, XDiag provides a comprehensive toolkit for ED calculations. Key features of XDiag include the first publicly accessible implementation of sublattice coding algorithms for large-scale spin system diagonalizations, efficient Lin table algorithms for symmetry lookups, and random-hashing techniques for distributed memory parallelization. The library supports various Hilbert space types (e.g., spin-1/2, electron, and t-J models), facilitates symmetry-adapted block calculations, and automates symmetry considerations. The package is complemented by extensive documentation, a user guide, reproducible benchmarks demonstrating near-linear scaling on thousands of CPU cores, and over 20 examples covering ground-state calculations, spectral functions, time evolution, and thermal states. By integrating high-performance computing with accessible scripting capabilities, XDiag allows researchers to perform state-of-the-art ED simulations and explore quantum many-body phenomena with unprecedented flexibility and efficiency.
Exact diagonalization (ED) is a cornerstone technique in quantum many-body physics, enabling precise solutions to the many-body Schrödinger equation for interacting quantum systems. Despite its utility in studying ground states, excited states, and dynamical behaviors, the exponential growth of the Hilbert space with system size presents significant computational challenges. We introduce XDiag, an open-source software package designed to combine advanced and efficient algorithms for ED with and without symmetry-adapted bases with user-friendly interfaces. Implemented in C++ for computational efficiency and wrapped in Julia for ease of use, XDiag provides a comprehensive toolkit for ED calculations. Key features of XDiag include the first publicly accessible implementation of sublattice coding algorithms for large-scale spin system diagonalizations, efficient Lin table algorithms for symmetry lookups, and random-hashing techniques for distributed memory parallelization. The library supports various Hilbert space types (e.g., spin-1/2, electron, and t-J models), facilitates symmetry-adapted block calculations, and automates symmetry considerations. The package is complemented by extensive documentation, a user guide, reproducible benchmarks demonstrating near-linear scaling on thousands of CPU cores, and over 20 examples covering ground-state calculations, spectral functions, time evolution, and thermal states. By integrating high-performance computing with accessible scripting capabilities, XDiag allows researchers to perform state-of-the-art ED simulations and explore quantum many-body phenomena with unprecedented flexibility and efficiency.
Exact diagonalization (ED) is a workhorse technique in computational quantum many-body physics, but published ED results are rarely accompanied by machine-checkable evidence of their numerical correctness. The community typically relies on the implicit trust chain LAPACK →\to→ user code →\to→ result, with at most informal agreement against another package treated as confirmation. We argue that this practice is inadequate for a method whose output frequently underpins theoretical claims, and we present \textsc{certify-ed}, a verification framework designed to be used \emph{alongside} existing ED packages (QuSpin, XDiag, ALPS) rather than as a replacement for them. The framework consists of (i) a multi-oracle eigensolver that runs three independent LAPACK paths and reports their pairwise disagreement, (ii) thirteen logically independent validation layers covering algebraic invariants, analytic limits, alternative algorithms, arbitrary-precision reference computation, conservation laws, dynamical consistency, and finite-size scaling, and (iii) tamper-evident SHA-256 hashed certificates that downstream consumers can verify. The framework also ships an error-injection layer that confirms the entire pipeline detects six injected error classes. Running on sixteen physics models from one-dimensional spin chains to two-dimensional Kitaev honeycomb clusters, our reference implementation passes 53 of 53 unit tests and 81 of 81 individual validation tests in under thirty seconds, with maximum disagreement against QuSpin of 1.6×10−141.6\times 10^{-14}1.6×10−14 across 320 eigenvalue comparisons, and agreement with 50-digit \texttt{mpmath} reference values to 1.6×10−151.6\times 10^{-15}1.6×10−15. The package is released under the MIT license on Zenodo and Github
We present Polfed...jl, an open-source Julia package implementing the Polynomially Filtered Exact Diagonalization (POLFED) algorithm for computing mid-spectrum eigenvalues and eigenvectors (shortly, eigenpairs) of quantum many-body Hamiltonians. Access to such eigenpairs is essential for studying non-equilibrium many-body physics, but is hindered by the exponential growth of Hilbert-space dimension. POLFED addresses this challenge through a polynomial spectral transformation evaluated on the fly within a Lanczos iteration, preserving Hamiltonian sparsity and substantially reducing memory costs compared to other diagonalization methods. The package supports flexible energy targeting, automatic optimization of the spectral mapping for structured Hamiltonians, and GPU acceleration, which is particularly effective since the dominant computational cost reduces to repeated sparse matrix-vector multiplications. Benchmarks on disordered spin-chain and fermionic models demonstrate access to larger system sizes than alternative approaches, and CPU--GPU comparisons confirm significant speedups. In particular, we also provide code for constructing the quantum sun model Hamiltonian, a toy model of a many-body ergodicity-breaking transition. While our focus is on many-body Hamiltonians, Polfed...jl may be applied to any large sparse matrix.
Abstract Tensor network methods as presented in our open source matrix product states software have opened up the possibility to study many-body quantum physics in one and quasi-one-dimensional systems in an easily accessible package similar to density functional theory codes but for strongly correlated dynamics. Here, we address methods which allow one to capture the full entanglement without truncation of the Hilbert space. Such methods are suitable for validation of and comparisons to tensor network algorithms, but especially useful in the case of new kinds of quantum states with high entanglement violating the truncation in tensor networks. Quantum cellular automata are one example for such a system, characterized by tunable complexity, entanglement, and a large spread over the Hilbert space. Beyond the evolution of pure states as a closed system, we adapt the techniques for open quantum systems simulated via the Lindblad master equation. We present three algorithms for solving closed-system many-body time evolution without truncation of the Hilbert space. Exact diagonalization methods have the advantage that they not only keep the full entanglement but also require no approximations to the propagator. Seeking the limits of a maximal number of qubits on a single core, we use Trotter decompositions or Krylov approximation to the exponential of the Hamiltonian. All three methods are also implemented for open systems represented via the Lindblad master equation built from local channels. We show their convergence parameters and focus on efficient schemes for their implementations including Abelian symmetries, e.g. symmetry used for number conservation in the Bose–Hubbard model or discrete symmetries in the quantum Ising model. We present the thermalization timescale in the long-range quantum Ising model as a key example of how exact diagonalization contributes to novel physics.
We present algorithmic improvements for fast and memory-efficient use of discrete spatial symmetries in exact diagonalization computations of quantum many-body systems. These techniques allow us to work flexibly in the reduced basis of symmetry-adapted wave functions. Moreover, a parallelization scheme for the Hamiltonian-vector multiplication in the Lanczos procedure for distributed memory machines avoiding load-balancing problems is proposed. We demonstrate that using these methods low-energy properties of systems of up to 50 spin-1/21/21/2 particles can be successfully determined.
Exact diagonalization (ED) is one of the most reliable and established numerical methods of quantum many-body theory.It is precise, unbiased, and general enough to be applicable to a huge variety of problems in condensed matter physics.Mathematically, ED is a linear algebra problem involving a matrix called the Hamiltonian.For a system of spin-1/2 particles, the size of this matrix scales exponentially (as O(2 N )) with the number of particles N .Very fast scaling of memory requirements with system size is the main computational challenge of the method.There are a few techniques allowing one to lower the amount of storage used by the Hamiltonian.For example, one can store only the non-zero elements of the Hamiltonian.This is beneficial when the Hamiltonian is sparse, which is usually the case in condensed matter physics.One can even take it one step further and avoid storing the matrix altogether by instead computing matrix elements on the fly.