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.

Last reviewed September 30, 2026. Check the linked sources for anything that may have changed since.

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

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

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.

Intuition

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.

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.

  1. Specify the Hamiltonian as a sum of local terms and choose the inverse temperature beta.
  2. 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.
  3. Initialize the system in an easy state, such as the maximally mixed state or a product state.
  4. 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.
  5. Run the process for a number of steps proportional to the mixing time, and monitor convergence with observables.
  6. Measure or use the resulting state, which approximates the Gibbs state, for sampling, estimating thermal expectation values, or as input to another algorithm.

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

High temperaturePolynomial time for local Hamiltonians, proven in 2024 for rapid-mixing regimes
Low temperatureNo efficient algorithm in general, because the problem includes ground state preparation, which is QMA-hard
Square-root speedupsQuantum walks and amplitude amplification reduce dependence on the spectral gap quadratically (Chowdhury and Somma)
Partition function estimationPolynomial in system size for certain classes, using Gibbs sampling at a sequence of temperatures
ResourcesAncilla qubits for the bath, phase estimation or block-encoding for energy filtering

Hardware 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.

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.

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

  • 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.

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.

Preparing thermal states

A Gibbs (thermal) state describes a quantum system in equilibrium at a given temperature. Chowdhury and Somma's 'Quantum algorithms for Gibbs sampling and hitting-time estimation' (arXiv 1603.02940, March 2016) gives a first algorithm that prepares the thermal state at a chosen inverse temperature beta. Its runtime grows roughly with the square root of N times beta divided by Z, where N is the Hilbert-space dimension and Z is the partition function. The dependence on target precision is only polylogarithmic. Compared with earlier quantum methods, the authors say it improves the precision dependence exponentially and the inverse-temperature dependence quadratically.

A second algorithm in the same paper estimates the expected hitting time of a Markov chain defined by a sparse stochastic matrix P, with runtime nearly linear in 1/(epsilon x Delta^(3/2)), and a quadratic improvement over the analogous classical algorithm in both epsilon and Delta. Both algorithms use Hamiltonian simulation, spectral gap amplification and quantum linear-systems solvers.

Why Gibbs sampling matters

Thermal states are the input to quantum statistical mechanics, to quantum machine-learning models such as Boltzmann machines, and to semidefinite-programming algorithms that use Gibbs sampling as an engine. The sqrt(N) factor in the runtime means the method is not efficient for large systems in general; it is a quadratic improvement on naive approaches. The abstract does not claim efficiency for every Hamiltonian, and this page does not either.

  • Cost (as stated): about sqrt(N x beta / Z), polylog in precision.
  • Tools: Hamiltonian simulation, spectral gap amplification, linear-system solvers.
  • Related: Quantum Metropolis sampling takes a different route to thermal states.

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.

Related algorithms

References and further reading

Sources opened and checked on December 2, 2026. Resource estimates and claims change, so check the originals.

  1. Quantum algorithms for Gibbs sampling and hitting-time estimation (arXiv (Chowdhury, Somma)) Opened. Source for the runtime statements and the hitting-time result.
  2. Quantum Metropolis Sampling (arXiv (Temme et al.)) Opened. A different approach to the same goal.

← Back to Algorithms Database