Algorithms
Quantum algorithms explained
The quantum algorithms that matter, in plain English: Shor, Grover, simulation, VQE, QAOA and HHL. What each speeds up, by how much, and when it's usable.
On this page
In 30 seconds
- A quantum algorithm is a recipe that uses superposition, entanglement and interference to make the right answer likely when you measure.
- Only a few give big, proven speedups: Shor (factoring) and quantum simulation of physics and chemistry.
- Grover's search gives a square-root speedup: useful in theory, but modest once error-correction overhead is counted.
- Near-term algorithms like VQE and QAOA run on today's noisy hardware, but haven't shown a clear practical advantage.
- Some claimed exponential speedups, especially in machine learning, were later matched by clever classical algorithms.
How a quantum algorithm works
A quantum computer doesn’t “try every answer at once” and pick the best. Measuring a superposition gives one random result, which on its own is useless.
The skill is in interference. A good algorithm arranges its steps so paths leading to wrong answers cancel out and paths to the right answer add up. That only works when a problem has hidden structure to exploit, which is why there are relatively few great quantum algorithms. Background in superposition and entanglement.
The main algorithms at a glance
| Algorithm | Solves | Speedup vs best classical | Needs error correction? | Status (2026) |
|---|---|---|---|---|
| Shor (1994) | Factoring, discrete logs | Exponential (super-polynomial) | Yes | Tiny demos only |
| Grover (1996) | Unstructured search | Quadratic (√N) | Yes, for any real use | Tiny demos only |
| Hamiltonian simulation & phase estimation | Chemistry, materials, physics | Exponential for many systems | Yes, for large molecules | Early hardware results |
| HHL (2008) | Linear equations (a summary of the answer) | Exponential, with strong caveats | Yes | Mostly theoretical |
| VQE (2014) | Molecular energies | Unproven | No (hybrid, noisy) | Many small experiments |
| QAOA (2014) | Optimization | Unproven | No (hybrid, noisy) | Many small experiments |
Shor: the algorithm that started it all
Peter Shor showed in 1994 that a quantum computer could factor large numbers in polynomial time. That breaks RSA and elliptic-curve cryptography, and it turned quantum computing from a curiosity into a national-security issue.
It works by turning factoring into period finding and using the quantum Fourier transform. Try the interactive demo in our Shor’s algorithm guide.
Grover: faster search, with fine print
Lov Grover’s 1996 algorithm finds a marked item among N possibilities in about √N steps instead of about N/2. For a million items, that’s roughly a thousand quantum steps.
A quadratic speedup is real, but quantum gates are slow and error correction adds heavy overhead. For many problems, a fast classical computer still wins in practice.
Quantum simulation: the most natural use
Richard Feynman’s original 1981 pitch was that nature is quantum, so you need a quantum computer to simulate it efficiently. Algorithms like quantum phase estimation and Hamiltonian simulation do exactly that for molecules and materials.
This is the most likely source of early practical value, in chemistry, drug discovery and batteries. Google’s 2025 Quantum Echoes experiment is a step in this direction: a verifiable algorithm that probes molecular structure.
Near-term algorithms: VQE and QAOA
Today’s machines are noisy, so researchers designed hybrid algorithms. A classical computer tweaks parameters while the quantum computer runs short circuits, and the two loop until the answer converges.
- VQE (variational quantum eigensolver) estimates the energy of molecules.
- QAOA (quantum approximate optimization algorithm) tackles optimization problems like scheduling or routing.
The dequantization lesson
In 2018, Ewin Tang found a classical algorithm that matched a famous quantum recommendation algorithm up to polynomial factors. Several other quantum machine-learning speedups have since been dequantized the same way.
The lesson: an exponential quantum speedup is only proven when no clever classical algorithm can catch up. That’s why public trackers now record quantum advantage claims alongside classical challenges. More in quantum advantage vs supremacy.
Try one yourself
You can run small versions of these algorithms for free on simulators and real hardware. Our guide on how to use a quantum computer shows the first steps.
FAQ
What is a quantum algorithm?
It's a step-by-step procedure designed for a quantum computer. It prepares qubits in superposition, applies gates that entangle them and create interference, then measures. A good quantum algorithm arranges interference so wrong answers cancel and right ones are amplified.
What are the most important quantum algorithms?
Shor's algorithm for factoring and discrete logarithms, Grover's algorithm for search, quantum phase estimation and Hamiltonian simulation for chemistry and physics, and hybrid methods like VQE and QAOA for today's noisy machines.
Do quantum algorithms speed up everything?
No. Big speedups exist only for problems with special structure, such as periodicity or quantum physics itself. For everyday tasks like web browsing, spreadsheets or most databases, classical computers stay faster and cheaper.
What is the difference between an exponential and a quadratic speedup?
An exponential speedup turns a problem that would take longer than the age of the universe into one that takes hours. A quadratic speedup turns a million steps into about a thousand. Quadratic speedups can be eaten up by the overhead of error correction and slow quantum gates.
Can I run quantum algorithms myself?
Yes. IBM's free Open Plan and simulators in Qiskit, Cirq and other toolkits let anyone run small quantum circuits. See our guide on how to use a quantum computer.
Newsletter
Quantum, minus the hype. Once a week.
The week's real quantum news in plain English, with why it matters and links to the sources. Free, no spam, unsubscribe any time.
Sources
We cite primary sources first: papers, standards bodies and the research teams themselves.
- 01Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (Shor) · arXiv / SIAM J. Computing
- 02A fast quantum mechanical algorithm for database search (Grover) · arXiv, 1996
- 03Quantum algorithm for linear systems of equations (HHL) · arXiv / Physical Review Letters, 2009
- 04A variational eigenvalue solver on a quantum processor (VQE) · arXiv / Nature Communications, 2014
- 05A Quantum Approximate Optimization Algorithm (QAOA) · arXiv, 2014
- 06A quantum-inspired classical algorithm for recommendation systems (Tang) · arXiv, 2018
- 07Quantum Echoes: verifiable quantum advantage on Willow · Google, Oct 2025
- 08Quantum advantage tracker · Community tracker
How we checked this page. Written and fact-checked by the quantum365 editorial team against the primary sources above. Company results are labelled as claims. Last reviewed December 4, 2026.
Spotted an error or an outdated fact? Read our editorial policy to see how we correct pages.
Related
Algorithms
Shor's algorithm, explained simply
Shor's algorithm explained in plain English: how a quantum computer factors numbers, why it breaks RSA, an interactive demo, and how many qubits it needs.
Read guideUse cases & impact
What quantum computers can't do
The real limitations of quantum computing: why they won't speed up your laptop, solve every hard problem, or break Bitcoin today. Myth vs reality.
Read guideState of play
Quantum advantage vs quantum supremacy
Quantum advantage and quantum supremacy explained, plus every major claim since Google's 2019 Sycamore and which ones classical computers later matched.
Read guideLearn
How to use a quantum computer
Yes, you can use a real quantum computer today. Free and paid cloud options, what it costs, and how to run your first circuit in Python step by step.
Read guideThe basics
Quantum superposition and entanglement, explained
Superposition, entanglement and interference are the three ideas behind quantum computing. Here's what each really means, and the myths to ignore.
Read guide