Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

NP and quantum computation

The relationship between efficiently checkable classical witnesses and the capabilities of quantum algorithms.

Also called NP versus BQP

Edition released Coverage: Overview · Technical
On this page

Definition and significance

NP contains decision problems whose yes answers have classical witnesses verifiable in polynomial time. This is not a statement that those witnesses can be found efficiently. Quantum computing changes available algorithms but does not turn the definition of verification into a guarantee of efficient search.

Mechanism and mathematical treatment

For a Boolean predicate on n candidate bits, exhaustive search has 2^n candidates. Grover amplification can reduce unstructured query search to order 2^(n/2), still exponential in n. Special problem structure can allow other algorithms, but a generic NP-complete speedup to polynomial time is not known.

Fully worked reference example

For n=100, an unstructured candidate space contains 2^100 strings. Taking its square root gives 2^50, about 1.126 quadrillion. The improvement is enormous as a ratio but still a very large coherent query count, before predicate evaluation and error correction.

Limitations and common misconceptions

Oracle lower bounds show limitations in specified black-box models. They do not prove that every structured NP problem requires exponential quantum time. Likewise, Shor factoring is not evidence that all NP-complete problems are efficiently quantum-solvable; factoring is not known to be NP-complete.

Scientific relationships

NP witnesses are classical while QMA witnesses may be quantum.

A small satisfiability instance with explicit witnesses

Consider the Boolean formula (x OR y) AND((NOT x) OR z) AND((NOT y) OR(NOT z)). Its satisfying assignments are 010 and 101 in xyz order. To verify 010, the clauses evaluate to true, true and true. To verify 101, the first clause is true through x, the second through z, and the third through NOT y. The other six assignments violate at least one clause.

A nonnegative penalty for an assignment is (1-x)(1-y)+x(1-z)+yz. Each term is one exactly when its corresponding clause is violated. Expanding gives 1-y+xy-xz+yz. Evaluating this polynomial at 010 or 101 gives zero. This is an exact optimization encoding of the tiny instance, not a procedure that finds its zero automatically.

Replacing each classical bit by (I-Z)/2 produces a diagonal quantum cost operator with the same values on computational states. Its ground states encode satisfying assignments. Preparing that ground space remains an algorithmic problem. Merely writing a cost Hamiltonian does not supply an efficient ground-state preparation method or establish a polynomial-time solver for arbitrary formulas.

Search over the witnesses and its hidden cost

There are eight candidate assignments and two satisfying ones, so a uniform search has initial success probability 1/4. One ideal Grover iteration amplifies that probability to one. The final state is the equal superposition of the two satisfying assignments if the initial amplitudes and oracle marking are symmetric. A measurement returns one valid witness, which can be checked by the three clauses.

This eight-entry example is also trivial classically. Enumerating all candidates evaluates only twenty-four clause checks before short-circuit optimizations, and logical simplification can reduce that work. Its purpose is to connect verification, penalty encoding and amplitude amplification in a fully solved instance. It does not establish that the same preparation cost remains small as the number of variables and clauses grows.

For a general n-variable predicate, a clean phase oracle evaluates the clauses reversibly, combines their results, applies the phase and uncomputes the temporary values. The clause evaluation cost is multiplied by the number of coherent search calls. If no satisfying assignment exists, a search routine needs a valid stopping and decision policy; it cannot verify a nonexistent witness after measurement.

Why the certificate definition does not solve the search

NP's verifier receives both the problem input and a candidate classical witness. It must run in time polynomial in the input length and accept an appropriate witness for yes instances. The definition does not grant the algorithm that must find the witness access to the correct witness. Exhaustive search, branch-and-bound, satisfiability propagation and quantum amplitude amplification are different ways to address that missing step.

For a uniformly unstructured candidate space of 2^n strings, square-root search has scale 2^(n/2). This is still exponential in n. A structured classical solver can outperform uniform enumeration on many instances by exploiting clause relationships, and a quantum algorithm can also exploit structure when available. A lower bound for an oracle that hides all structure does not settle the complexity of every explicit formula representation.

Approximation changes the task as well. Finding an assignment that violates few clauses can be easier or harder than a chosen decision threshold depending on the promise and approximation ratio. A heuristic returning a good-looking assignment is not a certificate of global optimality unless a separate bound or proof establishes it. Quantum sampling does not remove that distinction.

Reductions and the limits of conclusions

An NP-complete problem is one to which every NP problem reduces with polynomial overhead under the specified reduction notion, and which is itself in NP. A polynomial-time quantum algorithm for an NP-complete problem would therefore have consequences for all of NP through those reductions. No such general conclusion follows from efficient factoring or from a small satisfiability demonstration.

Factoring is a structured number-theoretic function problem and is not known to be NP-complete in the usual sense. Its efficient quantum treatment exploits periodic arithmetic. Replacing a generic constraint oracle with a modular exponentiation oracle changes the mathematical structure; the success of one does not imply that arbitrary constraints have a hidden period suitable for the same method.

For the three-variable example, the entire penalty spectrum can be computed by an eight-row truth table. That table is a complete classical certificate of the stated minimum and satisfying assignments. For a large formula, producing an analogous exhaustive table is exponential, while checking one supplied satisfying assignment remains polynomial. This contrast captures the verification-versus-search distinction without invoking an unsupported universal quantum speedup.

Sources

  • Charles H. Bennett; Ethan Bernstein; Gilles Brassard; Umesh Vazirani · · Research paper · Publication status unspecified · arXiv
    Verification scope

    Selected source text checked ·

    Oracle separations do not establish unconditional separations of unrelativized complexity classes.

  • Lov K. Grover · · Research paper · Publication status unspecified · arXiv
    Verification scope

    Recorded source check ·

    The version date comes from the arXiv submission record.

    Theoretical or mathematical source anchor; original definitions and worked instances are independent. No experimental or end-to-end performance claim inferred.