So far, every example has involved a single qubit. In this module, we add a second one — and immediately unlock about three-quarters of what’s interesting about quantum computing. (The other quarter is algorithms.)
The first thing we need is a way to describe the combined state of two qubits at once. If qubit A is in state and qubit B is in state , what’s the state of “both together”?
The answer is the tensor product, written (or sometimes just to save space).
The four basis states
One qubit has two basis states: and .
Two qubits have four basis states:
Each one describes a definite classical configuration: “qubit 1 is 0 and qubit 0 is 1,” or “both qubits are 1,” and so on. Any state of two qubits is a superposition of these four:
There are four complex amplitudes now, with the normalization rule:
Three qubits would have basis states. Ten qubits would have . A hundred qubits would have — more basis states than there are atoms in the observable universe. This exponential blow-up is one reason why simulating quantum computers on classical computers is hard.
The tensor product formula
If qubit 0 is independent of qubit 1, the combined state is a product. Here’s the formula:
Multiply it out like polynomials (or like you would with algebraic distribution):
Each of the four combined amplitudes is just the product of the two individual amplitudes. The tensor product is built from ordinary multiplication — there’s nothing mysterious about it.
A quick convention: in , the left bit is qubit 1 and the right bit is qubit 0. So means “qubit 1 is in state 1, qubit 0 is in state 0.” (This matches how binary numbers are written, where the most significant bit is on the left.)
See it in action
Drag the sliders for each qubit. Watch the combined tensor product update. Notice that the four amplitudes in the result on the right are always just products of the four amplitudes on the left.
Try:
- Set both qubits to ( on both). The combined state is — a single nonzero amplitude.
- Set qubit 0 to () and qubit 1 to . The result is : qubit 1 is definitely 0, but qubit 0 is in superposition.
- Set both to . The result is : a uniform superposition over all four basis states.
This last one is worth pausing on. Two qubits, each in superposition, give you a combined state that has equal weight on every possible bitstring. If you had ten qubits all in , you’d have a uniform superposition over bitstrings at once. This is the starting move of almost every quantum algorithm.
Notation shortcuts
A few shorthand conventions you’ll see everywhere:
- (just concatenate)
- (juxtaposition means tensor product)
- (-fold tensor product — useful for “all qubits in ”)
The symbol is often dropped when context makes it clear.
What’s next
You now know how to describe a pair of qubits when they behave independently. The next lesson asks the question you should already be suspicious about: is every 2-qubit state a tensor product?
Spoiler: no. And the ones that aren’t are the most interesting thing in this whole subject.