Why Quantum Algorithms Win
Here is the promise that launched the field. Some problems get exponentially harder as they grow: double the input size, and the work does not double — it explodes. A classical computer facing such a problem is like someone trying to empty the ocean with a teaspoon. Quantum algorithms can, for certain problems, turn that explosion into a gentle slope.
Picture the classic plot every quantum course draws. The horizontal axis is the problem size n — say, the number of digits in a number you want to factor — running from 0 to 60. The vertical axis is computational steps, up to about 1,200,000. Now draw three curves. The n² curve and the n³ curve hug the floor: even at n = 60, they need only a few thousand steps. But the 2ⁿ curve is a different animal — flat at first, then it rockets upward and smashes through the top of the chart. That rocket is what classical algorithms face on hard problems. Quantum algorithms aim to drag that rocket back down to the floor.
The flagship example is factoring — splitting a large number into its prime factors. Every classical method we know scales brutally with the number of digits, and that hardness is literally what protects modern encryption: your bank transactions are safe because factoring a 600-digit number would take classical machines longer than the age of the universe. Shor's algorithm (1994) factors the same number in a number of steps that grows only polynomially — efficiently, not explosively. Same problem, different universe of effort.
So the merit of a quantum algorithm is measured in how the work scales, not in raw speed. A quantum computer is not a faster clock — it is a machine that can turn some classically intractable problems into tractable ones. That "some" matters enormously, and the next section is honest about it.
Common myth: “Shor's algorithm factors in O(log n) steps — basically instant.” No. Shor's runs in polynomial time (roughly cubic in the number of digits), which is efficient but very far from logarithmic. Beware any chart or slogan that makes it sound instant — the honest claim is polynomial vs. super-polynomial, and that is already revolutionary.
Go deeper — the math & the rigor
Complexity theory gives this a precise language. P is the class of problems a classical computer can solve in polynomial time — time growing like \(n^2\), \(n^3\), or any fixed power of the input size \(n\). BQP ("bounded-error quantum polynomial time") is the quantum analogue: problems a quantum computer can solve in polynomial time with error probability at most \(\tfrac{1}{3}\). Every problem in P is also in BQP — a quantum computer can do anything a classical one can, efficiently — and it is strongly believed (though not proven) that BQP is strictly larger: it contains problems like integer factoring and discrete logarithms that sit outside P as far as anyone can tell.
Shor's algorithm वह exhibit है जिसने BQP को मशहूर किया। classically, सबसे अच्छा known factoring method — general number field sieve — sub-exponential time में चलता है: साफ \(2^n\) नहीं, लेकिन फिर भी super-polynomial, और बड़े inputs के लिए practical होने की सीमा से कहीं ज़्यादा तेज़ी से बढ़ता हुआ। Shor's algorithm, जो quantum Fourier transform और period-finding पर बना है, n-digit number को n में polynomial time में factor करता है (standard multiplication के साथ लगभग \(O(n^3)\)। polynomial बनाम super-polynomial ही ईमानदार framing है — "exponential speedup" एक slogan है, और यह justified है, क्योंकि classical scaling exponential जैसी ही है, भले ही वह literally \(2^n\) न हो।
The caveat that keeps the field honest: exponential speedup is problem-specific, not universal. Most problems in P get no meaningful quantum advantage, and most problems outside BQP stay hard even for quantum computers. The art of the field is finding the structured problems — periodicity, hidden subgroups, unstructured search (Grover's quadratic speedup), quantum simulation — where interference and entanglement buy something classical machines cannot. A quantum computer is a specialist instrument, not a universal accelerator.
Key takeaways
- A quantum algorithm's merit is measured by how its work scales with problem size — polynomial vs. super-polynomial — not by clock speed.
- On the classic steps-vs-size plot, the 2ⁿ curve explodes off the chart while n² and n³ hug the floor; quantum algorithms aim to pull hard problems back down to the floor.
- Factoring is the flagship: classically super-polynomial (best known: the general number field sieve), quantumly polynomial via Shor's algorithm (1994).
- Shor's runs in polynomial time — roughly cubic in the digits — NOT O(log n); the honest claim is polynomial vs. super-polynomial.
- Exponential speedup is problem-specific: P ⊆ BQP is believed strict but unproven, and most everyday problems gain nothing from quantum computers.
Check your understanding
Q1.On the classic plot of computational steps (y-axis) vs. problem size n (x-axis, 0–60), what does the 2ⁿ curve look like compared to the n² and n³ curves?
Exponential scaling explodes with n; polynomial curves (n², n³) grow gently. The whole point of quantum algorithms is to move hard problems from the rocket curve down to the floor.
Q2.Which statement about Shor's factoring algorithm is ACCURATE?
Shor's is polynomial vs. the classical general number field sieve's sub-exponential scaling. O(log n) is a myth; P vs. BQP strictness remains unproven.
Q3.A startup claims its quantum computer will 'exponentially speed up all computing tasks.' What is wrong with this claim?
Quantum advantage applies to structured problems (periodicity, search, simulation); it is not a universal accelerator.
References
The books, papers, and articles this lesson drew on — with a note on what each one was used for.
- Shor, P., "Algorithms for quantum computation: discrete logarithms and factoring" (Proc. 35th FOCS, 1994). · source ↗
Used for: Shor's polynomial-time factoring result and its basis in quantum period-finding. - Nielsen & Chuang, Quantum Computation and Quantum Information, Ch. 3 (complexity classes P and BQP).
Used for: P vs. BQP framing and the problem-specific nature of quantum speedup.
Tip: press ← / → to turn pages.