Quantum bits and superposition

The future of computing

2,598 words13 min read

Classical computers have taken us remarkably far - from moon landings to artificial intelligence to the device in your pocket. But some problems remain stubbornly beyond reach: simulating molecules for drug discovery, breaking modern encryption, optimizing global logistics networks. These problems share a common trait: their complexity grows exponentially with size, overwhelming even the fastest supercomputers. Quantum computers promise to tackle exactly these challenges by harnessing the strange rules of quantum mechanics - the physics that governs atoms and subatomic particles.

From bits to qubits: a fundamental shift

A classical [[bit]] is the fundamental unit of information - it's either 0 or 1, on or off, true or false. This binary nature is physical: a transistor conducts current or doesn't, a capacitor is charged or discharged, a magnetic domain points up or down. Every computation, from adding numbers to training neural networks, ultimately reduces to manipulating billions of these binary values according to logical rules.

A [[qubit]] (quantum bit) is the quantum analog - but with a crucial difference. While a classical bit is definitely 0 or 1, a qubit can exist in a [[superposition]] of both states simultaneously. This isn't uncertainty or probability in the classical sense - we're not just ignorant of the true state. The qubit genuinely exists in both states at once, described by a mathematical combination of |0⟩ and |1⟩, until we measure it.

Measurement is where quantum weirdness becomes concrete. When you measure a qubit, the superposition 'collapses' and you get a definite result - either 0 or 1. The probability of each outcome is determined by the amplitudes in the superposition. A qubit in state (|0⟩ + |1⟩)/√2 has equal 50% probability of measuring as 0 or 1. But before measurement, it's not secretly one or the other - it's genuinely both.

CLASSICAL BIT vs QUANTUM BIT

CLASSICAL BIT
═══════════════════════════════════════
State: Either 0 or 1 (definite)
Storage: Transistor, capacitor, magnetic domain
Operations: AND, OR, NOT, XOR (Boolean logic)
Measurement: Just read the value, no effect

QUANTUM BIT (QUBIT)
═══════════════════════════════════════
State: |ψ⟩ = α|0⟩ + β|1⟩

Where:
  |0⟩ and |1⟩   = basis states (like classical 0 and 1)
  α and β        = complex probability amplitudes
  |α|²           = probability of measuring 0
  |β|²           = probability of measuring 1
  |α|² + |β|² = 1  (probabilities must sum to 1)

Storage: Superconducting circuits, trapped ions, photons
Operations: Quantum gates (unitary transformations)
Measurement: Collapses superposition, probabilistic outcome

EXAMPLE STATES:
═══════════════════════════════════════
|0⟩ = 1·|0⟩ + 0·|1⟩
    → Always measures as 0 (100% probability)

|1⟩ = 0·|0⟩ + 1·|1⟩  
    → Always measures as 1 (100% probability)

|+⟩ = (1/√2)|0⟩ + (1/√2)|1⟩
    → 50% chance of 0, 50% chance of 1
    → This is a SUPERPOSITION

|−⟩ = (1/√2)|0⟩ − (1/√2)|1⟩
    → Also 50/50, but with different PHASE
    → Phase affects interference in algorithms

Bloch Sphere - Qubit Visualization

|0⟩|1⟩+X-X
Current State:
1.000|0⟩ + 0.000|1⟩
P(|0⟩)
100.0%
P(|1⟩)
0.0%

Quantum Gates

Understanding the Bloch Sphere

  • |0⟩ is at the north pole (100% probability of measuring 0)
  • |1⟩ is at the south pole (100% probability of measuring 1)
  • • Points on the equator represent equal superposition states
  • • The green arrow shows the current qubit state vector
Click quantum gates to apply transformations. The Hadamard gate (H) creates superposition from a basis state.
Visualize qubit states on the Bloch sphere and apply quantum gates

The Bloch sphere: visualizing the quantum state space

The [[Bloch sphere]] provides an intuitive way to visualize a single qubit's state. The north pole represents |0⟩, the south pole represents |1⟩, and every point on the sphere's surface represents a valid quantum state. This sphere captures all possible superpositions of a single qubit in three dimensions.

The angle θ (theta) from the north pole determines the probability distribution - how likely each measurement outcome is. At the north pole (θ=0), you always measure 0. At the south pole (θ=π), you always measure 1. On the equator (θ=π/2), you get 50/50 outcomes. The angle φ (phi) around the equator determines the relative phase between the |0⟩ and |1⟩ components - invisible in single measurements but crucial for interference effects in algorithms.

Classical bits can only exist at the poles - they're either 0 or 1. Quantum gates rotate the state vector on the Bloch sphere, moving between any points on the surface. This continuous space of states, combined with interference and entanglement, is what gives quantum computing its power.

Quantum gates: the operations that matter

Just as classical computers use logic gates (AND, OR, NOT) to manipulate bits, quantum computers use [[quantum gates]] to manipulate qubits. But quantum gates have constraints that classical gates don't: they must be reversible (you can always undo them) and must preserve total probability (unitary operations). These constraints come from the fundamental laws of quantum mechanics.

GateSymbolOperationBloch sphere actionClassical analog
Pauli-XXBit flip: |0⟩↔|1⟩180° rotation around X-axisNOT gate
Pauli-YYBit+phase flip180° rotation around Y-axisNone
Pauli-ZZPhase flip: |1⟩→−|1⟩180° rotation around Z-axisNone
HadamardHCreates superposition90° around (X+Z)/√2 axisNone
Phase (S)S|1⟩→i|1⟩90° around Z-axisNone
T gateT|1⟩→e^(iπ/4)|1⟩45° around Z-axisNone
CNOTCXFlip target if control=|1⟩Conditional X rotationXOR
ToffoliCCXFlip target if both controls=|1⟩Doubly-conditional XAND

The [[Hadamard gate]] (H) is perhaps the most important single-qubit gate - it creates superposition from a definite state. Applying H to |0⟩ produces |+⟩ = (|0⟩ + |1⟩)/√2. Applying H again returns to |0⟩. This reversibility is key - every quantum gate can be undone, which is not true for classical gates like AND (you can't recover inputs from output).

HADAMARD GATE IN DETAIL
═══════════════════════════════════════

Matrix representation:
        1   [ 1   1 ]
H =   ─── × [       ]
       √2   [ 1  -1 ]

Acting on basis states:
H|0⟩ = (1/√2)(|0⟩ + |1⟩) = |+⟩
H|1⟩ = (1/√2)(|0⟩ − |1⟩) = |−⟩

Key property: H² = I (applying H twice = identity)
H(H|ψ⟩) = |ψ⟩ for any state |ψ⟩

CNOT GATE (Controlled-NOT)
═══════════════════════════════════════

Two qubits: control (c) and target (t)
If control is |1⟩, flip target. Otherwise, do nothing.

|00⟩ → |00⟩  (control=0, no flip)
|01⟩ → |01⟩  (control=0, no flip)  
|10⟩ → |11⟩  (control=1, flip target)
|11⟩ → |10⟩  (control=1, flip target)

Creates ENTANGLEMENT from product states:
H⊗I on |00⟩ gives (|00⟩ + |10⟩)/√2
CNOT on this gives (|00⟩ + |11⟩)/√2 = Bell state!

UNIVERSAL GATE SET:
═══════════════════════════════════════
{H, T, CNOT} can approximate any quantum computation
This is quantum's analog of {NAND} being universal for classical

Entanglement: correlations that break intuition

[[Entanglement]] is perhaps the most counterintuitive quantum phenomenon, and it's essential to quantum computing's power. Two or more qubits can become correlated in ways that have no classical analog - measuring one instantly determines properties of the other, regardless of the distance between them. This isn't communication; it's correlation that was established when the qubits interacted.

Quantum Entanglement Demonstration

Qubit A (Alice)
Click to measure
50 ly
Qubit B (Bob)
Click to measure
0
Measurements
%
Correlation
100%
Expected (Bell)
Bell state |Φ+⟩ = (|00⟩ + |11⟩)/√2 - Measuring one qubit instantly determines the other, regardless of distance. This is not faster-than-light communication since random outcomes cannot carry information.
Create entangled qubit pairs and observe correlated measurements

The classic entangled state is the Bell state: |Φ+⟩ = (|00⟩ + |11⟩)/√2. Both qubits are individually in superposition - each has 50% probability of being 0 or 1. But they're perfectly correlated: if you measure the first qubit and get 0, the second will definitely be 0. If you get 1, the second will definitely be 1. This correlation holds even if the qubits are separated by light-years.

The Bell state cannot be written as a product of individual qubit states - there's no way to say 'qubit A is in state X and qubit B is in state Y' that reproduces the correlations. This non-separability is the mathematical definition of entanglement. Entangled states exist in a higher-dimensional space than products of individual states, and this extra dimensionality is a computational resource.

Quantum parallelism: computing with superposition

Here's where quantum computing gets exciting. With n classical bits, you can represent one of 2ⁿ possible states at any time. To check all states, you must iterate through them sequentially. With n qubits in superposition, you can represent ALL 2ⁿ states simultaneously. A quantum operation on these qubits processes all states in parallel - [[quantum parallelism]].

CLASSICAL vs QUANTUM: STATE REPRESENTATION

CLASSICAL 3-BIT REGISTER
═══════════════════════════════════════
At any moment, stores ONE of 8 states:
000, 001, 010, 011, 100, 101, 110, 111

To search all 8: check each sequentially → 8 steps

QUANTUM 3-QUBIT REGISTER IN SUPERPOSITION  
═══════════════════════════════════════
Can represent ALL 8 states simultaneously:

|ψ⟩ = α₀|000⟩ + α₁|001⟩ + α₂|010⟩ + α₃|011⟩ 
    + α₄|100⟩ + α₅|101⟩ + α₆|110⟩ + α₇|111⟩

Each αᵢ is a complex amplitude.
|αᵢ|² = probability of measuring state i.
Sum of all |αᵢ|² = 1.

A quantum operation transforms ALL amplitudes at once!

EXPONENTIAL SCALING:
═══════════════════════════════════════
 Qubits │ Simultaneous states │ Classical equiv.
────────┼─────────────────────┼─────────────────
    10  │ 1,024               │ 1 KB
    20  │ 1,048,576           │ 1 MB  
    30  │ 1,073,741,824       │ 1 GB
    50  │ ~10¹⁵               │ 1 Petabyte
   100  │ ~10³⁰               │ More than all hard drives on Earth
   300  │ ~10⁹⁰               │ More than atoms in observable universe

But there's a catch - and it's crucial for understanding what quantum computers can and cannot do. When you measure, the superposition collapses and you get only one answer, chosen randomly according to the amplitudes. You don't get to see all 2ⁿ computed values. The art of quantum algorithm design is constructing interference patterns so that wrong answers cancel out (their amplitudes subtract) while right answers reinforce (their amplitudes add).

Quantum algorithms: where qubits actually help

Not every problem benefits from quantum computing. The key quantum algorithms exploit specific mathematical structures that allow clever interference patterns. Here are the landmark algorithms that demonstrated quantum advantage:

Shor's algorithm: breaking RSA

Peter Shor's 1994 algorithm factors large numbers exponentially faster than any known classical algorithm. RSA encryption relies on the difficulty of factoring - a 2048-bit RSA key would take classical computers millions of years to break. Shor's algorithm could do it in hours with a sufficiently large quantum computer.

The algorithm works by reducing factoring to period-finding, then using quantum Fourier transform to find the period efficiently. Classically, finding the period of f(x) = aˣ mod N requires checking exponentially many values. Quantumly, superposition lets you compute all values at once, and interference extracts the period.

Grover's algorithm: searching faster

Lov Grover's 1996 algorithm searches unstructured databases quadratically faster. Finding a specific item among N entries classically requires checking up to N items. Grover's algorithm needs only √N quantum operations. For N = 1 million, that's 1000× fewer operations.

Grover's speedup is provably optimal for unstructured search - quantum computers can't do better than √N for this problem. This is important: quantum computers aren't magic. They provide specific, bounded speedups for specific problem structures. Grover's quadratic speedup is useful but less dramatic than Shor's exponential speedup.

Quantum simulation: computing quantum with quantum

Richard Feynman's original motivation for quantum computing: simulating quantum systems. To simulate a molecule with N electrons on a classical computer, you need to track exponentially many quantum amplitudes - intractable for all but tiny molecules. A quantum computer naturally represents these states, enabling simulations of chemical reactions, drug interactions, and novel materials.

ALGORITHM COMPLEXITY COMPARISON

PROBLEM: Factor N-digit number
═══════════════════════════════════════
Classical (best known): O(e^(N^(1/3) × (log N)^(2/3)))
                       Exponential-ish growth
Quantum (Shor's):      O(N³)
                       Polynomial growth
Speedup: EXPONENTIAL → breaks RSA

PROBLEM: Search N unsorted items
═══════════════════════════════════════
Classical:             O(N)    
                       Must check each item  
Quantum (Grover's):    O(√N)
                       Amplitude amplification
Speedup: QUADRATIC → useful but not revolutionary

PROBLEM: Simulate molecule with N electrons
═══════════════════════════════════════
Classical:             O(2^N)
                       Track all quantum states
Quantum:               O(N^k) for some constant k
                       Natural representation
Speedup: EXPONENTIAL → enables drug discovery

PROBLEM: Machine learning on N data points
═══════════════════════════════════════
Classical:             Varies by algorithm
Quantum:               Potential speedups for specific tasks
Speedup: UNCLEAR → active research area

PROBLEM: General computing (email, video, gaming)
═══════════════════════════════════════
Classical:             Well-optimized
Quantum:               No advantage expected
Speedup: NONE → classical computers win

Physical implementations: building actual qubits

Building actual qubits is extraordinarily challenging. Quantum states are incredibly fragile - any interaction with the environment causes [[decoherence]], collapsing the superposition into a classical state. Qubits must be isolated from thermal noise, electromagnetic interference, and vibrations, while still being controllable and measurable. Different technologies make different trade-offs.

TechnologyPhysical systemCoherence timeGate speedCurrent leader
SuperconductingLC circuits at 15mK~100-500 μs~20 nsIBM, Google
Trapped IonIndividual atoms in EM trap~10-60 seconds~1 μsIonQ, Honeywell/Quantinuum
PhotonicSingle photonsEffectively infinite~10 psXanadu, PsiQuantum
Neutral AtomLaser-trapped cold atoms~1 second~100 nsQuEra, Atom Computing
Spin (Si)Electron spins in silicon~10 ms~1 μsIntel, Silicon Quantum Computing
TopologicalNon-abelian anyonsTheoretically very longUnknownMicrosoft (research)

[[Superconducting qubits]], used by IBM and Google, are currently leading in qubit count. They're manufactured using semiconductor fab techniques and operate in dilution refrigerators at temperatures colder than outer space (about 15 millikelvin, or -273.135°C). Google's Sycamore processor claimed 'quantum supremacy' in 2019 with 53 qubits; their Willow chip (2024) demonstrated 105 qubits with improved error rates.

[[Trapped ion]] systems, used by IonQ and Quantinuum, have lower qubit counts but higher fidelity (fewer errors) and longer coherence times. Individual atoms are suspended in electromagnetic traps and manipulated with lasers. The main challenge is scaling up while maintaining high fidelity - ions must be shuttled around or connected via photonic links.

Quantum error correction: the path forward

Current quantum computers are 'noisy' - errors accumulate faster than useful computation proceeds. A single-qubit gate might have 99.9% fidelity, but after 1000 gates, errors dominate. [[Quantum error correction]] (QEC) encodes logical qubits across many physical qubits, enabling error detection and correction without destroying the quantum information.

The challenge is daunting: QEC has massive overhead. The surface code, a leading approach, requires roughly 1,000-10,000 physical qubits per logical qubit for practical error rates. Running Shor's algorithm to break RSA-2048 would require millions of physical qubits. We're currently at hundreds of qubits.

QUANTUM ERROR CORRECTION BASICS

THE PROBLEM:
═══════════════════════════════════════
Physical qubits suffer errors:
- Bit flips: |0⟩ → |1⟩ (like classical errors)
- Phase flips: |+⟩ → |−⟩ (unique to quantum)  
- Amplitude damping: energy loss to environment
- Measurement errors: wrong readout

Error rate per gate: ~0.1-1% currently
For useful computation: need <0.01% logical error rate

THE SOLUTION: REDUNDANCY + SYNDROME MEASUREMENT
═══════════════════════════════════════
Encode 1 logical qubit in many physical qubits
Measure error "syndromes" without measuring the data
Syndromes reveal error type and location
Apply corrections in real-time

SURFACE CODE (most practical current approach):
═══════════════════════════════════════
Layout: 2D grid of data qubits + ancilla qubits
Data qubits: store the logical information
Ancilla qubits: measure syndromes via entanglement

To achieve logical error rate 10^-15:
- With physical error rate 0.1%: need ~1000 physical/logical
- With physical error rate 1.0%: doesn't work (above threshold!)

The "threshold theorem": if physical error rate is below
a threshold (~1% for surface code), adding more qubits 
REDUCES logical error rate exponentially.

GOOGLE WILLOW (2024) MILESTONE:
═══════════════════════════════════════
Demonstrated: Increasing code distance REDUCED errors
This is the "break-even" point - first time more qubits helped
Physical qubits: 105
Logical error rate: Improved with size
Significance: Proof that QEC path is viable

Quantum vs classical: the realistic picture

Quantum computers are not 'faster computers' in the general sense - they're fundamentally different machines that excel at specific problem types. They won't replace classical computers for everyday tasks. Web browsing, video editing, word processing, and most applications will remain classical forever.

Use caseQuantum advantageRealistic timeline
Breaking RSA-2048 encryptionExponential (Shor's algorithm)15-25 years (requires fault-tolerant QC)
Drug discovery / molecular simulationExponential for quantum systems5-15 years
Optimization (logistics, finance)Unclear - possibly quadratic5-15 years, application-dependent
Machine learningSpecific subroutines onlyResearch phase
Cryptography (post-quantum)Motivates, but runs classicallyDeploying now (NIST standards)
Gaming / graphicsNoneNever
General software developmentNoneNever

The near-term practical impact is in simulation and optimization. Chemical companies are exploring quantum simulation for catalyst design. Financial institutions are investigating quantum optimization for portfolio management. These applications don't require full fault tolerance - even noisy quantum computers might provide useful approximations. But we should maintain realistic expectations about timelines and capabilities.

Quantum computing is real, it works, and it will change the world. But not everything changes, and not right away. The hype often runs ahead of the reality.

Scott Aaronson, quantum computing theorist
How Things Work - A Visual Guide to Technology