98
Part Three · A · Foundations of quantum information

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, ∣a⟩⊗∣b⟩=∣ab⟩|a\rangle\otimes|b\rangle = |ab\rangle, and the basis of nn qubits is the 2n2^n bit strings. Matrices combine by the Kronecker product: (A⊗B)(ij),(kl)=AikBjl(A\otimes B)_{(ij),(kl)} = A_{ik}B_{jl}. A gate UU on qubit 0 alone is U⊗1⊗⋯U\otimes\mathbb 1\otimes\cdots. 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: ∣c,t⟩→∣c,t⊕c⟩|c, t\rangle \to |c, t\oplus c\rangle. More generally a controlled-UU applies UU to the target when the control is 1. Build a state: . H on q0 then two CNOTs gives (∣000⟩+∣111⟩)/2(|000\rangle + |111\rangle)/\sqrt2, the three-qubit GHZ state.

Measuring part of a register

Measure just one qubit. The probability of 0 is the sum of ∣amplitude∣2|\text{amplitude}|^2 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 ∣q0q1q2⟩|q_0q_1q_2\rangle 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 2n2^n 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.

How many amplitudes describe 10 qubits?tap
2¹⁰ = 1024.
What does measuring q0 of a GHZ state do to q1 and q2?tap
Fixes them to the same value as q0.
How does Qiskit order qubits?tap
Little-endian: qubit 0 is the rightmost bit of the label.

And one to work out. Storing every amplitude of 30 qubits at 16 bytes each takes how many gigabytes?

memory =GB

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.

Next · Chapter 99
Entanglement and Bell states

Two gates create a correlation no classical system can produce.

Turn the page