💻Quantum Computing Basics

Qubits, superposition, gates, the Bloch sphere and famous algorithms.

18 minPrerequisites:🔗 Spin & Entanglement

Qubits

A classical bit is 0 or 1. A qubit is ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha|0\rangle + \beta|1\rangle. Any pure state can be drawn as a point on the Bloch sphere: ∣ψ⟩=cos⁡θ2∣0⟩+eiφsin⁡θ2∣1⟩|\psi\rangle = \cos\tfrac\theta2|0\rangle + e^{i\varphi}\sin\tfrac\theta2|1\rangle nn qubits live in a 2n2^n-dimensional space — 300 qubits exceed the number of atoms in the universe.

Gates

  • X (NOT): flips ∣0⟩↔∣1⟩|0\rangle\leftrightarrow|1\rangle
  • H (Hadamard): ∣0⟩→∣0⟩+∣1⟩2|0\rangle\to\frac{|0\rangle+|1\rangle}{\sqrt2} — creates superposition
  • CNOT: flips the target if control is 1 — creates entanglement
  • HH then CNOT on ∣00⟩|00\rangle → Bell state ∣00⟩+∣11⟩2\frac{|00\rangle+|11\rangle}{\sqrt2}

Famous algorithms

  • Shor — factors integers exponentially faster (threatens RSA).
  • Grover — searches unsorted data in O(N)O(\sqrt N).
  • Quantum simulation — chemistry and materials, the most promising near-term use.

The challenge

Decoherence: interaction with the environment destroys superpositions. Error correction combines many physical qubits into one logical qubit.

Key formulas

Qubit

∣ψ⟩=α∣0⟩+β∣1⟩,  ∣α∣2+∣β∣2=1|\psi\rangle=\alpha|0\rangle+\beta|1\rangle,\;|\alpha|^2+|\beta|^2=1

Hadamard

H=12(111−1)H=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}

Bell state

∣Φ+⟩=12(∣00⟩+∣11⟩)|\Phi^+\rangle=\tfrac1{\sqrt2}(|00\rangle+|11\rangle)

Interactive simulation

Loading simulation…

Videos

Further resources

Check your understanding

1. Which gate creates superposition from |0⟩?

Score: 0 / 1

My notes