Math
Gates, phase and what a basis is for
Four small circuits with one turnable phase in them, read in the Z, X or Y basis. The phase is a real, located property of the state - the Bloch vector walks the equator with it - and in the wrong basis it is completely invisible: over a whole turn the largest change in any outcome probability is 1e-16. Put a second Hadamard at the end and the same phase decides the answer with certainty. That is interference, and it is the whole difference between a quantum computer and a coin.

What happens
Four small circuits on a register of qubits, with one knob: a phase φ. Between two Hadamards the phase becomes a probability, cos²(φ/2) - interference on a single qubit. Skip the second Hadamard and the phase only turns the Bloch vector, both outcomes stay ½. Entangle two or three qubits and every single one becomes a fair coin with no Bloch vector at all; the phase has not vanished, it has moved into the parity - measure all the qubits together and cos φ is back. Turn φ through a full turn in each circuit and watch where it shows up and where it hides.
Equations used in the module
Equations
phase(φ) = diag(1, e^{iφ}); φ = π is Z, π/2 is S, π/4 is T
interference H·phase(φ)·H: P(0) = cos²(φ/2)
Bell, GHZ: each qubit alone a fair coin, Bloch length 0
parity ⟨Z…Z⟩ carries cos φ - the phase lives in the correlations

