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

SciPost Physics Codebases

Codebase release 1.0 for DanceQ

Robin Schäfer, David J. Luitz

Published Feb 5, 2025• 3 citations
Publisher

Abstract

The complexity of quantum many-body problems scales exponentially with the size of the system, rendering any finite-size scaling analysis a formidable challenge. This is particularly true for methods based on the full representation of the wave function, where one simply accepts the enormous Hilbert space dimensions and performs linear algebra operations, e.g., for finding the ground state of the Hamiltonian. If the system satisfies an underlying symmetry where an operator with a degenerate spectrum commutes with the Hamiltonian, it can be block-diagonalized, thus reducing the complexity at the expense of additional bookkeeping. At the most basic level required for Krylov space techniques (like the Lanczos algorithm), it is necessary to implement a matrix-vector product of a block of the Hamiltonian with arbitrary block-wavefunctions, potentially without holding the Hamiltonian block in memory. An efficient implementation of this operation requires the calculation of the position of an arbitrary basis vector in the canonical ordering of the basis of the block. We present here an elegant and powerful, multi-dimensional approach to this problem for the U(1) U ( 1 ) symmetry appearing in problems with particle number conservation. Our divide-and-conquer algorithm uses multiple subsystems and hence generalizes previous approaches to make them scalable. In addition to the theoretical presentation of our algorithm, we provide DanceQ, a flexible and modern – header only – C++20 implementation to manipulate, enumerate, and map to its index any basis state in a given particle number sector as open source software under https://DanceQ.gitlab.io/danceq.

DOI
10.21468/scipostphyscodeb.48-r1.0

Related papers

DanceQ: High-performance library for number conserving bases

Robin Schäfer, David J. Luitz

The complexity of quantum many-body problems scales exponentially with the size of the system, rendering any finite-size scaling analysis a formidable challenge. This is particularly true for methods based on the full representation of the wave function, where one simply accepts the enormous Hilbert space dimensions and performs linear algebra operations, e.g., for finding the ground state of the Hamiltonian. If the system satisfies an underlying symmetry where an operator with a degenerate spectrum commutes with the Hamiltonian, it can be block-diagonalized, thus reducing the complexity at the expense of additional bookkeeping. At the most basic level required for Krylov space techniques (like the Lanczos algorithm), it is necessary to implement a matrix-vector product of a block of the Hamiltonian with arbitrary block-wavefunctions, potentially without holding the Hamiltonian block in memory. An efficient implementation of this operation requires the calculation of the position of an arbitrary basis vector in the canonical ordering of the basis of the block. We present here an elegant and powerful, multi-dimensional approach to this problem for the U(1) U ( 1 ) symmetry appearing in problems with particle number conservation. Our divide-and-conquer algorithm uses multiple subsystems and hence generalizes previous approaches to make them scalable. In addition to the theoretical presentation of our algorithm, we provide DanceQ, a flexible and modern – header only – C++20 implementation to manipulate, enumerate, and map to its index any basis state in a given particle number sector as open source software under https://DanceQ.gitlab.io/danceq.

arXiv:2407.14591•SciPost Physics Codebases•Feb 5, 2025•3 citations

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

Divide and conquer the Hilbert space of translation-symmetric spin systems

Alexander Weiße

Iterative methods that operate with the full Hamiltonian matrix in the untrimmed Hilbert space of a finite system continue to be important tools for the study of one- and two-dimensional quantum spin models, in particular in the presence of frustration. To reach sensible system sizes such numerical calculations heavily depend on the use of symmetries. We describe a divide-and-conquer strategy for implementing translation symmetries of finite spin clusters, which efficiently uses and extends the "sublattice coding" of H. Q. Lin [Phys. Rev. B 42, 6561 (1990)]. With our method, the Hamiltonian matrix can be generated on-the-fly in each matrix vector multiplication, and problem dimensions beyond 10^{11} become accessible.

arXiv:1210.1701•Physical Review E•Apr 9, 2013•9 citations

XDiag: Exact diagonalization for quantum many-body systems

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.

arXiv:2505.02901•SciPost Physics Codebases•May 7, 2026•5 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

Resolution of Ground and Excited Electronic States within the Unitary Group Approach

Giovanni Li Manni, Daniel Kats, Niklas Liebermann

In this work ground and excited electronic states of Heisenberg cluster models, in the form of con- figuration interaction many-body wave functions, are characterized within the spin-adapted Graph- ical Unitary Group Approach framework, and relying on a novel combined unitary and symmetric group approach. Finite-size cluster models of well-defined point-group symmetry and of general local-spin Slocal ≥ 21 are presented, including J1–J2 triangular and tetrahedral clusters, which are often used to describe magnetic interactions in biological and bio-mimetic polynuclear transition metal clusters with unique catalytic activity, such as nitrogen fixation and photosynthesis. We show that a unique block-diagonal structure of the underlying Hamiltonian matrix in the spin-adapted basis emerges when an optimal lattice site ordering is chosen that reflects the internal symmetries of the model investigated. The block-diagonal structure is bound to the commutation relations between cumulative spin operators and the Hamiltonian operator, that in turn depend on the geometry of the cluster investigated. The many-body basis transformation, in the form of the orbital/site reorder- ing, exposes such commutation relations. These commutation relations represent a rigorous and formal demonstration of the block-diagonal structure in Hamiltonian matrices and the compression of the corresponding spin-adapted many-body wave functions. As a direct consequence of the block- diagonal structure of the Hamiltonian matrix it is possible to selectively optimize electronic excited states without the overhead of calculating the lower-energy states by simply relying on the initial ansatz for the targeted wave function. Additionally, more compact many-body wave functions are obtained. In extreme cases, electronic states are precisely described by a single configuration state function, despite the curse of dimensionality of the corresponding Hilbert space. These findings are crucial in the electronic structure theory framework, for they offer a conceptual route towards wave functions of reduced multi-reference character, that can be optimized more easily by approximated eigensolvers and are of more facile physical interpretation. They open the way to study larger ab initio and model Hamiltonians of increasingly larger number of correlated electrons, while keeping the computational costs at their lowest.

•Oct 12, 2022•0 citations
The complexity of quantum many-body problems scales exponentially with the size of the system, rendering any finite-size scaling analysis a formidable challenge. This is particularly true for methods based on the full representation of the wave function, where one simply accepts the enormous Hilbert space dimensions and performs linear algebra operations, e.g., for finding the ground state of the Hamiltonian. If the system satisfies an underlying symmetry where an operator with a degenerate spectrum commutes with the Hamiltonian, it can be block-diagonalized, thus reducing the complexity at the expense of additional bookkeeping. At the most basic level required for Krylov space techniques (like the Lanczos algorithm), it is necessary to implement a matrix-vector product of a block of the Hamiltonian with arbitrary block-wavefunctions, potentially without holding the Hamiltonian block in memory. An efficient implementation of this operation requires the calculation of the position of an arbitrary basis vector in the canonical ordering of the basis of the block. We present here an elegant and powerful, multi-dimensional approach to this problem for the U(1) U ( 1 ) symmetry appearing in problems with particle number conservation. Our divide-and-conquer algorithm uses multiple subsystems and hence generalizes previous approaches to make them scalable. In addition to the theoretical presentation of our algorithm, we provide DanceQ, a flexible and modern – header only – C++20 implementation to manipulate, enumerate, and map to its index any basis state in a given particle number sector as open source software under https://DanceQ.gitlab.io/danceq.
The complexity of quantum many-body problems scales exponentially with the size of the system, rendering any finite-size scaling analysis a formidable challenge. This is particularly true for methods based on the full representation of the wave function, where one simply accepts the enormous Hilbert space dimensions and performs linear algebra operations, e.g., for finding the ground state of the Hamiltonian. If the system satisfies an underlying symmetry where an operator with a degenerate spectrum commutes with the Hamiltonian, it can be block-diagonalized, thus reducing the complexity at the expense of additional bookkeeping. At the most basic level required for Krylov space techniques (like the Lanczos algorithm), it is necessary to implement a matrix-vector product of a block of the Hamiltonian with arbitrary block-wavefunctions, potentially without holding the Hamiltonian block in memory. An efficient implementation of this operation requires the calculation of the position of an arbitrary basis vector in the canonical ordering of the basis of the block. We present here an elegant and powerful, multi-dimensional approach to this problem for the U(1) U ( 1 ) symmetry appearing in problems with particle number conservation. Our divide-and-conquer algorithm uses multiple subsystems and hence generalizes previous approaches to make them scalable. In addition to the theoretical presentation of our algorithm, we provide DanceQ, a flexible and modern – header only – C++20 implementation to manipulate, enumerate, and map to its index any basis state in a given particle number sector as open source software under https://DanceQ.gitlab.io/danceq.
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.
Iterative methods that operate with the full Hamiltonian matrix in the untrimmed Hilbert space of a finite system continue to be important tools for the study of one- and two-dimensional quantum spin models, in particular in the presence of frustration. To reach sensible system sizes such numerical calculations heavily depend on the use of symmetries. We describe a divide-and-conquer strategy for implementing translation symmetries of finite spin clusters, which efficiently uses and extends the "sublattice coding" of H. Q. Lin [Phys. Rev. B 42, 6561 (1990)]. With our method, the Hamiltonian matrix can be generated on-the-fly in each matrix vector multiplication, and problem dimensions beyond 10^{11} become accessible.
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.
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.
In this work ground and excited electronic states of Heisenberg cluster models, in the form of con- figuration interaction many-body wave functions, are characterized within the spin-adapted Graph- ical Unitary Group Approach framework, and relying on a novel combined unitary and symmetric group approach. Finite-size cluster models of well-defined point-group symmetry and of general local-spin Slocal ≥ 21 are presented, including J1–J2 triangular and tetrahedral clusters, which are often used to describe magnetic interactions in biological and bio-mimetic polynuclear transition metal clusters with unique catalytic activity, such as nitrogen fixation and photosynthesis. We show that a unique block-diagonal structure of the underlying Hamiltonian matrix in the spin-adapted basis emerges when an optimal lattice site ordering is chosen that reflects the internal symmetries of the model investigated. The block-diagonal structure is bound to the commutation relations between cumulative spin operators and the Hamiltonian operator, that in turn depend on the geometry of the cluster investigated. The many-body basis transformation, in the form of the orbital/site reorder- ing, exposes such commutation relations. These commutation relations represent a rigorous and formal demonstration of the block-diagonal structure in Hamiltonian matrices and the compression of the corresponding spin-adapted many-body wave functions. As a direct consequence of the block- diagonal structure of the Hamiltonian matrix it is possible to selectively optimize electronic excited states without the overhead of calculating the lower-energy states by simply relying on the initial ansatz for the targeted wave function. Additionally, more compact many-body wave functions are obtained. In extreme cases, electronic states are precisely described by a single configuration state function, despite the curse of dimensionality of the corresponding Hilbert space. These findings are crucial in the electronic structure theory framework, for they offer a conceptual route towards wave functions of reduced multi-reference character, that can be optimized more easily by approximated eigensolvers and are of more facile physical interpretation. They open the way to study larger ab initio and model Hamiltonians of increasingly larger number of correlated electrons, while keeping the computational costs at their lowest.