|q⟩ Bad Qubits

beginner · Programming · Mini-Projects: Coin Flips, RNG & Bell Tests

Reflection: What You Can Now Build

You have worked through fifteen modules. Before moving to the next level it is worth pausing to take stock of every tool you now carry — and to notice how much territory those tools already cover.

The single-qubit layer

A single qubit lives in a two-dimensional complex vector space. Its state is a unit vector

ψ=α0+β1,α2+β2=1,|\psi\rangle = \alpha|0\rangle + \beta|1\rangle, \qquad |\alpha|^2 + |\beta|^2 = 1,

which you can visualize as a point on the Bloch sphere: the north pole is 0|0\rangle, the south pole is 1|1\rangle, and the equator is the belt of equal-weight superpositions. Every single-qubit gate is a rotation of that sphere.

The gates you can now apply fall into a few families:

| Family | Gates | What they do | |---|---|---| | Pauli flips | XX, YY, ZZ | 180°180° rotations about xx, yy, zz | | Hadamard | HH | Swaps zz- and xx-axes; creates superposition | | Phase gates | SS, SS^\dagger, TT, TT^\dagger, P(λ)P(\lambda) | Rotations about zz by fixed or arbitrary angles | | Rotation gates | Rx(θ)R_x(\theta), Ry(θ)R_y(\theta), Rz(θ)R_z(\theta) | Continuous rotations about each axis |

Together, HH and TT are universal for single-qubit unitaries: HH and TT generate a dense subgroup of SU(2)\mathrm{SU}(2), so any single-qubit operation can be approximated to any desired precision using only those two gates (Nielsen & Chuang, §4.2). The Solovay–Kitaev theorem further guarantees that the number of HH/TT gates needed scales only polylogarithmically in 1/ϵ1/\epsilon for precision ϵ\epsilon. The rotation gates give you the same power with direct, continuous control.

The two-qubit layer

Two qubits live in a four-dimensional space spanned by 00|00\rangle, 01|01\rangle, 10|10\rangle, 11|11\rangle. The feature that has no classical analogue is entanglement: there exist two-qubit states — such as the Bell states — that cannot be written as a product of two independent single-qubit states.

The two-qubit gates you have used:

Adding any entangling two-qubit gate to a universal single-qubit set yields a universal gate set for quantum computing — capable, in principle, of implementing any unitary on any number of qubits.

The measurement layer

Measurement in the computational basis produces a classical bit: outcome b{0,1}b \in \{0, 1\} appears with probability bψ2|\langle b|\psi\rangle|^2 (the Born rule). After the measurement the qubit collapses to b|b\rangle. You can measure individual qubits or all qubits at once, and you have seen how to change the basis before measuring to extract information along a different axis — the trick behind state tomography.

What you have built in this module

The projects in Module 15 used all three layers together:

Where this leads

The beginner track has equipped you with the language of quantum circuits. The intermediate track builds algorithms out of this language: Deutsch–Jozsa, Bernstein–Vazirani, Simon's algorithm, and Grover's search will each show you a setting where quantum interference lets a circuit find an answer in fewer queries than any classical algorithm can. Every one of those algorithms uses exactly the gates and measurement ideas you already know.

Sign in on the full site to ask questions and join the discussion.