The Qubit and Quantum Gates
Classical bits are 0 or 1. A qubit is a two-level quantum system whose state is the superposition α|0⟩ + β|1⟩, where |α|² + |β|² = 1 and α, β are complex amplitudes. The Bloch sphere — a unit sphere in 3D Euclidean space — maps every pure qubit state to a unique point on its surface. The north pole is |0⟩, the south pole is |1⟩, and every superposition lands somewhere on the sphere.
Pure qubit state: |ψ⟩ = cos(θ/2)|0⟩ + e^(iφ)sin(θ/2)|1⟩
Bloch sphere coordinates: (sin θ cos φ, sin θ sin φ, cos θ)
Gate as unitary matrix U (2×2 complex, UU† = I):
Hadamard: H = (1/√2)[[1,1],[1,−1]]
Phase: S = [[1,0],[0,i]] T =
[[1,0],[0,e^(iπ/4)]]
Measurement probabilities: P(0) = |α|², P(1) = |β|²
Post-measurement collapse: |ψ⟩ → |0⟩ with prob P(0), |1⟩ with prob
P(1)
Quantum Phenomena & Algorithms
Beyond qubits and gates, quantum mechanics enables phenomena with no classical analogue: a particle penetrating a barrier it has nowhere near enough energy to cross, and a search algorithm that finds a needle in a haystack of N items with only √N queries instead of N/2.
Why O(√N) and not O(1)? Grover's algorithm provides a quadratic speedup, not exponential. For a database of 1 million items, classical search needs on average 500 000 queries; Grover needs ~785. The speedup is provably optimal for unstructured search. Exponential speedups (like Shor's algorithm for factoring) require structure in the problem.
Algorithms at a Glance
Suggested Learning Paths
- Qubit Bloch Sphere — state and gates
- Quantum Entanglement — Bell states basics
- Quantum Tunneling — wave mechanics
- Quantum Spin — Larmor precession
- Quantum Circuit Simulator — multi-qubit gates
- Grover's Algorithm — amplitude amplification
- Quantum Entanglement — CHSH violation
- Qubit Bloch Sphere — SU(2) geometry