  Systems in thermal equilibrium at non-zero temperature are described by their
Gibbs state. For classical many-body systems, the Metropolis-Hastings algorithm
gives a Markov process with a local update rule that samples from the Gibbs
distribution. For quantum systems, sampling from the Gibbs state is
significantly more challenging. Many algorithms have been proposed, but these
are more complex than the simple local update rule of classical Metropolis
sampling, requiring non-trivial quantum algorithms such as phase estimation as
a subroutine.
  Here, we show that a dissipative quantum algorithm with a simple, local
update rule is able to sample from the quantum Gibbs state. In contrast to the
classical case, the quantum Gibbs state is not generated by converging to the
fixed point of a Markov process, but by the states generated at the stopping
time of a conditionally stopped process. This gives a new answer to the
long-sought-after quantum analogue of Metropolis sampling. Compared to previous
quantum Gibbs sampling algorithms, the local update rule of the process has a
simple implementation, which may make it more amenable to near-term
implementation on suitable quantum hardware. This dissipative Gibbs sampler
works for arbitrary quantum Hamiltonians, without any assumptions on or
knowledge of its properties, and comes with certifiable precision and run-time
bounds. We also show that the algorithm benefits from some measure of built-in
resilience to faults and errors (``fault resilience'').
  Finally, we also demonstrate how the stopping statistics of an ensemble of
runs of the dissipative Gibbs sampler can be used to estimate the partition
function.
