Quantum Algorithms Database
Quantum Gibbs Sampling
Prepares the thermal (Gibbs) state of a quantum Hamiltonian — a fundamental task for simulating quantum systems at finite temperature.
Year
2009 (Poulin and Wocjan); 2011 (quantum Metropolis); 2023-2024 (Chen, Kastoryano, Brandão, and Gilyén)
Inventor(s)
David Poulin and Pawel Wocjan; Kristan Temme and coauthors; Chi-Fang Chen, Michael Kastoryano, Fernando Brandão, and András Gilyén; Cambyse Rouzé, Daniel Stilck França, and Álvaro Alhambra
Speedup Type
Polynomial Speedup
Difficulty
★★★★★
Overview
A Gibbs state, also called a thermal state, is the state a quantum system settles into when it is in equilibrium with a heat bath at temperature T. It gives each energy level a probability proportional to e to the minus energy over kT. Preparing Gibbs states on a quantum computer lets you study materials and molecules at finite temperature, compute partition functions, and feed optimization and learning algorithms that use thermal states as a subroutine.
Quantum Gibbs sampling is the task of preparing such a state, or sampling from it, efficiently. It is a fundamental problem in quantum algorithms and in physics. At low temperatures it is as hard as finding the ground state, so no general efficient algorithm exists. Recent theoretical breakthroughs have given rigorous efficient algorithms at high temperatures and new, better-behaved quantum analogues of classical Markov chain methods.
The problem it solves
Many physical and chemical systems exist at finite temperature, requiring simulation of mixed states (Gibbs states) rather than ground states. Classically hard for large quantum systems.
History and background
Classical thermal sampling has been done with Monte Carlo methods since Metropolis and colleagues in 1953. For quantum systems, Poulin and Wocjan gave a quantum algorithm in 2009 for preparing Gibbs states and computing partition functions, based on quantum phase estimation and quantum Zeno-type measurements, and Temme, Osborne, Vollbrecht, Poulin, and Verstraete proposed the quantum Metropolis algorithm in 2011. Yung and Aspuru-Guzik gave a variant based on quantum walks in 2012, and Chowdhury and Somma showed square-root speedups using quantum walks and amplitude amplification in 2017.
A key theoretical development was Brandão and Kastoryano's 2019 result that finite correlation length implies efficient preparation of thermal states. In 2023, Chen, Kastoryano, Brandão, and Gilyén introduced a quantum thermal state preparation method based on a Lindbladian that approximately satisfies detailed balance, and Chen, Kastoryano, and Gilyén followed with an exact version. In 2024, Rouzé, França, and Alhambra, and separately Bakshi, Liu, Moitra, and Tang, proved efficiency at high temperatures. Gilyén, Chen, Doriguello, and Kastoryano developed quantum generalizations of Glauber and Metropolis dynamics the same year.
How it works
Implements a quantum analog of classical Markov chain Monte Carlo (MCMC) — a quantum channel that converges to the Gibbs state. Recent algorithms achieve polynomial overhead vs exponential classical cost in some regimes.
In classical Monte Carlo, you set up a random walk on configurations whose long-run frequencies match the Boltzmann distribution. If the walk mixes quickly, running it for a modest time gives a sample. The challenge in the quantum case is that the system has no definite configuration: the thermal state is a mixed state with coherences, and the energy and the dynamics do not commute.
One approach, following Temme and coauthors, works in the energy eigenbasis. It proposes random local moves, uses phase estimation to determine the energy change, and accepts or rejects according to the Metropolis rule. Another approach, from the recent work, builds a dissipative process, a quantum channel that couples the system to a fictitious bath in such a way that the Gibbs state is a fixed point. Running this process for long enough drives any initial state toward the Gibbs state.
The convergence time depends on how quickly the process mixes, set by the spectral gap of the generator. Proving that the gap is large is the hard part, and it has been done in specific regimes, such as high temperature, where correlations are short-ranged.
Step by step
- Specify the Hamiltonian as a sum of local terms and choose the inverse temperature beta.
- Choose a thermalization process, such as a quantum Metropolis walk, a quantum Glauber-type dynamics, or a Lindbladian built from jump operators with the correct detailed balance.
- Initialize the system in an easy state, such as the maximally mixed state or a product state.
- Implement the process on the quantum computer, using phase estimation or block-encoding to realize the energy-dependent filters, and ancilla qubits to model the bath.
- Run the process for a number of steps proportional to the mixing time, and monitor convergence with observables.
- Measure or use the resulting state, which approximates the Gibbs state, for sampling, estimating thermal expectation values, or as input to another algorithm.
A worked example
Consider a chain of 50 spins with nearest-neighbor interactions at high temperature, where correlations decay over a few sites. The Lindbladian approach prepares the Gibbs state with a number of steps that grows only polynomially in the chain length, and the resulting state yields thermal averages such as energy per site and magnetization.
At low temperature the same chain develops long-range order and large correlations. The mixing time can grow exponentially, and preparing the state is as hard as finding the ground state of the Hamiltonian, so the method offers no guarantee.
Complexity and resources
| Item | Detail |
|---|---|
| High temperature | Polynomial time for local Hamiltonians, proven in 2024 for rapid-mixing regimes |
| Low temperature | No efficient algorithm in general, because the problem includes ground state preparation, which is QMA-hard |
| Square-root speedups | Quantum walks and amplitude amplification reduce dependence on the spectral gap quadratically (Chowdhury and Somma) |
| Partition function estimation | Polynomial in system size for certain classes, using Gibbs sampling at a sequence of temperatures |
| Resources | Ancilla qubits for the bath, phase estimation or block-encoding for energy filtering |
What hardware it needs
- Fault-tolerant hardware for deep circuits with phase estimation or block-encoding of the Hamiltonian.
- Ancilla registers to implement the bath coupling.
- Near-term versions use variational methods and annealers that approximate thermal states.
Applications
- Computing thermal properties of materials and molecules, such as specific heat and susceptibilities.
- Subroutine in quantum semidefinite programming and the multiplicative weights method.
- Training quantum Boltzmann machines and other thermal-state-based models.
- Estimating partition functions and free energies.
Limitations and caveats
- Efficiency is proven only in restricted regimes, mostly high temperature or short-range correlations.
- Low-temperature preparation is intractable in the worst case.
- The circuits are deep and need error correction.
- Convergence times depend on spectral gaps that are hard to compute.
Common misconceptions
- Gibbs sampling does not simply cool a system. It prepares a mixed state with the correct energy distribution.
- The efficient algorithms do not solve all physics problems. They apply to restricted classes.
- A quantum computer cannot prepare the thermal state of any Hamiltonian at any temperature quickly.
How it compares
- Classical quantum Monte Carlo handles many systems but suffers from the sign problem for frustrated and fermionic models.
- Quantum Metropolis sampling is an earlier approach that uses phase estimation to implement moves.
- Variational thermal state preparation uses parameterized circuits and has no guarantees.
Real-world impact
Critical for quantum simulation of real-world chemistry and materials at room temperature — a key stepping stone toward practically useful quantum chemistry beyond ground-state calculations.
Why it matters
Thermal states are the bridge between quantum mechanics and statistical physics, so efficient quantum Gibbs sampling is central to quantum simulation beyond ground states. It also supplies the engine for several optimization and learning algorithms.
The recent proofs represent genuine progress on a problem that had resisted solution for over a decade, and they illustrate how quantum algorithms can be built from physical models of thermalization.
Frequently asked questions
What is a Gibbs state?
The thermal equilibrium state of a quantum system at a given temperature, in which each energy level has probability proportional to e to the minus beta times its energy.
Can quantum computers prepare Gibbs states efficiently?
At high temperatures, yes, for local Hamiltonians, as proven recently. At low temperatures it is as hard as ground state preparation in general.
What is the quantum Metropolis algorithm?
An early quantum analogue of the Metropolis-Hastings method that uses phase estimation to implement moves and accept or reject them.
What new methods appeared in 2023 and 2024?
Lindbladian-based quantum Gibbs samplers with detailed balance by Chen, Kastoryano, Brandão, and Gilyén, and proofs of high-temperature efficiency by several groups.
Where are Gibbs states used?
In thermal simulation of materials, semidefinite program solvers, Boltzmann machine training, and estimation of partition functions.
Keep learning
- Related algorithm: Quantum Metropolis Algorithm
- Related algorithm: Quantum Boltzmann Machine (QBM)
- Related algorithm: Quantum Algorithms for Semidefinite Programming
- Related algorithm: Quantum Imaginary Time Evolution (QITE)
This page is written for educational purposes. Complexity statements describe the best known results at the time of review (September 30, 2026), and research in this area moves quickly, so check recent papers before relying on a specific bound.