AI News Hub Logo

AI News Hub

Why Quantum Computers Are Faster — the Answer Isn't Parallelism

DEV Community
Mathias Leonhardt

A qubit isn't a bit with randomness — it's a rotating arrow on a sphere. A quantum gate is a rotation of that arrow. A quantum algorithm is one global transformation that reshapes the whole solution landscape. The headline everyone has read in a press release — "quantum computers try all possibilities in parallel" — is dangerously misleading. A measurement would just return one random answer anyway. So "parallel" on its own is useless. The actual trick is subtler, more beautiful, and the point of this post. This is a condensed, tutorial-style version of a longer, interactive piece on ki-mathias.de — the full version has four interactive React demos (Bloch sphere, circuit builder, measurement simulator, Qiskit playground) and a 9-minute companion video. Everything here is runnable in Qiskit 1.x. The quantum-computing repo contains the notebooks. At the hardware level, a qubit is always a two-level quantum system. There are several competing technologies in 2026 — superconducting circuits (Google, IBM), trapped ions (IonQ), neutral atoms (QuEra), photons (PsiQuantum) — but let's pick one and stay concrete: the superconducting qubit, because that's where most of today's qubits live. A superconducting qubit is essentially a quantized electrical oscillator. You take an LC circuit — a coil and a capacitor, just like in an old radio — cool it to about 10 millikelvin (colder than intergalactic space), and add a special component called a Josephson junction. This junction is two superconductors separated by a thin insulating barrier. Brian Josephson predicted in 1962 that bound electron pairs (Cooper pairs) can quantum-mechanically tunnel through this barrier — Nobel Prize 1973. The Josephson junction bends the energy ladder. Without it, you'd get a harmonic oscillator with equally spaced levels — a microwave pulse tuned to excite |0⟩→|1⟩ would also kick |1⟩→|2⟩. With it, the rungs get closer together as you go up, and you can address the lowest transition selectively. That selectivity is what turns a quantum oscillator into a usable qubit. The two lowest levels, |0⟩ and |1⟩, form the qubit. Their energy gap corresponds to a microwave frequency around 5 GHz — that's the frequency of the pulses we'll use to manipulate the qubit. Every quantum state is a superposition |ψ⟩ = α |0⟩ + β |1⟩ where α and β are complex numbers — amplitudes. The Born rule (Max Born, 1926, Nobel 1954) says the probability of measuring state |0⟩ is |α|² and |1⟩ is |β|², with |α|² + |β|² = 1. Crucially, amplitudes can be negative or complex — unlike probabilities, they can cancel each other out. That's interference, and it's the whole point. A Hadamard gate H turns |0⟩ into a perfectly balanced superposition: H |0⟩ = (1/√2) (|0⟩ + |1⟩) Here's the proof that amplitudes aren't classical probabilities: apply H twice to |0⟩. Each individual H puts you in a 50/50 superposition. A classical coin would still give 50/50 after a second flip. The qubit? Goes back to |0⟩. Deterministic. Why? Because two H matrices multiply to the identity. Physically: the amplitude for |0⟩ coming from the |0⟩-branch adds constructively with the one from the |1⟩-branch; the amplitudes for |1⟩ cancel. Exactly the kind of destructive cancellation classical probabilities can't do. Before we look at an algorithm, the mental model has to shift. Old picture: quantum computers try all possibilities in parallel. Wrong. New picture: a quantum algorithm is one global linear transformation on a 2^n-amplitude vector, carefully designed so that wrong answers destructively cancel and the right one constructively amplifies. Classical searches. Quantum shapes. This isn't just poetry. Every quantum gate, expressed as a matrix, is 2^n × 2^n — it acts on the entire state vector at once. Ten qubits → a 1024 × 1024 matrix per gate. This is not parallel trial-and-error; it's a global transformation of a high-dimensional probability field. If you've touched linear algebra before, there's an even tighter way to say this: a quantum algorithm is a chain of unitary operations whose eigenstates align with the answer we're looking for. What starts spread across all directions gets pushed onto the right axis with each iteration. Quantum computation is eigenstate amplification. The cleanest place to see this in action is Grover's algorithm (1996), which finds a marked entry in an unsorted database of size N in O(√N) steps versus O(N) classically. Let's walk through N = 8 — three qubits. Setup. Three Hadamards on three qubits create the equal superposition: eight basis states, each with amplitude 1/√8. Measurement here is just an 8-sided die. Useless. Step 1 — The oracle. A unitary circuit that recognizes the marked state (say, |101⟩) and flips its sign. After the oracle, |101⟩ has amplitude -1/√8, the other seven stay at +1/√8. Measuring still gives equal probability — the squared magnitudes are the same. But the phase information is hiding in the sign. Step 2 — Diffusion. Geometrically, this is a single operation: reflect every amplitude about the mean of all amplitudes. The mean is about 0.24 before reflection (seven positives dominate over one negative). After reflection, the marked state jumps to about +2.12 / √8 (amplified dramatically), the others drop to about 0.18 / √8 (shrunk). Visually, in bar-chart form: Start | | | | | | | | (all equal positive) After oracle| | | | | |▽| | (one flipped negative) After diff. ▁ ▁ ▁ ▁ ▁ █ ▁ ▁ (one big, others small) Round 2 . . . . . ██ . . (solution dominates ~95%) Step 3 — Repeat. One "Grover step" = oracle + diffusion. Optimal peak is around ⌊π/4 · √N⌋ iterations. For N = 8, that's 2 rounds. Then measure, and you get the marked state with > 94% probability. Classical average: N/2 = 4 oracle queries. Grover: 2. The win grows: for N = 10⁹, classical needs ~500 million queries, Grover ~25,000. Quadratic, not exponential — but enough to change everything about unsorted search. And the mechanism is exactly what we said: amplitudes being shaped, not possibilities being tried in parallel. The "Hello World" of quantum computing. Two qubits, two gates, perfect correlation. from qiskit import QuantumCircuit from qiskit_aer import AerSimulator qc = QuantumCircuit(2, 2) qc.h(0) # put q0 in superposition qc.cx(0, 1) # CNOT: flip q1 iff q0 is 1 qc.measure([0, 1], [0, 1]) sim = AerSimulator() result = sim.run(qc, shots=1024).result() counts = result.get_counts() print(counts) # {'00': ~512, '11': ~512} The Hadamard puts qubit 0 into (|0⟩ + |1⟩)/√2. The CNOT flips qubit 1 iff qubit 0 is 1. Applied to the superposition, you end up with |Φ⁺⟩ = (1/√2) (|00⟩ + |11⟩) Measuring gives you |00⟩ 50% of the time, |11⟩ 50% — and never |01⟩ or |10⟩. That's entanglement. Measure one qubit, you instantly know the other — Einstein's "spooky action at a distance," experimentally confirmed (Aspect et al., Nobel 2022). Running on real hardware is two more lines: from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 from qiskit import transpile service = QiskitRuntimeService(channel="ibm_quantum_platform") backend = service.least_busy(simulator=False, operational=True) qc_t = transpile(qc, backend) sampler = SamplerV2(mode=backend) job = sampler.run([qc_t], shots=1024) print(job.result()[0].data.meas.get_counts()) Real hardware gives you noisy results — maybe 490 / 508 / 20 "garbage". That's decoherence and gate errors. The IBM Quantum Platform has a free tier with 10 minutes of QPU time per month on 100+ qubit systems. Shor's algorithm (1994) uses the same shaping principle for a totally different problem. The key insight: factoring N reduces to finding the period of the sequence a, a², a³, ... mod N. Period-finding classically is nearly as hard as factoring itself — but quantum mechanically, you put qubits into a superposition over all x, compute aˣ mod N into a second register, and apply the Quantum Fourier Transform to the first register. The QFT converts a periodic amplitude distribution into a sharply peaked one — amplitudes that don't match the true period cancel destructively, matching ones amplify constructively. A single measurement returns, with high probability, a value from which the period can be reconstructed classically. Same move as Grover, different shaping tool. No Quantum Excel. No Quantum ChatGPT. No "10,000× AI training speedup." Quantum computers are special-purpose processors for problems whose structure interference can exploit. Training neural networks on classical data? No speedup. Current hardware (Google Willow 105 qubits, IBM Heron, IonQ Tempo) is NISQ-era — noisy, no full error correction. For Shor on 2048-bit RSA, we need a few million error-corrected qubits. Conservative estimate: 2030s. But: the post-quantum crypto migration is already happening (NIST standards ML-KEM, ML-DSA since 2024), because "harvest now, decrypt later" is a real threat. Full blog post (interactive Bloch sphere, circuit builder, measurement simulator, Qiskit playground, SVG of Grover amplitudes): ki-mathias.de/en/quantum-computing.html 9-minute companion video with Manim animations: youtu.be/iMaqNfA0Gs0 Qiskit notebooks on GitHub (Bell state, Deutsch-Jozsa, Grover search, VQE for H₂ — all runnable on IBM free tier): github.com/pmmathias/quantum-computing TL;DR Classical computation is a path. Quantum computation is a field. The speedup comes not from running many computations in parallel, but from transforming the entire probability landscape in one shot — destructively cancelling wrong answers, amplifying the right one, before the measurement collapses everything to a single value. Three concrete takeaways for any developer: |ψ⟩ = α|0⟩ + β|1⟩ — amplitudes, not probabilities. They can cancel. Every gate is a 2^n × 2^n unitary matrix acting on the whole state vector at once. Grover amplifies a marked state by reflecting amplitudes about their mean. Shor amplifies the right Fourier peak. Same principle, different shaping tools. If you've got Python and 15 minutes, fork the repo above, run 01_bell_state.ipynb, and see your first entangled pair of qubits. It's less intimidating than it sounds.