KnowledgeCookies logo Understanding the language of quantum science
QPicDepict / Quantum computing

Classical and quantum complexity

Complexity classes group decision problems by the resources and guarantees needed to solve them.

Classical and quantum complexity infographic. A reading guide and explanation follow.
Read the class definitions and established containments before interpreting the illustrative Venn diagram. Artwork from the supplied QPicDepict collection. Open full-size image Download PNG

How it works

  1. Specify

    Use decision problems and an input length. P and BQP bound time, whereas PSPACE bounds memory.

  2. Compare

    BQP includes BPP since a quantum computer can simulate classical randomized computation. NP is defined using short certificates for yes instances.

  3. Qualify

    The general relationship between NP and BQP is unknown. Factoring has a quantum polynomial-time algorithm, while known NP-complete problems have no general BQP algorithm.

Equation and quantities

P⊆BPP⊆BQP⊆PSPACE\mathsf{P}\subseteq\mathsf{BPP}\subseteq\mathsf{BQP}\subseteq\mathsf{PSPACE}

Worked example

The task “does this integer have a prime factor at most k?” is a decision version of factoring. Contrast it with the search task “output the prime factors.”

Why it matters

The classes put claims about speedups, simulation and cryptographic assumptions on a precise footing.

Limits and assumptions

Treat the relative regions in the artwork as schematic. Overlap drawings cannot establish strict containments or separations. Discrete logarithm also has a quantum polynomial-time algorithm in the standard setting, even if a table appears to suggest otherwise.

Does Shor’s factoring algorithm show that NP ⊆ BQP?

No. Factoring is not known to be NP-complete, and the general inclusion remains open.

Related reading