Skip to content

Bethe ansatz solvers

C++23 tools and a scalar-templated library for finite-system and thermodynamic Bethe ansatz calculations, complementing Uni20 and the Matrix Product Toolkit.

Documentation and tutorials · Supported models · Build and install

Calculate ground states, selected excitation families, dispersions, continuum edges and supported spectral weights. The model guides state which boundaries, sectors and root families each calculation covers.

High precision is a first-class feature: fp64 by default, platform-native long-double, fp80 where extended80 is native, optional fp128 (binary128, about 34 decimal digits), and explicit arbitrary precision through MPFR/MPC in every numerical frontend. Run bethe-info to see what your build provides. Precision controls explain how arithmetic precision differs from numerical convergence.

First calculation

After building or installing, put the programs on PATH and compare periodic and free-end four-site Heisenberg chains:

bethe-xxx-pbc 4
bethe-xxx-obc 4

The periodic chain has total energy \(E=-2\) for spin-\(1/2\) operators and \(J=1\). The reports include energy per site, convergence diagnostics and CPU time. The first-calculation guide explains these quantities, boundaries, quantum numbers, precision and exports.

Without PATH setup, use ./bethe-xxx-pbc from the build directory. Python is only needed for the optional plotting and maintenance scripts.

Choose a route

Tutorials with plots

The full tutorial collection includes source data, plotting scripts and examples for every implemented model family.

Theory, development and attribution

Jean-Sébastien Caux's The Bethe Ansatz is a pedagogical companion for the underlying theory. CITATIONS.md lists the literature used by the implementation; the model roadmap surveys possible extensions.

include/bethe/ contains the library, apps/ the command-line frontends, and tests/ the regression suite. Numerical code is separate from presentation and any future Python bindings.

Bethe succeeds MPToolkit's misc/heisenberg-energy.cpp and retains GPL-3.0-or-later licensing and attribution. See COPYING, references and provenance, and the redistributable paper archive.