How do many unitary evolutions combine into a quantum computation?
Step:Click a gate column to inspect
Build
State
Gates
Discover
Initial State
Gate Palette
Click a gate, then click a wire cell to place it.
Single-qubit
Two-qubit
Controls
how to use
Select a gate from the palette. Click a cell on the circuit grid to place it. Click Run to execute the full circuit. Click Step to execute one gate at a time and watch the Bloch spheres update.
State vector |ψ⟩
|ψ⟩ = 1|00⟩
Amplitudes
Entanglement
Product State
Each qubit has an independent pure state.
Total probability =1.0000 ✓
reading the state
The state vector shows all four basis amplitudes. Run a circuit and watch how each gate transforms the amplitudes. Every gate is a unitary transformation.
H — Hadamardsingle
Rotates π around the (X+Z)/√2 axis. Creates equal superposition from |0⟩. Converts phase into probability and back.
|0⟩ → |+⟩ · |1⟩ → |−⟩
X — Pauli Xsingle
π rotation around X axis. Swaps |0⟩ and |1⟩. The quantum NOT gate.
|0⟩ → |1⟩ · |1⟩ → |0⟩
Z — Pauli Zsingle
π rotation around Z axis. Flips the phase of |1⟩. Leaves probabilities unchanged.
|0⟩ → |0⟩ · |1⟩ → −|1⟩
S — Phase gatesingle
π/2 rotation around Z axis. Adds a factor of i to the |1⟩ component. S² = Z.
|0⟩ → |0⟩ · |1⟩ → i|1⟩
T — π/8 gatesingle
π/4 rotation around Z axis. Smallest standard phase gate. Part of a universal gate set with H.
|0⟩ → |0⟩ · |1⟩ → e^(iπ/4)|1⟩
CNOT — Controlled-Xtwo-qubit
Flips target qubit B when control qubit A is |1⟩. The fundamental entangling gate. Applied to a superposition → entanglement.
|10⟩ → |11⟩ · |11⟩ → |10⟩
CZ — Controlled-Ztwo-qubit
Applies a phase flip to the |11⟩ component. Symmetric — control and target are interchangeable.
|11⟩ → −|11⟩ · others unchanged
SWAPtwo-qubit
Exchanges the quantum states of qubits A and B. SWAP = CNOT · CNOT · CNOT (three CNOTs in sequence).
|01⟩ → |10⟩ · |10⟩ → |01⟩
M — Measurementreadout
Converts quantum information into a classical bit. Collapses the superposition. Irreversible — unlike all gates above. Placement in the circuit determines which information is extracted.
|ψ⟩ → 0 or 1 with Born-rule probabilities
universal gate set
{H, T, CNOT} forms a universal gate set — any quantum operation can be approximated to arbitrary precision using only these three gates. This is why T gates matter despite their small rotation.
Place an H gate on qubit A. Before running: what do you expect the state to become?
The state became |+0⟩ = (|00⟩ + |10⟩)/√2. One gate, one qubit, one unitary transformation. Qubit B is unchanged. Gates act independently on their qubit unless they are two-qubit gates.
Now add a CNOT with A as control and B as target. Before running: will this create entanglement?
The state became (|00⟩ + |11⟩)/√2 — the Bell state Φ⁺. The Bloch spheres faded: neither qubit has an independent pure state anymore. CNOT on a superposition = entanglement. The same gate on a basis state does not.
Circuits execute gates from left to right. If you swap the order — CNOT first, then H on A — do you get the same final state?
The final state was different. Gate order matters because unitary operators generally do not commute: U·V ≠ V·U. The circuit is a sequence — its left-to-right order is the computation.
★ Final Challenge
Build a circuit that takes |00⟩ to the Bell state (|01⟩ + |11⟩)/√2. You can use H, X, and CNOT. Without running it: design the circuit first, then confirm.
Circuit: X on B → H on A → CNOT produces (|01⟩ + |11⟩)/√2. Starting from |00⟩: X flips B to |01⟩, H puts A in superposition giving (|00⟩ + |10⟩)/√2 ⊗ |1⟩ ≡ (|01⟩ + |11⟩)/√2, then CNOT entangles them, preserving the structure. A circuit is simply a sequence of unitary transformations — each one a controlled evolution.
Simulation 2 — Describing Evolution
Unitary operators are the mathematics forced by the physics.
Simulation 3 — Rotation Explorer
Rx, Ry, Rz are continuous rotations on the Bloch sphere.
Simulation 4 — Evolution Builder
Gates are controlled stops on continuous evolution.
Simulation 5 — Circuit Builder
A circuit is a timeline of sequential unitary evolutions.
Everything in this module is a different representation of the Second Postulate of Quantum Mechanics.
Circuit Builder · F2 · Final Simulation
Investigation complete.
You built quantum circuits from first principles — and discovered that a circuit is simply a timeline of unitary evolutions, each one a named stop on continuous quantum rotation.
F2 — Quantum Evolution · Complete
Everything in this module — continuous evolution, unitary operators, rotations, gates, and circuits — is a different representation of the Second Postulate of Quantum Mechanics: the time evolution of an isolated quantum system is governed by a unitary transformation.