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.
Comments
Code is available at: https://github.com/RockClimbingRocks/Polfed.jl
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.
Polynomially filtered exact diagonalization method (POLFED) for large sparse matrices is introduced. The algorithm finds an optimal basis of a subspace spanned by eigenvectors with eigenvalues close to a specified energy target by a spectral transformation using a high order polynomial of the matrix. The memory requirements scale better with system size than in the state-of-the-art shift-invert approach. The potential of POLFED is demonstrated examining many-body localization transition in 1D interacting quantum spin-1/2 chains. We investigate the disorder strength and system size scaling of Thouless time. System size dependence of bipartite entanglement entropy and of the gap ratio highlights the importance of finite-size effects. We discuss possible scenarios regarding the many-body localization transition obtaining estimates for the critical disorder strength.
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.
Periodically driven quantum many-body systems play a central role for our understanding of nonequilibrium phenomena. For studies of quantum chaos, thermalization, many-body localization and time crystals, the properties of eigenvectors and eigenvalues of the unitary evolution operator, and their scaling with physical system size L L are of interest. While for static systems, powerful methods for the partial diagonalization of the Hamiltonian were developed, the unitary eigenproblem remains daunting. % In this paper, we introduce a Krylov space diagonalization method to obtain exact eigenpairs of the unitary Floquet operator with eigenvalue closest to a target on the unit circle. Our method is based on a complex polynomial spectral transformation given by the geometric sum, leading to rapid convergence of the Arnoldi algorithm. We demonstrate that our method is much more efficient than the shift invert method in terms of both runtime and memory requirements, pushing the accessible system sizes to the realm of 20 qubits, with Hilbert space dimensions \geq 10^6 ≥ 10 6 .
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 is a well-established method for simulating small quantum systems. Its applicability is limited by the exponential growth of the Hamiltonian matrix that needs to be diagonalized. Physical symmetries are usually utilized to reduce the matrix dimension, and distributed-memory parallelism is employed to explore larger systems. This paper focuses on an implementation of the core distributed algorithms, with a special emphasis on the matrix-vector product. Instead of the conventional MPI+X paradigm, Chapel is chosen as the language in this work.
We present Q u a n t u m T o o l b o x . j l , an open-source Julia package for simulating open quantum systems. Designed with a syntax familiar to users of Q u T i P (Quantum Toolbox in Python), it harnesses Julia's high-performance ecosystem to deliver fast and scalable simulations. The package includes a suite of time-evolution solvers supporting distributed computing and GPU acceleration, enabling efficient simulation of large-scale quantum systems. We also show how Q u a n t u m T o o l b o x . j l can integrate with automatic differentiation tools, making it well-suited for gradient-based optimization tasks such as quantum optimal control. Benchmark comparisons demonstrate substantial performance gains over existing frameworks. With its flexible design and computational efficiency, Q u a n t u m T o o l b o x . j l serves as a powerful tool for both theoretical studies and practical applications in quantum science.