BQP versus NP and the Complexity Landscape

Suppose a quantum computer with a million error-corrected qubits existed tomorrow. Could it settle the P versus NP problem? Could it crack every NP-complete puzzle — SAT, graph coloring, the traveling salesman — in seconds? This is the single most common misconception about quantum computing. The answer, as far as anyone can prove or even plausibly conjecture, is no. Quantum computers give real, exponential speedups for a few structured problems. The most famous example is integer factoring. But the evidence strongly suggests otherwise for unstructured search problems. Quantum computers do not give exponential speedups for the notoriously unstructured search problems that define NP-completeness. This matters enormously for real systems. Public-key cryptography, from RSA to elliptic-curve signatures, rests on an assumption. It assumes certain problems are hard for classical computers. Shor's Algorithm shows that quantum computers break some of that hardness. That is why the world is racing toward post-quantum cryptography. But the security of symmetric ciphers, hash functions, and many combinatorial-optimization-based systems rests differently. It rests on a cruder kind of hardness — the hardness of unstructured search. Quantum computers attack this only quadratically via Grover's Algorithm, not exponentially. Knowing precisely where the quantum speedup boundary lies matters greatly. It separates founded cryptographic panic from unfounded cryptographic panic. The big picture is a landscape of complexity classes. The Complexity Class BQP (Bounded-Error Quantum Polynomial Time) sits alongside the classical classes P and NP. Understanding their relationship requires distinguishing between what we have proven and what we merely believe. We can prove BQP contains P. We can prove BQP is contained in a class called PP. More tightly, it sits in a class believed to lie inside the polynomial hierarchy. We cannot prove BQP does not contain NP. That would resolve P vs NP-adjacent questions we don't know how to resolve. But every piece of structural evidence points the same direction. NP-complete problems appear intractable even for quantum computers. This article builds the complexity landscape precisely. It covers what BQP contains and is contained in. It explains why Grover's algorithm is provably optimal for black-box search. This optimality is strong evidence against a quantum P=NP. It also covers the oracle separations that formalize this evidence, and the honest open questions that remain. The goal is not to hand-wave "quantum computers are not magic." It is to show exactly which mathematical facts justify that slogan.

Key takeaways
  • BQP (efficient quantum computation) provably contains P and is provably contained in PP; its relationship to NP is unproven but strongly conjectured to be incomparable.
  • Grover's algorithm gives only a quadratic speedup for unstructured search, and the BBBV theorem proves this quadratic bound is optimal for any quantum algorithm treating the problem as a black box.
  • Quantum speedups exploit algebraic structure (periodicity, hidden subgroups) — exactly the structure NP-complete problems are designed to lack.
  • Oracle separations show there exist black-box worlds where BQP does not contain NP, meaning no purely generic quantum technique can solve NP-hard search efficiently.
  • If BQP ⊇ NP were proven, it would not immediately prove P = NP, but it would be an earthquake collapsing much of complexity theory's structural assumptions.
  • The safe, evidence-based takeaway: quantum computers threaten specific structured cryptographic assumptions (factoring, discrete log) but not generic NP-hardness (most symmetric crypto, most combinatorial optimization).
The core insight

Quantum computers speed up problems with exploitable algebraic structure, not problems whose hardness comes from unstructured combinatorial search — which is exactly what makes NP-completeness likely to survive quantum computing.

The idea

BQP (Bounded-error Quantum Polynomial time) is the class of decision problems solvable by a polynomial-size quantum circuit family that outputs the correct answer with probability at least 2/3 on every input. NP (Nondeterministic Polynomial time) is the class of decision problems where a "yes" answer has a polynomial-length certificate verifiable in polynomial time by a classical machine. These are fundamentally different kinds of definitions: BQP is defined by a computational resource (a bounded-error algorithm that must actually find the answer), while NP is defined by a verification property (a certificate that need not be found efficiently, only checked efficiently). This asymmetry is the crux of why comparing them is subtle. The known containments form a chain that is provable, not conjectural:

P⊆BPP⊆BQP⊆PP⊆PSPACE.P \subseteq BPP \subseteq BQP \subseteq PP \subseteq PSPACE.

P⊆BQPP \subseteq BQP holds because a quantum computer can simulate any classical deterministic circuit reversibly with only polynomial overhead. BQP⊆PPBQP \subseteq PP (and more tightly BQP⊆AWPP⊆PPBQP \subseteq AWPP \subseteq PP) holds because the acceptance probability of a quantum circuit is a sum of exponentially many complex amplitudes, and such sums can be estimated by a machine with PP's counting power. Meanwhile NP's relationship to BQP has no proven containment either direction. We cannot prove NP⊆BQPNP \subseteq BQP (that would be a monumental algorithmic breakthrough), and we cannot prove NP⊈BQPNP \not\subseteq BQP (that would resolve open questions harder than P vs NP). What we have instead is structural evidence — oracle separations and optimality proofs for the best known quantum search techniques — that together make the "incomparable, with NP-complete problems remaining quantum-intractable" picture the consensus conjecture. The deepest reason for this conjecture is about the source of hardness. Quantum algorithms with proven exponential speedups — Shor's factoring algorithm, algorithms for the Hidden Subgroup Problem, quantum algorithms for Pell's equation and unit group computation — all attack problems with rich algebraic structure: periodicity, group symmetry, an abelian Fourier transform that concentrates amplitude sharply on the answer. NP-complete problems like 3-SAT are constructed, almost by design, to lack such global structure; their hardness comes from a combinatorial explosion of essentially unrelated local constraints. Quantum computers have one dominant tool for structureless search — Grover's algorithm — and it is provably limited to a quadratic, not exponential, speedup.

How it works

The two central technical facts that justify the "quantum computers probably don't solve NP" thesis are (1) Grover's algorithm gives the best possible generic quantum search and (2) this optimality can be turned into an actual oracle separation between BQP and NP.

Grover's algorithm solves unstructured search: given a black-box function f:{0,1}n→{0,1}f : \{0,1\}^n \to \{0,1\} with a unique (or promised) marked input x0x_0 with f(x0)=1f(x_0)=1, find x0x_0. Classically this requires Θ(N)\Theta(N) queries where N=2nN = 2^n. Grover's algorithm finds x0x_0 using only O(N)O(\sqrt{N}) queries to a quantum oracle. ``` GROVER-SEARCH(oracle O_f over n qubits, N = 2^n) // Assume exactly one marked item x0 with f(x0) = 1 initialize n-qubit register to |0...0> apply H^{⊗n} // uniform superposition over all N states r ← round( (π/4) sqrt(N) ) // optimal number of Grover iterations for i = 1 to r: apply O_f // phase oracle: |x> -> (-1)^{f(x)} |x> apply DIFFUSION operator: apply H^{⊗n} apply conditional phase flip on |0...0> (flip sign of all but |0>) apply H^{⊗n} measure register in computational basis return measured value as candidate for x0 ``` The mechanism: think of the n*-qubit state as a 2-dimensional vector in the plane spanned by ∣x0⟩|x_0\rangle (the marked state) and the uniform superposition over unmarked states. Each Grover iteration is a rotation by a fixed angle θ\theta where sin⁡θ=1/N\sin\theta = 1/\sqrt{N} toward ∣x0⟩|x_0\rangle. Starting near the unmarked axis, after r≈π4Nr \approx \frac{\pi}{4}\sqrt{N} iterations the state vector has rotated to be very close to ∣x0⟩|x_0\rangle, so measurement returns the marked item with probability close to 1. If there are kk marked items among NN, the same geometric argument gives r≈π4N/kr \approx \frac{\pi}{4}\sqrt{N/k} iterations, still a quadratic improvement over the classical Θ(N/k)\Theta(N/k).

Why this does not break NP. A brute-force classical algorithm for an NP-complete problem with nn variables (say 3-SAT) searches N=2nN = 2^n possible assignments, checking each with the poly-time verifier as the oracle ff. Grover's algorithm turns this O(2n)O(2^n) classical search into O(2n/2)O(2^{n/2}) quantum queries. This is a genuine, real speedup — square-rooting the exponent — but 2n/22^{n/2} is still exponential in nn. It converts, say, breaking a 128-bit unstructured combinatorial lock from 21282^{128} operations to 2642^{64} operations: dramatically less secure, but still catastrophically infeasible, and crucially it is not a polynomial-time algorithm. It does not put 3-SAT into BQP.

The BBBV optimality theorem (Bennett, Bernstein, Brassard, Vazirani, 1997) proves this is not merely the best known quantum algorithm — it is the best possible one for black-box search. Any quantum algorithm that finds a marked item among NN using TT queries to the oracle must satisfy T=Ω(N)T = \Omega(\sqrt{N}). The proof works via a hybrid argument: consider running the algorithm with the all-zero oracle (no marked item) versus with oracle ff marking some specific x0x_0. Each query can only change the "total disturbance" the algorithm's state accumulates by a bounded amount, formalized via a sum-of-squared-amplitude quantity. After TT queries the total possible disturbance is O(T2)O(T^2), so distinguishing "some item marked" from "no item marked" with constant probability forces T2=Ω(N)T^2 = \Omega(N), i.e. T=Ω(N)T = \Omega(\sqrt{N}). This matters because if the only quantum tool for solving an NP-complete problem, when treated as pure black-box search, is Grover-type search, and Grover-type search is provably not exponential, then any exponential quantum speedup for NP-complete problems would have to come from a fundamentally different technique that exploits structure specific to that problem — not from quantum search per se. No such technique is known for any NP-complete problem after decades of effort.

Oracle separations upgrade this optimality result into an actual formal separation between complexity classes. One constructs a random oracle (a black-box function with certain marked strings) relative to which an NP-type search problem requires exponentially many classical queries, and by the BBBV bound also requires exponentially many quantum queries, while the verification problem trivially remains in NP relative to that oracle. This produces an oracle OO such that

NPO⊈BQPO.NP^O \not\subseteq BQP^O.

An oracle separation is not a proof about the real (oracle-free) world — it does not resolve NP⊆BQPNP \subseteq BQP absolutely — but it proves that no proof technique which treats the SAT-solving subroutine as a generic black box can ever show NP⊆BQPNP \subseteq BQP. Since essentially every efficient algorithmic technique known (including all quantum algorithms) relativizes — works the same way regardless of what oracle is plugged in — this is strong evidence that a real proof of NP⊆BQPNP \subseteq BQP, if it existed, would require an utterly novel, non-relativizing technique, of a kind never yet discovered in the history of complexity theory.

Figure
The complexity landscape: known containments (solid) and the open, conjectured relationship of NP to BQP (dashed)
PSPACE PP BQP BPP P NP (SAT, 3-COL, TSP…) overlap = P (verified in NP, solved in poly time by both) ? solid border = proven containment dashed border = conjectured, unproven boundary

Complexity & correctness

BQP ⊆\subseteq PP (justification). The acceptance probability of a BQP circuit CC on input xx is

Pr⁡[accept]=∣∑zαz∣2\Pr[\text{accept}] = \left| \sum_{z} \alpha_z \right|^2

for amplitudes αz\alpha_z each specified by a product of polynomially many gate matrix entries, hence each expressible (after suitable discretization) as a ratio of integers computable in polynomial time. Since PP machines can compute the sign of an exponential sum of polynomial-time-computable integers (that is essentially PP's defining power — deciding whether a #P-style count exceeds half of all branches), and the BQP acceptance threshold reduces to exactly such a majority-sign question over exponentially many computational-basis paths, BQP⊆PPBQP \subseteq PP. (The tighter known bound is BQP⊆AWPP⊆PPBQP \subseteq AWPP \subseteq PP; PP suffices for the qualitative point that BQP is "low" in the polynomial hierarchy's counting classes, far below classes believed to capture NP-hardness in full generality.)

Grover correctness sketch. Represent the working state after kk iterations as

∣ψk⟩=cos⁡θk∣x0⟩+sin⁡θk∣unmarked⟩,|\psi_k\rangle = \cos\theta_k |x_0\rangle + \sin\theta_k |\text{unmarked}\rangle,

where "unmarked" denotes the normalized uniform superposition over the N−1N-1 non-marked basis states. One shows algebraically that one Grover iteration (oracle phase flip composed with the diffusion reflection) is exactly a rotation θk+1=θk+θ\theta_{k+1} = \theta_k + \theta for fixed θ\theta with sin⁡θ=1/N\sin\theta = 1/\sqrt N, independent of kk. Starting at θ0\theta_0 with sin⁡θ0=1/N\sin\theta_0 = 1/\sqrt N (the initial uniform superposition already has amplitude 1/N1/\sqrt N on ∣x0⟩|x_0\rangle), after rr iterations θr=(2r+1)θ0\theta_r = (2r+1)\theta_0. Choosing r=⌊π4N⌋r = \lfloor \frac{\pi}{4}\sqrt N \rfloor makes θr\theta_r close to π/2\pi/2, so cos⁡θr≈0\cos\theta_r \approx 0 and sin⁡θr≈1\sin\theta_r \approx 1 — wait, careful: we want the amplitude on ∣x0⟩|x_0\rangle to be near 1, which is cos⁡θr\cos\theta_r if we set up the rotation so θ\theta increases toward π/2\pi/2 landing the state near ∣x0⟩|x_0\rangle; the standard derivation gives measurement success probability sin⁡2((2r+1)θ0)≥1−1/N\sin^2((2r+1)\theta_0) \geq 1 - 1/N at the optimal rr. Either convention, the key quantitative fact — success probability Ω(1)\Omega(1) after Θ(N)\Theta(\sqrt N) iterations, each costing one oracle call and O(n)O(n) gates — is what gives the O(N)O(\sqrt N) query complexity and O(N⋅n)O(\sqrt N \cdot n) total gate complexity.

BBBV lower bound (why N\sqrt N is tight). The proof bounds, over TT oracle queries, the total "amplitude mass" the algorithm's state can accumulate on any single potential marked item, showing the sum over all NN possible locations of squared amplitude differences (between running on the empty oracle and running on an oracle marking that location) is O(T2)O(T^2). Since correctly identifying the true marked item forces this quantity to be Ω(1)\Omega(1) for at least the correct location on average, we need T2=Ω(N/N)T^2 = \Omega(N/N) summed appropriately to give T=Ω(N)T = \Omega(\sqrt N) for the worst case over all NN placements. The clean upshot: no quantum algorithm, regardless of cleverness, can solve black-box search faster than Θ(N)\Theta(\sqrt N) queries. This is an unconditional theorem, not a conjecture — it holds in the query/oracle model absolutely.

Correctness argument for the "NP is probably safe" conclusion. Chain the facts: (1) brute-force is the only generic algorithmic strategy applicable to every NP-complete problem uniformly, since NP-completeness is precisely the statement that these problems share no exploitable common structure beyond satisfying a poly-time verifier; (2) Grover's algorithm is the optimal generic quantum search strategy, proven via BBBV; (3) therefore any generic (structure-blind) quantum attack on NP-complete problems achieves at best a quadratic speedup, from O(2n)O(2^n) to O(2n/2)O(2^{n/2}) — exponential time either way; (4) the oracle-separation results formalize that no relativizing proof technique (which includes essentially every quantum algorithmic paradigm devised so far — amplitude amplification, phase estimation, HSP-style Fourier sampling) can show NP⊆BQPNP \subseteq BQP; (5) hence, absent an unprecedented, non-black-box, problem-specific structural insight into NP-completeness itself (which would likely also have implications for classical P vs NP), the consensus is that NP-complete problems remain intractable for BQP.

Honest tradeoffs and caveats. This argument is evidence, not proof. It is logically possible that NP⊆BQPNP \subseteq BQP via some entirely non-relativizing technique — after all, some celebrated classical results (like IP = PSPACE) are also non-relativizing, so the technique landscape is not permanently closed. It's also worth being precise that a proof of NP⊆BQPNP \subseteq BQP would not directly prove P=NPP = NP, since BQP ⊈\not\subseteq P is itself unproven (BQP could genuinely be a strictly larger class than P), so the two questions are logically distinct even though intuitively linked. Finally, quadratic Grover speedups are not nothing: for concrete symmetric cryptography, a quadratic quantum speedup against an nn-bit key is treated as requiring a doubling of key length (e.g., migrating from AES-128 to AES-256) precisely because 2n/22^{n/2} crosses feasibility thresholds that 2n2^n did not.

Worked example

Trace Grover's algorithm concretely for n=4n=4 (so N=16N = 16 possible 4-bit strings) with a single marked item, say x0=1011x_0 = 1011, representing (in miniature) an unstructured NP-style search: imagine each 4-bit string is a candidate satisfying assignment to some tiny constraint-satisfaction instance, and the oracle is the poly-time verifier that checks the constraints.

StepQuantityValue
Problem sizeN=24N = 2^416
Classical worst-case queriesΘ(N)\Theta(N)up to 16
Optimal Grover iterationsr=⌊π416⌋r = \lfloor \frac{\pi}{4}\sqrt{16}\rfloor⌊3.14⌋=3\lfloor 3.14\rfloor = 3
Initial amplitude on x0x_01/161/\sqrt{16}0.250.25
Rotation angle per iterationθ\theta, sin⁡θ=0.25\sin\theta = 0.25θ≈14.48°\theta \approx 14.48°
Amplitude angle after r=3r=3(2⋅3+1)θ=7θ(2\cdot3+1)\theta = 7\theta≈101.4°\approx 101.4°
Success probabilitysin⁡2(101.4°)\sin^2(101.4°)≈0.961\approx 0.961
Quantum queries usedrr3
Classical queries needed for same confidenceΘ(N)\Theta(N)up to 16, avg 8

Walking through the mechanism: after Hadamards, all 16 basis states have amplitude 0.250.25. Iteration 1 flips the phase of ∣1011⟩|1011\rangle specifically (oracle call), then the diffusion operator reflects every amplitude about the average — this simultaneously shrinks the unmarked amplitudes slightly and boosts ∣1011⟩|1011\rangle's amplitude toward 0.25→0.25 \to roughly 0.420.42 after the reflection arithmetic. Repeating, after 3 iterations the amplitude on ∣1011⟩|1011\rangle reaches ≈0.961≈0.98\approx \sqrt{0.961} \approx 0.98, so measuring returns 10111011 with about 96% probability — three oracle calls versus a classical worst case of sixteen (or an average of eight for randomized guessing). Now scale this up to a realistic NP-complete instance size, n=100n = 100 variables (say, a 3-SAT instance with 100 boolean variables, N=2100≈1.27×1030N = 2^{100} \approx 1.27\times10^{30} candidate assignments). Grover needs roughly π42100≈π4⋅250≈8.86×1014\frac{\pi}{4}\sqrt{2^{100}} \approx \frac{\pi}{4}\cdot 2^{50} \approx 8.86\times10^{14} oracle queries. Classical brute force needs on the order of 2100≈1.27×10302^{100} \approx 1.27\times10^{30} checks. The speedup factor is real and enormous — roughly 250≈1.13×10152^{50} \approx 1.13\times10^{15}-fold fewer queries — yet 8.86×10148.86\times10^{14} oracle calls, even at a wildly optimistic billion queries per second, is about 28,000 years. This single number is the entire empirical content of "Grover helps but doesn't break NP": quadratic speedup shifts the crossover point of feasibility but does not convert exponential into polynomial.

Figure
Grover's rotation in the 2-D plane spanned by the marked state and the uniform "rest" superposition, for N=16
|unmarked⟩ |x₀⟩ θ₀ (start) after 1 iter after 2 iter after 3 iter → |x₀⟩ Each iteration rotates the state vector by fixed angle θ toward |x₀⟩

Common pitfalls & traps

PitfallWhy it's wrong
"Grover's algorithm solves NP-complete problems in polynomial time"Grover gives O(N)=O(2n/2)O(\sqrt N)=O(2^{n/2}), which is exponential in nn; only the exponent's constant improves, not its growth class
"Shor's algorithm proves quantum computers solve NP-complete problems"Factoring is in NP ∩\cap co-NP and is widely believed not to be NP-complete; Shor exploits abelian group structure absent in generic NP problems
"BQP ⊆\subseteq P would follow if we just derandomize"BQP's relationship to P is open; there's no known derandomization technique for quantum amplitude interference
"An oracle separation proves NP⊈BQPNP \not\subseteq BQP absolutely"Oracle results only show no relativizing proof technique can establish containment; they don't resolve the unrelativized question
"If NP⊆BQPNP \subseteq BQP were shown, that would prove P=NPP=NP"These are logically distinct statements since BQP⊆PBQP \subseteq P is not known either; conflating them is a common category error
"Quantum computers explore all 2n2^n branches simultaneously so they must find the answer instantly"Interference must constructively concentrate amplitude on the answer and be efficiently reversible into a measurement; generic branches don't self-organize this way without exploitable structure

Pioneers & history

Origins · 1 minLov K. Grover and how this was discovered
LK
Lov K. Grover
born 1961 · Bell Labs researcher who discovered the quadratic quantum search speedup in 1996, reshaping expectations about quantum algorithms for combinatorial problems

Lov Grover's 1996 algorithm was, alongside Shor's 1994 factoring algorithm, one of the two foundational results establishing that quantum computers offer genuine, provable algorithmic advantages. Where Shor's algorithm suggested quantum computers might be extraordinarily powerful for structured problems, Grover's algorithm — and its subsequent proof of optimality by Bennett, Bernstein, Brassard, and Vazirani — did the opposite service for complexity theory: it drew a sharp, provable boundary showing exactly how little quantum computers help with the unstructured search underlying NP-completeness, cooling early speculation that quantum computers might simply dissolve the P vs NP question.

Origins · 1 minhow this was discovered
History
1971
— Stephen Cook and (independently) Leonid Levin formalize NP-completeness, giving SAT as the canonical hard search/verification problem.
1993
— Ethan Bernstein and Umesh Vazirani define BQP and prove foundational relativized separations from classical classes.
1994
— Peter Shor publishes the factoring algorithm, the first dramatic evidence of quantum exponential speedup for a structured problem.
1996
— Lov Grover publishes the quantum search algorithm giving a quadratic speedup for unstructured search.
1997
— Bennett, Bernstein, Brassard, and Vazirani prove Grover's algorithm is optimal, and construct oracle relative to which NP is not contained in BQP.
2002
to present — Refinements place BQP inside PP/AWPP; the P vs NP vs BQP landscape remains formally open, with growing consensus around the incomparability conjecture.

Where this matters

Understanding the BQP/NP boundary directly shapes cryptographic migration policy. NIST's post-quantum cryptography standardization targets algorithms broken by Shor-type structured attacks (RSA, Diffie–Hellman, elliptic-curve cryptography) while treating symmetric-key primitives (AES, SHA-family hash functions) as needing only key-length doubling to compensate for Grover-type quadratic attacks — a direct engineering consequence of the complexity-theoretic distinction drawn in this article. Optimization industries — logistics routing, chip placement, drug-molecule conformation search — routinely encounter NP-hard subproblems, and the honest expectation (backed by this theory) is that quantum computers will offer modest polynomial or quadratic constant-factor improvements via techniques like QAOA-style heuristics or amplitude amplification, not exponential collapse of these problems. Complexity theorists use the BQP-vs-NP question as a central organizing test case when studying which proof techniques relativize, informing broader research into the limits of black-box reasoning across all of complexity theory, including attempts to resolve P vs NP itself.

Ask the tutor: If quantum computers can't solve NP-complete problems efficiently, why do people still research quantum algorithms for optimization problems like MAX-CUT or TSP?

Does Grover's algorithm mean quantum computers can break all cryptography?

No. Grover's algorithm gives a quadratic speedup against unstructured search, which affects symmetric-key cryptography (like AES) by effectively halving the security bit-length — serious, but survivable by doubling key sizes. It does not break cryptography that relies on unstructured hardness assumptions with adequate margins. What quantum computers actually devastate is structured cryptography like RSA and elliptic-curve systems, via Shor's algorithm, which exploits number-theoretic periodicity entirely unrelated to Grover's generic search technique. These are two very different quantum threats with two very different mitigation strategies.

If BQP is not known to contain NP, could future quantum algorithms still surprise us?

It's logically possible, but the odds are considered very low by the research community. The oracle-separation results show that any proof of NP ⊆ BQP would need a fundamentally new, non-relativizing technique — the kind of technique that has been discovered only a handful of times in the history of complexity theory (like the IP = PSPACE proof). Decades of research into quantum algorithms have found no problem-specific structural entry point into general NP-complete problems, despite enormous effort and financial incentive to find one, which is strong (though not conclusive) empirical evidence against a surprise.

Why is BQP contained in PP rather than in NP directly?

BQP's defining feature is a probability of acceptance computed from a sum over exponentially many quantum amplitudes, which is fundamentally a counting quantity, not a certificate-verification quantity. PP (Probabilistic Polynomial time) captures exactly the power to decide whether such an exponential sum crosses a majority threshold. NP, by contrast, only captures the existence of a short certificate; there's no known way to compress a quantum amplitude sum into a short poly-time-checkable certificate for the general case, which is exactly why BQP naturally nests inside a counting class rather than a certificate class.

Is factoring NP-complete, and does that matter for this discussion?

Factoring is in NP (a factor is an easily checkable certificate) and also in co-NP, and it is strongly believed not to be NP-complete — no polynomial-time reduction from 3-SAT to factoring is known, and factoring lies in a structurally special corner of NP related to number theory. This matters immensely: Shor's algorithm's success on factoring is not evidence that quantum computers handle "hard problems" in general, since factoring's hardness (if real) is qualitatively different and much narrower than the combinatorial hardness underlying NP-completeness.

What would it mean, technically, if someone proved NP is contained in BQP?

It would mean every NP problem, including all NP-complete ones, admits a bounded-error polynomial-time quantum algorithm. This would not immediately prove P = NP, since we don't know whether BQP itself equals P (BQP could be strictly larger). It would, however, be considered one of the most shocking results in the history of theoretical computer science, invalidating the oracle-separation intuitions researchers have built confidence around for decades, and would almost certainly reshape cryptography, since symmetric ciphers rely on the presumed hardness of certain problems believed to be NP-hard-adjacent.

How does the P vs NP question relate to the P vs BQP question?

They are separate open problems studying different resources. P vs NP asks whether verification power (certificates) equals search power (finding solutions) classically. P vs BQP asks whether quantum interference-based computation exceeds classical deterministic computation. It is consistent with current knowledge that P ≠ NP is true, P ≠ BQP is true, and NP and BQP are simply incomparable classes that each strictly contain P but neither contains the other — this is, in fact, the configuration most complexity theorists currently believe is correct.

Are there any NP problems where quantum algorithms are known to help substantially?

Yes, for structured special cases. Certain lattice problems, group-theoretic problems related to the hidden subgroup problem, and some approximate optimization instances tackled by heuristic methods like QAOA can see meaningful — though generally not proven exponential — quantum speedups. The key distinction is that these gains come from exploiting particular algebraic or combinatorial structure present in the specific subproblem, not from any generic technique applicable to worst-case, fully unstructured NP-complete instances, which is exactly the class of problems Grover-optimality results constrain.

Before this