Module 04 · Quantum computing

Quantum Computing

Why classical scaling is ending, how a qubit is described (Dirac notation, Hilbert space, operators, Bloch sphere), how gates and circuits manipulate it, and how this translates into quantum-safe security, search and hardware decisions for clients.

Why quantum. Transistor counts doubled roughly every two years since 1965. As channels shrink, Δx falls, Δp rises (uncertainty principle) and electrons tunnel through gate oxides — a physical wall on top of the energy and heat walls. Problems such as molecular simulation, large-scale optimisation and factoring motivate a new paradigm: computation with qubits.
Classical vs quantum computation

What changes

AspectClassicalQuantum
PhysicsClassical lawsQuantum mechanics
UnitBit: 0 or 1Qubit: |ψ⟩ = α|0⟩ + β|1⟩, |α|² + |β|² = 1
N-unit registerOne of 2ᴺ states at a timeSuperposition of all 2ᴺ basis states: 2^(−N/2) Σ|x⟩
Reading outNon-destructiveMeasurement collapses to |0⟩ or |1⟩ with probability |α|², |β|²
LogicIrreversible gates, FANIN/FANOUT allowedUnitary (reversible) gates, no loops, no copying (no-cloning)
State preparation

Single-qubit state

Gates act on the current state: H creates superposition, S/T add relative phase, X/Y/Z rotate by π about their axes.

Geometry

Bloch sphere

drag to rotate
State vector
Measurement histogram
Run a measurement to sample outcomes.
Operator workbench

2×2 operator analysis

Enter complex entries as 0.7071, -i, 0.5+0.5i. The platform tests Hermitian / unitary / normal, computes eigenvalues and eigenvectors, and applies the operator to a ket.

Analysis
Mathematical basis

From vectors to Hilbert space

  • Linear vector space: kets |ψ⟩ that add and scale by complex numbers; a basis spans it, its size is the dimension.
  • Dirac notation: ket |ψ⟩ is a column, bra ⟨ψ| = (|ψ⟩)† is its conjugate-transpose row; the inner product ⟨φ|ψ⟩ is a complex number.
  • Norm ‖ψ‖ = √⟨ψ|ψ⟩; orthonormal basis: ⟨i|j⟩ = δᵢⱼ. A complete inner-product space is a Hilbert space.
  • Operators map kets to kets; in a basis they are matrices Aij = ⟨i|A|j⟩. The adjoint A† is the conjugate transpose.
  • Hermitian A = A† (real eigenvalues) · Unitary U†U = I (norm-preserving) · Normal AA† = A†A.
Postulates

The rules every device obeys

  1. State: an isolated system is a unit vector in a Hilbert space.
  2. Evolution: closed systems evolve by unitary operators, |ψ(t)⟩ = U|ψ(0)⟩.
  3. Measurement: observables are Hermitian; outcome = eigenvalue λₘ with probability |⟨m|ψ⟩|², after which the state collapses to |m⟩.
  4. Composite systems: the joint space is the tensor product, |ψ⟩⊗|φ⟩.
  5. Global phase eiθ|ψ⟩ is unobservable; only relative phase matters.

Pauli matrices: X = [[0,1],[1,0]], Y = [[0,−i],[i,0]], Z = [[1,0],[0,−1]] — Hermitian and unitary, eigenvalues ±1.

Circuit composer

Build a quantum circuit

Pick a gate, click a cell. Two-qubit gates: click the control, then the target in the same column. Click a placed gate to remove it.

Measurement histogram
State vector
Per-qubit Bloch vectors & entanglement
Physics → industry. Shor's algorithm threatens RSA/ECC, so encrypted data captured today can be decrypted later. BB84 encodes key bits in photon polarisation bases. Because measurement disturbs a quantum state and unknown states cannot be cloned, an eavesdropper raises the quantum bit error rate — the link detects the attack automatically.
Physics → industry. Superposition plus interference lets Grover's algorithm find a marked item among N in about (π/4)√N oracle calls instead of N/2. The advantage is quadratic, so clients need a wall-clock comparison — not hype — before funding a pilot.
Physical realisation. A qubit is any controllable two-level system: photon polarisation, a nuclear or electron spin in a magnetic field, the ground and excited states of an atom or ion driven by light, a superconducting circuit, or an electron in a quantum dot. Weight the criteria for the client's workload to shortlist platforms.