QKarma

Module 1 · Why Quantum + AI? · 25 min

Where quantum helps — and where it doesn't

You're reading a free preview lesson. Create an account and enroll to save progress, unlock every module and earn the certificate.

By the end of this lesson you will be able to

  • Distinguish exponential, polynomial (e.g. quadratic) and no speed-ups, with an example of each
  • Explain why a quadratic speed-up may not be useful in practice once hardware overheads are included
  • Explain why quantum computers are not expected to solve NP-complete problems efficiently
  • Identify the data-loading and read-out bottlenecks that limit many proposed applications

Quantum computers are sometimes described as "exponentially faster computers". They are not. For most tasks they would be slower than the classical machines you already use. What they offer is a different model of computation that is dramatically better for some problems. This lesson gives you a map, so that you can judge any claim you read.

Measuring speed-ups

We compare algorithms by how their running time grows with the input size nn — for example the number of digits in a number to be factored, or the number of items to search.

  • An exponential speed-up turns something like 2n2^n steps into something like n3n^3 steps. For large nn this is the difference between "impossible" and "routine".
  • A polynomial speed-up turns, say, NN steps into N\sqrt{N} steps (a quadratic speed-up). Useful, but much more modest.
  • No speed-up: the best quantum algorithm is no better (in scaling) than the best classical one.

The map

ProblemBest known quantumBest known classicalSpeed-upStatus
Factoring integers, discrete logarithmsShor's algorithm, polynomial timeNumber field sieve, sub-exponential timeSuper-polynomialProven algorithm; needs large fault-tolerant machines
Simulating quantum physics and chemistryPolynomial time for many systems (Lloyd 1996)Exponential in generalExponential for many systemsLeading candidate for early practical value
Unstructured search over NN itemsGrover, about N\sqrt{N} queriesNN queriesQuadratic, and provably optimalProven; practical value limited by overheads
NP-complete problems (e.g. SAT, travelling salesperson)Grover-style, still exponentialExponentialAt most quadratic, as far as we knowNo exponential speed-up expected
Adding numbers, sorting, word processing—Already fastNoneUse a classical computer

Two entries deserve a closer look.

Factoring: the famous exponential gap

The security of widely used public-key cryptography such as RSA rests on factoring large numbers being hard. The best known classical algorithm, the general number field sieve, takes time that grows faster than any polynomial in the number of digits. Shor's algorithm runs in polynomial time on a quantum computer. That is why governments are already migrating to post-quantum cryptography — even though no existing quantum computer is anywhere near large or reliable enough to break RSA-2048.

Search: a quadratic speed-up that is provably the best possible

Grover's algorithm finds a marked item among NN with about π4N\frac{\pi}{4}\sqrt{N} queries, where a classical algorithm needs about N/2N/2 on average. In 1997 Bennett, Bernstein, Brassard and Vazirani proved that no quantum algorithm can do better than order N\sqrt{N} for unstructured search. Consequently, quantum computers are not expected to solve NP-complete problems in polynomial time: brute-force search over 2n2^n candidates speeds up to about 2n/22^{n/2} — still exponential.

Knowledge check

Are quantum computers expected to solve NP-complete problems (like large travelling-salesperson instances) in polynomial time?

Choose one answer

Why "quadratic" often isn't enough

A quadratic speed-up sounds great on paper: 101210^{12} steps become 10610^6. But real quantum computers pay two big overheads:

  1. Slow operations. A classical processor performs billions of simple operations per second. An error-corrected quantum computer is expected to perform logical operations far more slowly — estimates are many orders of magnitude slower per operation.
  2. Error-correction overhead. Each reliable "logical" qubit is expected to require hundreds to thousands of physical qubits.

Babbush and colleagues (2021) estimated that with realistic assumptions, quadratic speed-ups on early fault-tolerant machines would need problem instances so large that the quantum computer would run for an impractically long time before overtaking a classical computer. Hoefler, Häner and Troyer (2023) reached a similar conclusion and recommended focusing on problems with super-quadratic speed-ups and small input/output — such as chemistry and materials simulation.

The data bottleneck

Many proposed applications — especially in machine learning — assume large classical datasets can be loaded into quantum amplitudes cheaply. In general they cannot: loading NN arbitrary numbers takes time that grows at least in proportion to NN, which can wipe out a speed-up that was supposed to make the computation sub-linear in NN. Similarly, reading out a full 2n2^n-amplitude answer would take exponentially many measurements.

Aaronson's short essay Read the fine print (2015) lists these caveats for a famous algorithm (HHL) for linear systems of equations. We will revisit them carefully when we study quantum machine learning.

Knowledge check

What is the "data-loading problem" in quantum algorithms?

Choose one answer

Where does that leave us?

  • Most promising: simulating quantum systems (chemistry, materials, condensed-matter physics), and cryptanalysis (Shor) once large fault-tolerant machines exist.
  • Plausible but unproven: certain optimisation, sampling and machine-learning tasks — an active research area with many open questions.
  • Not expected: general-purpose speed-ups for everyday computing, or efficient solutions to NP-complete problems.

Keep this map in mind. When you meet a new claim — in a paper, a press release or a pitch deck — ask: What is the speed-up? Over which classical algorithm? Proven or conjectured? Does it survive data loading, read-out and error-correction overheads?

References & further reading

  1. P. W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM J. Comput. 26, 1484 (1997)
  2. L. K. Grover, A fast quantum mechanical algorithm for database search, Proc. STOC (1996)
  3. C. H. Bennett, E. Bernstein, G. Brassard, U. Vazirani, Strengths and Weaknesses of Quantum Computing, SIAM J. Comput. 26, 1510 (1997) — Proves Grover's quadratic speed-up is optimal for unstructured search
  4. S. Lloyd, Universal Quantum Simulators, Science 273, 1073 (1996)
  5. R. Babbush et al., Focus beyond quadratic speedups for error-corrected quantum advantage, PRX Quantum 2, 010103 (2021)
  6. T. Hoefler, T. Häner, M. Troyer, Disentangling Hype from Practicality: On Realistically Achieving Quantum Advantage, Commun. ACM 66(5), 82 (2023)
  7. S. Aaronson, Read the fine print, Nature Physics 11, 291 (2015)