What Is a QPU?
A QPU (quantum processing unit) is the chip that physically holds the qubits, and it never works alone: a compiler rewrites your circuit for the chip, classical electronics turn instructions into physical signals, and readout hardware turns quantum states back into ordinary bits. Understanding that stack explains most of what a program can and cannot do on real hardware.
What does 'QPU' actually mean?
A QPU — quantum processing unit — is the physical device that holds the qubits, the quantum version of bits. A classical bit is always 0 or 1. A qubit's state is described by two numbers called amplitudes, one attached to the outcome 0 and one to the outcome 1; squaring an amplitude gives the probability of seeing that outcome when the qubit is measured.
The name invites comparison with a CPU or GPU, but the comparison misleads in one important way. A CPU fetches and executes instructions on its own. A QPU does nothing on its own: every operation is driven from outside by classical electronics, and every result leaves the device as ordinary classical bits.
So the honest picture is a stack — your program at the top, the quantum chip in the middle, and layers of classical machinery in between and around it. This lesson walks one job through that stack.
What happens between your code and the chip?
Five stages sit between the code you write and the bits you get back:
- Authoring. You describe a circuit — an ordered list of operations (gates) applied to named qubits — usually in a language such as Python. The QPU never sees this code.
- Compilation. A compiler rewrites your circuit so it uses only the operations the target chip natively supports, placed on qubits that are physically able to interact. Same mathematics, different spelling.
- Control. Room-temperature electronics convert each compiled instruction into a physical signal — a shaped microwave pulse or a laser burst, depending on the hardware type.
- Execution and readout. The signals steer the qubits through the computation. At the end, a measurement forces each qubit to a definite 0 or 1 — one classical bit per qubit.
- Post-processing. Because outcomes are probabilistic, the whole circuit is repeated many times. One repetition is called a shot; software gathers the shots into a table or histogram of how often each bitstring appeared.
A common misunderstanding is that "the QPU runs my Python program". It never does. Python (or any other language) is an authoring interface; what reaches the processor is hardware-level control signals derived from the compiled circuit.
Worked example: one Bell-pair job through the stack
The circuit below prepares a Bell pair — the simplest entangled state, meaning the two qubits give individually random but perfectly correlated results. Two gates do it: H on q0, then CX from q0 to q1 (CX flips its target qubit only when its control qubit is 1).
Follow the amplitudes by hand. Both qubits start at 0. The H gate puts q0 into an equal split: amplitude 0.7071 for q0 = 0 and 0.7071 for q0 = 1 (0.7071 is 1 divided by the square root of 2). The CX then ties q1 to q0, leaving amplitude 0.7071 on the outcome "both qubits 0" and 0.7071 on "both qubits 1", and zero on the mixed outcomes.
Square the amplitudes to get probabilities: 0.7071 squared is 0.4999… — essentially 0.5. So the model predicts 50% 00 and 50% 11.
Now the classical layers show up in the numbers. Request 1,000 shots and you will not get exactly 500 and 500. Random sampling has a natural spread of about the square root of (1000 × 0.5 × 0.5) ≈ 16 shots, so anything from roughly 468 to 532 per outcome — within about two of those 16-shot spreads on either side of the ideal 500 — is normal. A result of 484 vs 516 does not mean the machine is broken — it means you took a finite sample of a 50/50 process.
Run it: a Bell pair
Worked example: what compilation costs
Compilation is not free bookkeeping — it changes how many error-prone operations actually run. Suppose a chip connects its qubits in a line, q0–q1–q2, and your circuit asks for a CX between q0 and q2, which share no connection. The compiler must first move one of the states next to the other using a SWAP — an operation that exchanges the states of two qubits, and which itself is built from 3 CX gates.
Put illustrative numbers on it. Say each CX works correctly 99% of the time. The direct gate, where hardware allows it, succeeds with probability 0.99. The routed version needs the SWAP's 3 CX gates plus the intended one: 4 gates in total. Multiply the success probabilities step by step: 0.99 × 0.99 = 0.9801; × 0.99 = 0.9703; × 0.99 = 0.9606.
So the error rate went from 1% to about 4% — quadrupled — because of where two qubits happened to sit. This is why hardware lessons in this course keep returning to layout and connectivity, starting with superconducting qubits.
On real hardware
Everything above ran on an ideal simulator (you can rebuild it yourself in the Lab). A real QPU adds its own personality at every layer of the stack: which gates it supports natively, which qubit pairs can interact, how accurate each operation is, and how its readout behaves.
Browse real devices at /hardware/qpus and put two side by side at /hardware/compare. One habit to build now: vendor pages describe whole systems, not just chips, and where a number is not published the honest reading is "not disclosed" — not a guess.