# Computational complexity

The class of problems that can be efficiently solved by quantum computers is called **BQP**, for "bounded error, quantum, polynomial time". Quantum computers only run randomized algorithms, so **BQP** on quantum computers is the counterpart of **BPP** on classical computers. It is defined as the set of problems solvable with a polynomial-time algorithm, whose probability of error is bounded away from one half. A quantum computer is said to "solve" a problem if, for every instance, its answer will be right with high probability. If that solution runs in polynomial time, then that problem is in **BQP**.

**BQP** is suspected to be disjoint from NP-complete and a strict superset of **P**, but that is not known. Both integer factorization and discrete log are in **BQP**. Both of these problems are **NP** problems suspected to be outside **BPP**, and hence outside **P**. Both are suspected to not be NP-complete. There is a common misconception that quantum computers can solve NP-complete problems in polynomial time. That is not known to be true, and is generally suspected to be false.

An operator for a quantum computer can be thought of as changing a vector by multiplying it with a particular matrix. Multiplication by a matrix is a linear operation. It has been shown that if a quantum computer could be designed with *nonlinear* operators, then it could solve NP-complete problems in polynomial time. It could even do so for #P-complete problems. It is not yet known whether such a machine is possible.

Although quantum computers are sometimes faster than classical computers, ones of the types described above can't solve any problems that classical computers can't solve, given enough time and memory (albeit possibly an amount that could never practically be brought to bear). A Turing machine can simulate these quantum computers, so such a quantum computer could never solve an undecidable problem like the halting problem. The existence of "standard" quantum computers does not disprove the Church-Turing thesis.