19 Quantum complexity
So far, we know that quantum computers can potentially be exponentially faster than classical computers. However, the exact extent of this advantage remains unknown.
For instance, can quantum computers solve NP-hard problems in polynomial time?
We start with the common complexity class NP (non-deterministic polynomial time):
Note that this definition is a bit informal because we do not explicitly specify in which argument \(A\) is polynomial, and how the length of \(\omega\) is bounded etc. While important for a precise analysis, we omit such details in this chapter.
This means than an \(\text{NP}\)-algorithm can efficiently verify YES-instances and never incorrectly accepts a NO-instance.
Furthermore, \(\text{SAT}\) is \(\text{NP}\)-complete. This means that if we can solve \(\text{SAT}\) in polynomial time, we can solve any problem in \(\text{NP}\) in polynomial time.
The key question is whether quantum computers can solve \(\text{SAT}\) (or any other \(\text{NP}\)-complete problem) in polynomial time. This is closely related to the famous “\(\text{P} = \text{NP}\)” problem.
Although the question remains unsolved even for classical computers, there are weak indications for quantum computers suggesting a negative answer.
19.1 Oracle lower bounds
It is known that quantum computers cannot solve \(\text{SAT}\) in polynomial time relative to a black-box function (oracle). That is, if the only thing the algorithm can do with \(f\) is to evaluate it. (No “decompilation” or similar.)
For classical computers, it is easy to see that \(\Theta(2^n)\) queries are necessary and sufficient to distinguish YES- and NO-instances in the black-box case. For quantum computers, this bound is reduced to \(\Theta(2^\frac{n}{2})\).
This is achievable with Grover’s algorithm: For a function \(f\), Grover’s algorithm finds a \(z\) such that \(f(z) = 1\), if such a \(z\) exists. This can be used to distinguish YES- or NO-instances with arbitrary small error.
We now aks: Could there be even faster quantum algorithms?
Assume we have a quantum algorithm \(A^f\) that uses arbitrary quantum operations (unitaries, auxiliary qubits, measurements, \(\dots\)) and can query the oracle \(V_f: \ket{x} \rightarrow (-1)^{f(x)} \ket{x}\).1
19.1.1 Proof sketch
To give a proof sketch for Theorem 19.1, we look at the circuits for \(A^{f_x}\) and \(A^{f_0}\):
We analyze the final states \(\psi^x_q\) and \(\phi_q\) of the algorithms/circuits. We define the average squared distance between the final states: \[ D \coloneqq \sum_{x \in \{0,1\}^n} 2^{-n} \| \psi^x_q - \phi_q \|^2. \]
We aim to show: \(D \leq \frac{4q^2}{2^{-n}}\). For this we need a lemma:
With this lemma we get:
\[ \begin{aligned} \Delta &\coloneqq \Pr[A^{f_x}() \rightarrow 1 : x \xleftarrow{\textdollar} \{0,1\}^n] - \Pr[A^{f_0}() \rightarrow 1] \\ &= \sum_{x \in \{0,1\}^n} 2^{-n} \biggl( \Pr[A^{f_x}() \rightarrow 1] - \Pr[A^{f_0}() \rightarrow 1] \biggr) \\ &\leq \sum_{x \in \{0,1\}^n} 2^{-n} \sqrt{\| \psi^x_q - \phi_q \|^2 } \quad \text{// Quantum inequality above} \\ &\leq \sqrt{ \sum_{x \in \{0,1\}^n} 2^{-n} \| \psi^x_q - \phi_q \|^2 } \quad \text{// Jensen's inequality} \\ &= \sqrt{D}. \end{aligned} \]
So it is \(\Delta \leq \sqrt{D}\) and since we assumed \(\Delta \geq \text{const}\) it is: \[ D \geq \Delta^2 \geq \text{const}. \]
Hence, if we show \(D \leq \frac{4q^2}{2^{-n}}\) then it follows \(\frac{q^2}{2^{-n}} \geq \text{const}\) and therefore \(q \in \Omega(2^\frac{n}{2})\).
We prove this via induction on the number of queries \(k\), defining: \[ D_k \coloneqq \sum_{x \in \{0,1\}^n} 2^{-n} \| \psi^x_k - \phi_k \|^2. \] Note that \(D = D_q\). To prove \(D \leq \frac{4q^2}{2^{-n}}\), we will show \(D_k \leq \frac{4k^2}{2^{-n}}\) by induction.
For \(k=0\) it is \(\psi^x_k = \phi_k\), as you can see in the circuits. And therefore it is: \[ D_0 = 0 \leq \frac{4 \cdot 0^2}{2^{-n}} = 0. \]
Now we look at the induction step \(k \rightarrow k+1\):
We have \(D_k \leq \frac{4k^2}{2^{-n}}\) and want to show \(D_{k+1} \leq \frac{4 (k+1)^2}{2^{-n}}\):
\[ \begin{aligned} 2^n D_{k+1} &= \sum_{x \in \{0,1\}^n} \Bigl\| \psi^x_{k+1} - \phi_{k+1} \Bigr\|^2 \\ &= \sum_{x \in \{0,1\}^n} \Bigl\| U_{k+1} (V_f \otimes I_2) \psi^x_k - U_{k+1} \phi_k \Bigr\|^2 \quad \text{// by looking at the circuits} \\ &= \sum_{x \in \{0,1\}^n} \Bigl\| U_{k+1} \Bigl( (V_f \otimes I_2) \psi^x_k - \phi_k \Bigr) \Bigr\|^2 \\ &= \sum_{x \in \{0,1\}^n} \Bigl\| (V_f \otimes I_2) \psi^x_k - \phi_k \Bigr\|^2 \quad \text{// because unitaries preserve norms} \\ &= \sum_{x \in \{0,1\}^n} \Bigl\| (V_f \otimes I_2) (\psi^x_k - \phi_k) + \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2 \\ &\leq \sum_{x \in \{0,1\}^n} \Bigl\| (V_f \otimes I_2) (\psi^x_k - \phi_k) \Bigr\|^2 + 2 \Bigl\| (V_f \otimes I_2) (\psi^x_k - \phi_k) \Bigr\| \cdot \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\| \\ & \quad\quad + \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2 \\ &= \sum_{x \in \{0,1\}^n} \Bigl\| \psi^x_k - \phi_k \Bigr\|^2 + 2 \Bigl\| \psi^x_k - \phi_k \Bigr\| \cdot \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\| \\ & \quad\quad + \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2 \quad \text{// because unitaries preserve norms} \\ &= 2^n D_k + 2 \sum_{x \in \{0,1\}^n} \Bigl\| \psi^x_k - \phi_k \Bigr\| \cdot \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr)\phi_k \Bigr\| + \sum_{x \in \{0,1\}^n} \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2 \\ &\overset{(*)}{=} 2^n D_k + 4 \sum_{x \in \{0,1\}^n} \Bigl\| \psi^x_k - \phi_k \Bigr\| \sqrt{\Pr[M \rightarrow x]} + 4 \underbrace{\sum_{x \in \{0,1\}^n} \Pr[M \rightarrow x]}_{=1 \Bigl(\sum \text{ over all measurement outcomes}\Bigr)} \\ &\leq 2^n D_k + 4 \sqrt{\sum_{x \in \{0,1\}^n} \Bigl\| \psi^x_k - \phi_k \Bigr\| \cdot \sum_{x \in \{0,1\}^n} \Pr[M \rightarrow x]} + 4 \quad \text{// Cauchy-Schwarz-inequality} \\ &= 2^n D_k + 4 \sqrt{2^n D_k \cdot 1} + 4 \\ &\leq 4k^2 + 4 \sqrt{4k^2} + 4 \quad \text{// induction hypothesis} \\ &= 4k^2 + 8k + 4 \\ &= 4(k+1)^2. \end{aligned} \]
So it is \(D_{k+1} \leq \frac{4 (k+1)^2}{2^{-n}}\). Note that \((*)\) holds since when we consider \(\Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2\) it is: \[ \begin{aligned} \Bigl(V_f - I_{2^n} \Bigr) \ket{z} &= V_f \ket{z} - \ket{z} \\ &= \begin{cases} -\ket{z} - \ket{z} = -2\ket{z} & (z = x) \\ \ket{z} - \ket{z} = 0 & (z \neq x) \\ \end{cases} \end{aligned} \] from which follows that \((V_f - I_{2^n}) = 2 P_x\) where \(P_x\) is the projection outcome onto \(\ket{x}\). Hence: \[ \begin{aligned} &\quad \: \Bigl\| \Bigl((V_f \otimes I_2) - I_{2^{n+1}} \Bigr) \phi_k \Bigr\|^2 \\ &= \Bigl\| \Bigl((V_f - I_{2^n}) \otimes I_2 \Bigr) \phi_k \Bigr\|^2 \\ &= 4 \Bigl\| \underbrace{\Bigl(P_x \otimes I_{2^n} \Bigr) \phi_k}_{\substack{\text{non-normalized} \\ \text{post-measurement-state} \\ \text{when measuring } \ket{x}}} \Bigr\|^2 \\ &= 4 \Pr[M \rightarrow x] \end{aligned} \] where \(M\) is the measurement of the \(X\)-register.
In conclusion, no quantum algorithm can solve \(\text{SAT}\) in less than \(\Omega(2^\frac{n}{2})\) queries with an oracle. So \(\text{SAT}\) is quantum-hard relative to some oracle.
19.2 Quantum Merlin Arthur
The question arises, if there is a “quantum \(\text{NP}\)”?
For this we define the class \(\text{QMA}\) (Quantum Merlin Arthur) analogous to Definition 19.1:
Thus, \(\text{QMA}\) plays a similar role in quantum complexity theory as \(\text{NP}\) in classical complexity theory. (And as \(\text{MA}\) in the complexity of randomized algorithms.)
There are known \(\text{QMA}\)-complete problems. One example is the “Local Hamiltonian problem”. For the definition and explanation of a Hamiltonian see Section 13.3.
This problem is indeed \(\text{QMA}\)-complete (without proof):
One may wonder why \(V_f\) and not \(U_F\) (Section 12.1.1). In Section 12.1.1 we saw that from \(U_f\), we can construct \(V_f\). Vice versa, given \(V_f\) and the classical knowledge of a single \(f(x)\), we can construct \(U_f\). So it does not matter much, which we choose.↩︎