Physics

Quantum Gates

A gate is a rotation, a circuit is a product of rotations, and the state is four complex numbers whose squared lengths are all a measurement ever sees. Build a circuit on two qubits and watch the amplitudes, the two Bloch arrows and the odds move together. Then build the one circuit whose arrows both vanish.

Click a wire to drop the selected gate there, click the same gate again to remove it; a two-qubit gate puts its control on the wire you clicked

—
—

Entanglement C—
Length of each arrow—
Most likely outcome—
Shots recorded—

What to observe

  1. Run Bell. The H swings q0's arrow from the pole to the equator; then the CNOT makes both arrows shrink to nothing. The pair has one exact state, but neither qubit has one of its own.
  2. In H·Z·H the Z leaves the probability bars alone and only turns the phase of |1⟩ by 180°. The second H turns that invisible phase into a certain flip: phase is what interferes.
  3. In kickback the CNOT acts on q1, prepared in |−⟩, yet q1's arrow ends where it was and q0's lands on the south pole. The control is the one that got marked.
  4. Measure ×200 samples only the squared lengths: on the Bell state the shots split between |00⟩ and |11⟩ and never show a phase.

Shortcuts:space run/pause · s step · r reset · f fullscreen