The gap between circuits and devices
Every calculation in this course so far assumed perfect gates, perfect measurements and qubits that wait indefinitely without changing. Real qubits are physical systems: an atom, an ion, a superconducting circuit, a photon, an electron spin. They interact with their surroundings, and every control pulse is slightly wrong. The result is noise, and it is the central obstacle between today's devices and the algorithms of the previous lesson. Preskill's term "NISQ" (noisy intermediate-scale quantum) names this situation: devices large enough to be hard to simulate in some cases, but whose noise limits the size of circuit they can run reliably (Preskill, 2018).
This lesson gives the standard mathematical description of noise, uses it to see how errors accumulate, surveys the hardware platforms qualitatively, and ends with the idea that makes large computations conceivable at all: error correction.
Density matrices and quantum channels
Noise turns a known pure state into a probabilistic mixture, so we need the density matrix previewed in the Bloch-sphere lesson. If a device prepares with probability , the state is . It is Hermitian, positive semidefinite and has trace 1. All earlier rules carry over: outcome probabilities are , expectation values are , and a gate acts as . For one qubit, with .
A general noise process is a quantum channel, written in Kraus form
One useful reading: with probability "event " happens and the state becomes normalised. The completeness condition makes the probabilities add up to one, i.e. it preserves the trace. It is a theorem that every physically allowed transformation of a quantum system (completely positive and trace preserving) can be written this way (Nielsen and Chuang, Chapter 8, which this section follows in substance).
Three standard single-qubit channels
Dephasing (phase flip). With probability a error occurs: , . Since commutes with and anticommutes with and , the Bloch vector changes as
Populations of and are untouched; the relative phase, which carries the interference of the first lesson, is erased. At every state collapses onto the axis.
Depolarizing. With probability one of occurs, each with probability : and . Each Pauli flips two of the three Bloch components, and averaging gives a uniform shrink:
The second form shows why the channel is called depolarizing: it replaces the state by the maximally mixed state with probability . (Papers differ on whether "" means the Pauli-error probability, as here, or the replacement probability; always check.)
Amplitude damping. Energy relaxation from to with probability :
The population of is multiplied by , the off-diagonal entries of by , and repeated application drives every state to . Unlike the other two channels it is not unital: it does not fix the centre of the sphere.
Worked example
Start in , Bloch vector .
- Depolarizing with : .
- Amplitude damping with : initially , so afterwards and ; the coherence becomes , so .
import numpy as np
X = np.array([[0, 1], [1, 0]]); Y = np.array([[0, -1j], [1j, 0]]); Z = np.diag([1, -1])
def apply_channel(rho, kraus):
return sum(K @ rho @ K.conj().T for K in kraus)
def bloch(rho):
return np.round([np.trace(rho @ P).real for P in (X, Y, Z)], 4)
plus = np.array([[1, 1], [1, 1]]) / 2 # |+><+|, Bloch vector (1, 0, 0)
p = 0.1
depolarizing = [np.sqrt(1 - p) * np.eye(2)] + [np.sqrt(p / 3) * P for P in (X, Y, Z)]
print(bloch(apply_channel(plus, depolarizing))) # [0.8667 0. 0.] = 1 - 4p/3
gamma = 0.3
damping = [np.array([[1, 0], [0, np.sqrt(1 - gamma)]]), np.array([[0, np.sqrt(gamma)], [0, 0]])]
print(bloch(apply_channel(plus, damping))) # [0.8367 0. 0.3]
T1 and T2
Device specifications summarise idle noise by two times.
- , energy relaxation. Prepare and wait: the excited population decays as . This is amplitude damping with .
- , coherence time. Prepare and wait: the length of the Bloch vector's – part decays as (in the simplest, exponential model).
In the Bloch picture, free decay (ignoring any deliberate rotation about ) is
Amplitude damping alone already shrinks coherences by , so relaxation contributes to . Any additional pure dephasing, with its own time , adds rates: . Hence, in this model, . The exercise checks the closed form above against an explicit composition of amplitude damping and dephasing Kraus maps.
Two caveats keep these numbers honest. Real decay is not always exponential: slowly fluctuating noise makes the coherence decay measured in a simple Ramsey experiment (often called ) shorter than the value obtained with a refocusing echo. And , vary between qubits on the same chip and drift over time, so a single quoted number is a summary, not a constant of nature.
Gate errors, readout errors and how they compound
Gates are noisy too. A gate's error rate is commonly summarised by its average infidelity: the average over input states of , where is the operation the device actually performs and the ideal gate. Measurements have readout errors: the probability of reporting 1 when the qubit was , and vice versa, collected in a confusion matrix. Two-qubit gates are typically the noisiest operations on current devices.
A simple model of compounding (a heuristic, not a theorem). Suppose each of operations fails independently with probability , and any failure ruins the output. Then
With and operations, : barely one run in three is error-free. With the probability is about , i.e. zero for practical purposes. The useful circuit size is of order operations. The model is crude: some errors do not affect the output, errors can be correlated, and coherent errors (a gate that systematically over-rotates by a small angle) can add up in amplitude, so their effect can grow quadratically with the number of repetitions instead of linearly. But the conclusion survives every refinement: without a way to suppress errors, circuit size is capped by the inverse error rate, while interesting algorithms need far larger circuits.
Hardware platforms
Several physical systems are being developed as qubits. The descriptions below are qualitative and attributed to review articles with their dates; device figures change quickly, so consult current primary sources for numbers.
- Superconducting circuits (Krantz et al., 2019). Qubits are nonlinear resonators built from Josephson junctions on a chip, cooled to millikelvin temperatures in dilution refrigerators and controlled by microwave pulses. Gates are fast and the chips are made with lithographic fabrication; qubits typically couple only to neighbours on the chip, and fabrication variation makes every qubit slightly different.
- Trapped ions (Bruzewicz et al., 2019). Qubits are internal levels of ions held in vacuum by electromagnetic fields and driven by lasers or microwaves. All ions of a species are identical, coherence is long compared with gate times, and the shared motion of the ions mediates gates between any pair in a chain; gates are slower than in superconducting circuits, and scaling to many ions requires moving ions or linking traps.
- Neutral atoms (Saffman, Walker and Mølmer, 2010). Atoms held in arrays of optical tweezers interact strongly when excited to Rydberg states, which provides entangling gates. Tweezer arrays can be large and rearranged during a computation: for example, Bluvstein et al. reported in December 2023 a processor operating on encoded logical qubits with up to 280 physical qubits (Bluvstein et al., 2024).
- Photons (Kok et al., 2007). Qubits encoded in photons barely interact with their environment and travel easily, but they also barely interact with each other, so entangling operations rely on measurement and are probabilistic; photon loss is the dominant error.
- Semiconductor spins (Burkard et al., 2023). Electron or nuclear spins in quantum dots or donors in silicon or germanium, attractive for their small size and compatibility with semiconductor manufacturing; control of charge noise and uniformity across many devices are active research questions.
No platform is uniformly best. Each trades gate speed, coherence, connectivity, uniformity and manufacturability differently, and all of them have error rates far above what the algorithms of this course need at scale.
Why error correction is needed
The compounding estimate says that a noisy device can run only about operations. Reducing by engineering helps, but no plausible engineering improvement reaches the error rates needed for circuits with billions of operations. The way out is error correction: encode one logical qubit redundantly in many physical qubits, detect errors by measurements that do not reveal the encoded information, and correct them.
At first sight this seems impossible. Unknown quantum states cannot be copied (no-cloning), measurement disturbs them, and errors are continuous (any small rotation, not just bit flips). All three obstacles are overcome by encoding into entangled states and measuring only parity-type quantities called syndromes; the course Quantum Error Correction and Fault-Tolerant Quantum Computing develops this from the start. Here we look only at the simplest classical intuition.
Majority vote. Store a bit as copies (odd ), let each flip independently with probability , and decode by majority. Decoding fails when more than half flip:
For , decreases as grows; for redundancy makes things worse.
At : for , for , for and for
(exact values from the formula). The quantum bit-flip repetition code achieves
the same numbers against independent errors without ever reading the encoded
qubit, by measuring the parities of neighbouring qubits. It does nothing
against errors, which is why real codes are more elaborate. The KetQat SDK's
repetition-code product samples exactly this model (independent bit flips with
probability on each data qubit, one round, perfect syndrome measurement,
majority-vote decoding) and reports its Monte Carlo estimate beside the exact value:
from ketqat_runner import catalog
for n in (1, 3, 5, 7):
result = catalog.run("[email protected]", seed=7, n=n, physical_error_rate=0.1, shots=100000).result
ci = result["confidence_interval"]
print(n, result["logical_error_rate"], round(result["exact_logical_error_rate"], 6),
(round(ci["lower"], 5), round(ci["upper"], 5)))
This printed (SDK commit 2cedabb, NumPy 2.5; rates are logical failures per shot, i.e. per single round, with 95% Wilson intervals):
| Monte Carlo | exact | 95% interval | |
|---|---|---|---|
| 1 | 0.09834 | 0.1 | [0.09651, 0.1002] |
| 3 | 0.02822 | 0.028 | [0.02721, 0.02926] |
| 5 | 0.00829 | 0.00856 | [0.00775, 0.00887] |
| 7 | 0.00244 | 0.002728 | [0.00215, 0.00277] |
Every interval contains the exact value, and each step in cuts the logical error rate by a factor of about three. The threshold theorem extends this idea to full quantum computation: if the physical error rate per operation is below a threshold value (which depends on the code and the noise model), logical error rates can be made arbitrarily small at a cost that grows only polylogarithmically in the size of the computation, under assumptions about the noise such as weak correlations (Nielsen and Chuang, Section 10.6).
Experiments have begun to see the key signature, logical errors that fall as the code grows. As one example, Google Quantum AI reported (online December 2024, in print 2025) surface-code memory experiments on a superconducting processor in which the logical error per error-correction cycle decreased by a factor of each time the code distance increased by two, up to a distance-7 code on 101 qubits, with decoding as described in the paper (values quoted from Google Quantum AI, 2025). Turning such memories into large fault-tolerant computers remains an open engineering problem.
Common mistakes
- Treating as independent of . Relaxation also destroys coherence; in the exponential model .
- Mixing depolarizing conventions. "Depolarizing probability " may mean Pauli errors with total probability (Bloch shrink ) or replacement by with probability (shrink ).
- Reading as exact. It is a back-of-the-envelope model; coherent and correlated errors behave differently.
- Quoting hardware numbers without date and source. Device figures change quickly and vary across qubits.
- Expecting redundancy to always help. Majority vote helps only when , and a bit-flip code protects only against bit flips.
Summary
- Noisy states are density matrices; noise processes are Kraus maps with .
- Dephasing shrinks by ; depolarizing shrinks by ; amplitude damping relaxes towards .
- is energy relaxation, coherence decay; in the exponential model .
- With independent error probability per operation, circuits of more than about operations rarely succeed.
- Hardware platforms trade speed, coherence, connectivity and scalability; none is yet good enough for large algorithms without error correction.
- Redundancy suppresses errors when they are rare enough, which is the starting point of quantum error correction.
The exercise implements the channels and / decay with NumPy and checks your exact repetition-code formula against the KetQat SDK. This completes the course. The natural continuations are the Algorithms course and the course on quantum error correction and fault tolerance.