Gates and Circuits
Multiple qubits and the tensor product
n qubits live in a 2^n-dimensional space
Add a bit to a classical register and you get one more slot: n bits store n binary digits. Add a qubit and something wilder happens. The register does not grow by one number, it doubles. Three qubits already need eight amplitudes, ten need a thousand, and three hundred need more numbers than there are atoms in the observable universe. That doubling is not a footnote. It is the whole reason anyone builds these machines.
The trap: counting qubits like bits
The natural guess, carried over from classical registers, is that n qubits are described by n numbers, one per qubit. Test it before we build the real picture.
How many complex amplitudes does it take to fully describe the state of 3 qubits?
Eight, not three. The state of three qubits is a superposition over every 3-bit outcome at once, and there are of them. The number of amplitudes is exponential in the number of qubits. To see why, we need the operation that glues single-qubit states into a joint state.
Play with the doubling
Each chip below is one qubit in a state you choose. Watch the bar count: one qubit gives two amplitudes, and every qubit you add doubles it, 2, 4, 8, 16. The register is not gaining slots, it is multiplying them.
|+>
The tensor product, concretely
The tool that combines two subsystems into one is the , written . You do not need its abstract definition, only its bookkeeping. Take one qubit in and another in . Their joint state is written by stacking the labels:
The combined label just concatenates the two kets, most significant qubit on the left.[2] To get the amplitudes, you multiply out every pairing. If the first qubit is and the second is , the joint state is:
Two amplitudes times two amplitudes gives four, one for each 2-bit string. This is just the distributive law, the same expansion the matrix lesson uses, applied to labels instead of numbers. Add a third qubit and you pair each of those four with two more, giving eight. The pattern is locked:
Every added qubit multiplies the amplitude count by two, exactly the exponential growth that makes an algorithm intractable on a classical machine. A classical computer that wanted to track all amplitudes would need that much memory. At , is larger than the number of atoms in the observable universe, so no classical machine could ever store the vector.[1] A 300-qubit quantum computer holds it as a matter of course.
The promise, stated carefully
import numpy as np
zero = np.array([1, 0])
one = np.array([0, 1])
state = np.kron(zero, one) # |0> tensor |1>
# state -> [0, 1, 0, 0] == |01>
plus = (1/np.sqrt(2)) * np.array([1, 1])
reg = plus
for _ in range(9): # build a 10-qubit register of |+>
reg = np.kron(reg, plus)
len(reg) # 1024 == 2**10Lock it in
- n qubits are described by 2^n complex amplitudes, one per n-bit string, not by n numbers. The count is exponential.
- The tensor product |0> tensor |1> = |01> glues subsystems into a joint state by concatenating labels and multiplying out amplitudes.
- Every added qubit doubles the amplitude count: 2, 4, 8, ... , 2^n. At 300 qubits the vector has more entries than the universe has atoms.
- That exponential space is the promise of quantum computing, but a measurement still yields only n bits, so it must be spent by interference.
Recall: how many amplitudes describe n qubits, and how do you combine two single-qubit states?
The 2^n count and the tensor-product rule are the backbone of everything multi-qubit. Try to state it, then check.
A register has n qubits. How does its amplitude count change when you add one more qubit?
What state is |1> tensor |0>?
Match each item to its meaning.
2 amplitudes.
2^n amplitudes.
Combines two subsystems into a joint state.
Both qubits definitely zero.
Primary source
Quantum Country, Quantum computing for the very curiousMatuschak and Nielsen build multi-qubit states from the tensor product with the same care, and their spaced-repetition prompts are worth doing to make the 2^n count stick.
Sources