Surveys quantum algorithms for Gibbs-state sampling, of which the single-qubit ancilla purification is the minimal instance.
arxiv.org/abs/0905.2199 ↗Single-qubit thermal (Gibbs) state
The thermal (Gibbs) state of a single qubit in a longitudinal field, prepared exactly via a one-ancilla purification circuit.
Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.
A Gibbs state ρ = e^{-βH}/Z is mixed, not pure, so it cannot be written as a single circuit output ket; instead it is prepared as the reduced state of a larger pure state (a purification) after tracing out an ancilla — the simplest nontrivial example is a single qubit coupled to one ancilla.
Circuit & simulation
What this takes and returns
TakesNothingWhat joins here
Nothing goes in, and that is what this entry is: a pipeline starts here. There is no upstream to choose — what you pick is what comes after.
Nothing in the Atlas meets this end.
Returns2 qubitsWhat joins here
Returns a 2-qubit register a next stage can take. This is the end that joins.
12 entries meet this end. Named below.
Prepares a state. Nothing goes in, and what comes out is a register another stage can take. See all 12 →
Where the map uses this
This record is an instance of an object the map names, so these are the processes that consume or produce one. None of them is about this record in particular.
State you can prepare 5 of 33 processes
- Quantum linear solve hands one back
- Prepare an input state hands one back
- Amplify a success branch hands one back
- Estimate an observable takes one
- Minimise the objective over the parameters hands one back
How it works
For a single-qubit Hamiltonian with eigenvalues (for ) and (for ), the Gibbs state at inverse temperature is
Purification construction. Introduce an ancilla and prepare by applying to the ancilla and then . Tracing out the ancilla gives the system the reduced density matrix . Choosing
makes and exactly — this is a standard identity since implies .
Limits. As (infinite temperature), and , the maximally mixed state. As (zero temperature), and , the ground state — recovering ordinary ground-state preparation as the limit of Gibbs-state preparation.
Beyond one qubit. For interacting many-body Hamiltonians this single-ancilla trick does not generalize directly (the purification's Schmidt rank must match the Hilbert space dimension in general), and practical quantum Gibbs-sampling proposals instead use quantum Metropolis sampling, quantum imaginary-time evolution (QITE), or variational thermofield-double constructions — each with its own resource and convergence tradeoffs.
Implementation
import numpy as np
from qiskit import QuantumCircuit
from qiskit.quantum_info import DensityMatrix, partial_trace
def thermal_qubit(beta: float, delta: float) -> QuantumCircuit:
theta = 2 * np.arctan(np.exp(-beta * delta / 2))
qc = QuantumCircuit(2) # qubit 0 = ancilla, qubit 1 = system
qc.ry(theta, 0)
qc.cx(0, 1)
return qc
beta, delta = 1.0, 1.0
qc = thermal_qubit(beta, delta)
full = DensityMatrix.from_instruction(qc)
system_rho = partial_trace(full, [0]) # trace out the ancilla
print(np.real(system_rho.data))
# [[0.7311, 0], [0, 0.2689]] == Boltzmann populations for beta*delta = 1
FINAL_CIRCUIT = qcQuantum vs classical
Classical baseline
Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.
Quantum claim
The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.
How to compare
Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.
Declared gaps
Nobody has reviewed this record for gaps yet.