Skip to content

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.

Each chip is one qubit; click it to change its state. Add a qubit and the bar count doubles. The register never adds a slot, it multiplies them.
1 qubit = 2^1 = 2 amplitudes

|+>

The full 1-qubit state lives in a 2-dimensional space. One number per bar.

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

The exponential state space is real, but it is not a free lunch. You can hold amplitudes, yet a single measurement returns only bits. The exponential is a resource you have to spend through interference, not a stack of answers you can read out. Lesson 0014 walks straight into that wall on purpose; keep the count in mind until then.
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**10
The tensor product is np.kron; the state vector length doubles per qubit.

Lock 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.

drop here

2 amplitudes.

drop here

2^n amplitudes.

drop here

Combines two subsystems into a joint state.

drop here

Both qubits definitely zero.

Primary source

Quantum Country, Quantum computing for the very curious

Matuschak 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

  1. 1.Matuschak and Nielsen, Quantum computing for the very curious
  2. 2.Nielsen and Chuang, Quantum Computation and Quantum Information, ch. 2.1.7