Skip to content

What It Can and Cannot Do

BQP: quantum in the complexity zoo

Where quantum sits between P and PSPACE

You have seen a quantum computer factor numbers and search faster. The honest next question is a complexity-theory question: exactly which problems does it make easy, and how big is that set compared to the problems we already solve on a laptop? There is a name for that set, and drawing it on the map is the whole job of this lesson.

The belief to correct first

The hype version is "a quantum computer solves hard problems," with the unspoken assumption that hard means NP-complete: scheduling, routing, protein folding, breaking every code. The believed truth is narrower and stranger. The set of problems quantum computers solve efficiently is a specific region that contains factoring but is not believed to contain the NP-complete problems at all. Quantum does not swallow NP. It carves out its own oddly-shaped territory.

Play with the map first

Below is the believed landscape of complexity classes and five familiar problems. Drag each problem into the region where researchers believe it lives. Watch where factoring lands relative to sorting and to Boolean SAT. The surprise is that factoring, the poster child of quantum speedup, sits nowhere near the NP-complete problems.

The believed landscape. P sits inside both BQP and NP; the two overlap but neither is believed to swallow the other, and all of it fits inside PSPACE. Sort the five problems into the region where each is believed to live.
PSPACEBQPNPPfactoring lives in the BQP-NP overlap; SAT lives in NP, believed outside BQP

Problems to place

P

Solvable in polynomial time on an ordinary computer.

BQP, beyond P

Efficient on a quantum computer and believed hard classically, but not NP-complete.

NP, believed beyond BQP

In NP, with no efficient quantum algorithm known or expected.

Drag each problem into the region where it is believed to live.

The classes, from the one you already know

Start from , the problems your laptop solves efficiently: sorting, shortest paths, multiplying numbers. Allowing a fair coin and a small chance of error barely widens this to , bounded-error probabilistic polynomial time. Now give the machine qubits, gates, and one measurement, and keep the same rules - polynomial size, bounded error - and you get , bounded-error quantum polynomial time. That is the class this whole subject has been circling.

BQP has the same shape as BPP, with one word changed. A problem is in BQP when a polynomial-size quantum circuit outputs the right answer with probability at least . The two-thirds is not special; run the circuit a few times and take the majority vote and the error shrinks as fast as you like, exactly as it does for a classical randomized algorithm.[2]

How the classes nest

Anything a classical machine can do, a quantum one can do too - it can just ignore the extra machinery. And a quantum circuit can be simulated, slowly, by writing down and summing amplitudes, which a classical machine can do in polynomial space. Those two facts pin BQP between P and PSPACE:

Every containment there is proven. What is not proven is whether any of them are strict - nobody has shown BQP is actually bigger than P, because that would settle P versus PSPACE along the way, an open problem for half a century.[2] The evidence we do have is a single problem believed to separate them: factoring is in BQP, via Shor's algorithm, and is not known to be in P despite centuries of effort.[3]

Where NP fits, and why it is the whole point

NP is the class of problems whose answers are easy to check, and its hardest members are the NP-complete problems: SAT, the traveling salesman, thousands more, all inter-reducible. Both NP and BQP sit inside PSPACE and both contain P, so they overlap. But the consensus conjecture is that NP-complete problems lie outside BQP:
A quantum computer is not a general solver for the hard search problems. Factoring is easy for it not because factoring is NP-complete - it is not - but because factoring has a hidden periodic structure that nothing in SAT offers. This is the honest border, and the whole of the next lesson lives on it. See the classical side in the P versus NP lesson.

This is why the earlier drag placed factoring in a lonely spot. It is in BQP and in NP, but not in P and not NP-complete: it is one of the few problems that quantum genuinely rescues from classical intractability, precisely because it is not one of the truly hard ones.[1]

# "believed" because separations here are conjectured, not proven.
believed_class = {
    "sorting":           "P",     # polynomial time, classical
    "scan a list of n":  "P",     # O(n) linear scan
    "factoring":         "BQP",   # Shor: quantum polynomial time
    "boolean SAT":       "NP-complete, believed outside BQP",
    "graph isomorphism": "NP, no known quantum speedup",
}

# Proven:    P subset of BPP subset of BQP subset of PSPACE
# Conjecture: NP-complete problems lie OUTSIDE BQP
The believed placements, as a lookup table

Lock it in

  • BQP is the formal set of problems a polynomial-size quantum circuit decides with bounded error - the precise meaning of what quantum makes easy.
  • The proven nesting is P inside BPP inside BQP inside PSPACE; whether any containment is strict is open, tangled up with P versus PSPACE.
  • Factoring is in BQP but not known to be in P, and it is not NP-complete - it is the standout evidence that BQP reaches past classical efficiency.
  • NP-complete problems are conjectured to lie outside BQP, so a quantum computer is not a general solver for hard search.

Check yourself

Where does factoring sit in the complexity map?

What is the believed relationship between NP-complete problems and BQP?

Recall: define BQP, and state its believed relationship to P and to the NP-complete problems.

The class itself, plus the two borders that matter. Try to state it, then check.

Match each class or problem to its believed description.

drop here

problems an ordinary computer solves in polynomial time

drop here

problems a quantum computer solves efficiently, with bounded error

drop here

known to sit in BQP, not known to sit in P

drop here

believed to lie outside BQP, so no quantum shortcut is expected

Primary source

Quanta Magazine, Finally, a Problem That Only Quantum Computers Will Ever Be Able to Solve

A readable tour of what separates BQP from classical classes, and why the separation is so hard to prove. Pair it with the Complexity Zoo entry for the formal definitions.

Sources

  1. 1.Kevin Hartnett, Quanta Magazine, Finally, a Problem That Only Quantum Computers Will Ever Be Able to Solve (2018)
  2. 2.Complexity Zoo, BQP
  3. 3.Scott Aaronson, Introduction to Quantum Information Science (lecture notes)