What Is a QPU?
A QPU (quantum processing unit) is the chip that holds the qubits. It never works alone. A compiler rewrites your circuit for the chip. Normal electronics turn each step into a physical signal. Readout hardware turns the qubits back into plain bits. Knowing this 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. A qubit is the quantum version of a bit. A normal bit is always 0 or 1. A qubit is described by two numbers called amplitudes. One goes with the answer 0 and one goes with the answer 1. Each amplitude says how strongly the qubit leans toward that answer. Square an amplitude and you get the chance of seeing that answer when you measure (read) the qubit.
The name sounds like CPU or GPU. That comparison is misleading in one big way. A CPU fetches and runs its own instructions. A QPU does nothing by itself. Normal electronics outside the chip drive every step. Every result leaves the chip as plain bits.
Think of a piano with no pianist. The piano makes the sound, but someone else presses every key. The example breaks in one place: a piano string holds one note at a time, but a qubit's two amplitudes can both be nonzero until you measure it.
So the honest picture is a stack. Your program sits at the top. The quantum chip sits in the middle. Layers of normal machines sit 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:
- Writing. You describe a circuit — a list of steps (called gates) done to named qubits. People often write it in a language such as Python. The QPU never sees this code.
- Compiling. A compiler is a program that rewrites your circuit. It swaps in only the steps this chip can do directly. It also puts them on qubits that are wired to each other. Same math, different spelling.
- Control. Normal electronics, at room temperature, turn each step into a physical signal. That signal is a shaped microwave pulse or a flash of laser light, depending on the kind of chip.
- Running and readout. The signals steer the qubits through the job. At the end, a measurement forces each qubit to a plain 0 or 1. You get one bit per qubit.
- Counting. The results are random, so the whole circuit runs many times. One run is called a shot. Software counts how often each bitstring (the row of 0s and 1s from all the qubits) showed up. It shows them as a table or bar chart.
A common mistake is to think "the QPU runs my Python program". It never does. Python is just how you write the job down. What reaches the chip is a stream of control signals made from the compiled circuit.
Worked example: one Bell-pair job through the stack
The circuit below makes a Bell pair. That is the simplest entangled state. Entangled here means each qubit's result is random on its own, but the two results always match. Two gates do it. First H on q0. Then CX from q0 to q1. (CX flips its target qubit only when its control qubit is 1.)
Let's follow the amplitudes by hand. Both qubits start at 0.
- The
Hgate gives q0 an even split. It has amplitude 0.7071 for 0 and 0.7071 for 1. (0.7071 is 1 divided by the square root of 2.) - The
CXties q1 to q0. Now amplitude 0.7071 sits on "both qubits 0". Another 0.7071 sits on "both qubits 1". The mixed answers get zero. - Square the amplitudes to get chances. 0.7071 × 0.7071 = 0.4999…, which is basically 0.5.
So the model predicts 50% 00 and 50% 11.
Now the counting stage shows up in the numbers. Ask for 1,000 shots and you will not get exactly 500 and 500. Think of flipping a fair coin 1,000 times. You rarely get exactly 500 heads. The normal spread is about the square root of (1000 × 0.5 × 0.5). That is the square root of 250, which is about 16 shots. Two spreads on each side of 500 gives roughly 468 to 532. Anything in that range 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. Unlike two coins, though, the two qubits never disagree: you will not see 01 or 10 here.
Run it: a Bell pair
Worked example: what compilation costs
Compiling is not free paperwork. It changes how many error-prone steps really run. Here is why.
Suppose a chip wires its qubits in a line: q0–q1–q2. Your circuit asks for a CX between q0 and q2. Those two are not wired together. So the compiler must first move one qubit's state next to the other. It uses a SWAP, a step that trades the states of two qubits. A SWAP is itself built from 3 CX gates.
Picture two friends at the ends of a row of seats who need to whisper. One has to trade seats with the person in the middle first. Every seat trade is a new chance to trip.
Let's do the arithmetic with made-up numbers. Say each CX works 99% of the time. If the chip could do the gate directly, it would succeed with chance 0.99. The routed version needs the SWAP's 3 CX gates plus the one you wanted. That is 4 gates in total. Multiply the chances one step at a time:
- 0.99 × 0.99 = 0.9801
- 0.9801 × 0.99 = 0.9703
- 0.9703 × 0.99 = 0.9606
So the error rate went from 1% to about 4%. It grew four times over, just because of where two qubits sat on the chip. This is why this course keeps coming back to layout and wiring, starting with superconducting qubits.
On real hardware
Everything above ran on a perfect simulator. You can rebuild it yourself in the Lab. A real QPU adds its own quirks at every layer of the stack. Which gates can it do directly? Which qubit pairs are wired together? How often does each step go right? How well does it read out the answers?
Browse real devices at /hardware/qpus. Put two side by side at /hardware/compare. Build one habit now. Vendor pages describe whole systems, not just chips. When a number is not published, the honest reading is "not disclosed". It is not a guess.