Multi-qubit systems and tensor products
One qubit needs two complex numbers to describe. Two qubits need four; three need eight; fifty need about a million billion. Store each as 16 bytes and fifty qubits fill 18 petabytes, more than any supercomputer’s memory. That doubling, one new qubit, twice the description, is both why quantum computers might be powerful and why simulating them classically is so hard. This chapter builds multi-qubit states and introduces the small simulator the rest of Part Three uses.
On the plate: the eight amplitudes of a three-qubit register. Height shows magnitude; colour shows phase.
Tensor products
Two systems together are described by the tensor product of their state spaces (Chapter 8). For qubits, , and the basis of qubits is the bit strings. Matrices combine by the Kronecker product: . A gate on qubit 0 alone is . Most states of several qubits are not products of single-qubit states; those are entangled (Chapter 99). Established
Two-qubit gates
The controlled-NOT flips the target if the control is 1: . More generally a controlled- applies to the target when the control is 1. Build a state: . H on q0 then two CNOTs gives , the three-qubit GHZ state.
Measuring part of a register
Measure just one qubit. The probability of 0 is the sum of over every basis state with that qubit 0. Afterwards, the amplitudes inconsistent with the result are removed and the rest renormalized. . On the GHZ state, measuring q0 instantly fixes q1 and q2 too: entanglement. On a product state, the other qubits are unaffected.
Which qubit is first?
This book, and Nielsen and Chuang, write with qubit 0 on the left, the most significant bit. Qiskit writes it on the right: little-endian. The same circuit gives the same physics but lists amplitudes in a different order, and the CNOT with control q0 has a different matrix. Toggle: or . If a result from a toolkit looks scrambled, check this first. Established
What you now have
Tensor and Kronecker products, the growth of the state, controlled gates and the CNOT, partial measurement and collapse, the GHZ state, and the qubit-ordering conventions that trip up most beginners.
· · ·
Three questions to carry with you.
And one to work out. Storing every amplitude of 30 qubits at 16 bytes each takes how many gigabytes?
Sources: M. A. Nielsen and I. L. Chuang, ch. 2 and 4. R. de Wolf, Quantum Computing: Lecture Notes, ch. 1–2. Qiskit documentation (bit ordering). Checked by code: 2⁵⁰ × 16 B = 18.0 PB, 2³⁰ × 16 B = 17.2 GB; CNOT matrices in both orderings; GHZ state from Book.QSim.