On the power of a unique quantum witness

In a celebrated paper, Valiant and Vazirani raised the question of whether the difficulty of NP-complete problems was due to the wide variation of the number of witnesses of their instances. They gave a strong negative answer by showing that distinguishing between instances having zero or one witnesses is as hard as recognizing NP, under randomized reductions. We consider the same question in the quantum setting and investigate the possibility of reducing quantum witnesses in the context of the complexity class QMA, the quantum analogue of NP. The natural way to quantify the number of quantum witnesses is the dimension of the witness subspace W in some appropriate Hilbert space H. We present an efficient deterministic procedure that reduces any problem where the dimension d of W is bounded by a polynomial to a problem with a unique quantum witness. The main idea of our reduction is to consider the Alternating subspace of the d-th tensor power of H. Indeed, the intersection of this subspace with the d-th tensor power of W is one-dimensional, and therefore can play the role of the unique quantum witness.


Introduction
One of the most fundamental ideas of modern complexity theory is that, the study of decision making procedures involving a single party should be extended to the study of more complex procedures where several parties interact. The notions of verification and witness are at the heart of those complexity classes whose definition inherently involves interaction. The complexity classes P is the set of languages decidable by a polynomial-time deterministic algorithm. Similarly, BPP is the set of promise problems decidable by a polynomial-time bounded-error randomized algorithm. We can think of such an algorithm as a verifier acting alone. The simplest interactive extensions of P and BPP are their non-deterministic analogues, respectively NP and MA [10,6]. These classes involve also an all powerful prover that sends a single message which is used by the verifier's decision making procedure together with the input. We require that on positive instances there is some message (called in that case a witness) that makes the verifier accept, whereas on negative instances the verifier rejects independently of the message sent by the prover. In the case of MA we can fix the permitted error of the verifier, rather arbitrarily to any constant, say 1/3. Quantum complexity classes are often defined by analogy to their classical counterparts. Since quantum computation is inherently probabilistic, the quantum analog of MA is considered to be the right definition of non-deterministic quantum polynomial-time. The quantum extension is twofold: the verifier has the power to decide promise problems in BQP, quantum polynomial-time, and the messages he receives from the prover are also quantum. Thus, QMA is the set of promise problems such that on positive instances there exists a quantum witness accepted with probability at least 2/3 by the polynomial-time quantum verifier and on negative instances the verifier accepts every quantum state with probability at most 1/3. While the idea that a quantum state might play the role of a witness goes back to Knill [18], the class was formally defined by Kitaev [17] under the name of BQNP. The currently used name QMA was given to the class by Watrous [29]. Kitaev has established several error probability reduction properties of QMA, and proved that the Local Hamiltonian, the quantum analog of SAT was complete for it. Watrous has shown that Group non-Membership was a problem in QMA and based on this result he has constructed an oracle under which MA is strictly included in QMA. Since then, various problems have been proven to be complete for QMA [14,16,21,15,22]. A potentially weaker quantum extension of MA, namely QCMA, was defined by Aharonov and Naveh [1]: in the case of QCMA, the verifier is still a quantum polynomial-time algorithm, but the message of the prover can only be classical.
The number of witnesses for positive instances of problems in NP can be exponentially high. Also, known NP-complete problems have different instances with widely varying numbers of solutions. In a celebrated paper, Valiant and Vazirani [28] have raised the question of whether the difficulty of the class NP was due to this wide variation. They gave a strong negative answer to this question in the following sense. Let UP be the set of problems in NP where in addition on positive instances there exists a unique witness. We denote by PromiseUP the extention of UP from languages to promise problems. The theorem of Valiant and Vazirani states that any problem in NP can be reduced in randomized polynomial-time to a promise problem in PromiseUP, or in set theoretical terms, NP ⊆ RP PromiseUP , where RP is the subclass of problems in BPP where the computation does not err on negative instances. The complexity class UP has also its importance because of its connection to one-way functions: worst case one-way functions exist if and only if UP = P [19,11].
In a recent paper Aharonov, Ben-Or, Brandão and Sattah [3] have asked a similar question for MA, QCMA and QMA. The restriction of the classical-witness classes MA and QCMA to their unique variants UMA and UQCMA is rather natural: no change for negative instances, but on positive instances there has to be exactly one witness that makes the verifier accept with probability at least 2/3, while all other messages make him accept with probability at most 1/3. The definition of UQMA, the unique variant of QMA is the following: there is no change for negative instances with respect to QMA, but on positive instances there has to be a quantum witness state |ψ which is accepted by the verifier with probability at least 2/3, whereas all states orthogonal to |ψ are accepted with probability at most 1/3. Aharonov et al. extended the Valiant-Vazirani proof for the classical witness classes by showing that MA ⊆ RP UMA and QCMA ⊆ RP UQCMA . On the other hand, they left the existence of a similar result for QMA as an open problem.
Why is it so difficult to reduce the witnesses to a single witness in the quantum case? The basic idea of Valiant and Vazirani is to use pairwise independent universal hash functions, having polynomial size descriptions, that eliminate independently each witness with some constant probability. The size of the original witness set can be guessed approximately by a polynomial-time probabilistic procedure, and in case of a correct guess the hashing keeps alive exactly one witness with again some constant probability. The same idea basically works for MA and QCMA as long as one additional difficulty is overcome: on positive instances there can be exponentially more "pseudo-witnesses", accepted with probability between 1/3 and 2/3, than witnesses which are accepted with probability at least 2/3. In this case, the Valiant-Vazirani proof technique will eliminate with high probability all witnesses before the elimination of the pseudo-witnesses. The solution of Aharonov et al. for this problem is to divide the interval (1/3, 2/3) into polynomially many smaller intervals and to show that there exists at least one interval such that there are approximately as many witnesses accepted with probability within this interval as above it.
In the quantum case, the set of quantum witnesses can be infinite. For a promise problem in QMA, we can suppose without loss of generality that on positive instances there exists a subspace W such that all unit vectors in W are accepted. The dimension of W could be large and we wish to reduce it to one. Aharonov et. al [3] considered the special case where the dimension of W is two. Although classically two witnesses are trivially reducible to the unique witness case, they have shown that the natural generalization of the Valiant-Vazirani construction cannot solve even the two-dimensional quantum witness case.
Indeed, the natural generalization of the Valiant-Vazirani construction to this situation is to use random projections and hope that some one-dimensional subspace of W will be accepted with substantially higher probability than its orthogonal. A first difficulty is to implement such projections efficiently. But more importantly, a random projection would not create a polynomial gap in the acceptance probabilities for the pure states of W : in fact all states in W which were accepted with exponentially close probabilities, will still be accepted after the random projection with exponentially close probabilities.
Here we describe a fundamentally different proof technique to tackle this problem, which is sufficiently powerful to solve the case when the dimension of the witness subspace W is polynomially bounded in the length of the input. This leads us naturally to the quantum analog of the promise problem class FewP. This complexity class was defined by Allender [4] as the set of problems in NP with the additional constraint that there is a polynomial q such that on every positive instance of length n, the number of witnesses is at most q(n). The class FewP was extensively studied in the context of counting complexity classes [5,27,20,12,26]. We define FewQMA, the quantum analog of FewP, as the set of promise problems in QMA for which there exists a polynomial q with the following properties: on negative instances every message of the prover is accepted by the verifier with probability at most 1/3; on a positive instance x there exists a subspace W x of dimension between 1 and q(|x|), such that all pure states in W x are accepted with probability at least 2/3, while all pure states orthogonal to W x are accepted with probability at most 1/3. Our main theorem extends the result of Valiant and Vazirani to this complexity class. More precisely, we show that FewQMA is deterministic polynomial-time Turing-reducible to UQMA.
The first idea to establish this result is that instead of manipulating the states within the original space H of dimension K, we consider its t-fold tensor powers H ⊗t . At first glance, this does not seem to be going in the right direction because the dimension of W ⊗t grows as d t , where d is the dimension of the witness space W . Our second idea is to consider the alternating subspace Alt of H ⊗t whose dimension is K t . The important thing to notice is that the dimension of the intersection Alt ∩ W ⊗t is equal to one when t = d. The reason is that this intersection is in fact equal to the alternating subspace of W ⊗t whose dimension is d t . Therefore, we will choose this one-dimensional subspace as our unique quantum witness. Of course, we don't know exactly the dimension of W , but since we have a polynomial upper bound q(|x|) on it, we just try every possible value t between 1 and q(|x|).
For a fixed t, we would ideally implement Π W ⊗t ·Π Alt , the product of the projection to Alt followed by the projection to W ⊗t . The reason that this would work is the following. The unique pure state in Alt ∩ W ⊗t (up to a global phase) is clearly accepted with probability 1. On the other hand, we claim that any state |φ orthogonal to that is rejected with probability 1. Indeed, |φ can be decomposed as |φ 1 + |φ 2 , where |φ 1 ∈ Alt ⊥ and |φ 2 ∈ W ⊗t ⊥ . Therefore |φ 1 is rejected by Π Alt and |φ 2 is rejected by Π W ⊗t . This implies the claim since we can show that the two projectors actually commute.
We can efficiently implement Π Alt by a procedure we call the Alternating Test. A similar procedure to ours, implementing efficiently the projection to the symmetric subspace Sym of H ⊗t , was proposed by Barenco et al. [7] as the basis of a method for the stabilization of quantum computations. In fact, in the two-fold tensor product case, the two procedures coincide and become the well know Swap Test which was used by Buhrman et al. [9] for deciding if two given pure states are close or far apart.
We can't implement Π W ⊗t exactly, but we can approximate it efficiently by a procedure called the Witness Test. This test just applies independently to all the t components of the state the procedure at our disposal which decides in H whether a state is a witness or not, and accepts if all applications accept. There is only one difficulty left: since Π Alt and the Witness Test don't necessarily commute, our previous argument which showed that states in W ⊗t ⊥ were rejected with probability 1 doesn't work anymore. We overcome this difficulty by showing that the commutativity of the two projections implies that the projections to Alt of such states are also in W ⊗t ⊥ , and therefore get rejected with high probability by the Witness Test.
An interesting feature of our reduction is that it is deterministic, while the Valiant-Vazirani procedure is probabilistic. It is fair to say though that classically the witnesses can all be enumerated when their number is bounded by a polynomial. Therefore, in that case, the reduction can also be done deterministically, implying that FewP ⊆ P PromiseUP . We believe that reducing QMA to a unique witness, which this paper leaves as an open question, will require a probabilistic or a quantum procedure.
The rest of the paper is structured as follows. In Section 2 we state some facts about the interaction of the tensor products of subspaces with the alternating subspace. In Section 3 we define the complexity classes we are concerned with. We give two definitions for FewQMA and show that they are equivalent. Section 4 is entirely devoted to the proof of our main result. Finally in the Appendix A we consider a third definition and show a weak equivalence with the previous ones.

Preliminaries
In this section we present definitions and lemmas that we will need in the proof of our main result.
We represent by [t] the set {1, 2, . . . , t}. For a Hilbert space H, we denote by dim(H) the dimension of H. For a subspace S of H, let S ⊥ represent the subspace of H orthogonal to S, and let Π S denote the projector onto S. For subspaces S 1 , S 2 of H, their direct sum S 1 + S 2 is defined as span(S 1 ∪ S 2 ), and when S 1 , S 2 are orthogonal subspaces, we denote their (orthogonal) direct sum by S 1 ⊕ S 2 . The following relations are standard.

Fact 1
1. Let S 1 , S 2 be subspaces of a Hilbert space H.
2. Let S 1 , S 2 be subspaces of Hilbert spaces H 1 , H 2 respectively. Then, . Let B represent the two-dimensional complex Hilbert space and let {|0 , |1 } be the computational basis for B. For a natural number k, the computational basis of B ⊗k (the k-fold tensor of B) consists of {|r : r ∈ {0, 1} k }, where |r denotes the tensor product |r 1 ⊗ . . . ⊗ |r k for the k-bit string r = r 1 . . . r k . Fix k and let H denote B ⊗k and let K = 2 k . By a pure state in H, we mean a unit vector in H. A mixed state or just state is a positive semi-definite operator in H with trace 1. We refer the reader to the text [24] for concepts related to quantum information theory. For a natural number t ∈ [K], we will think of states of H ⊗t as consisting of t registers, where the content of each register is a state with support in H.
We will consider the interaction of W ⊗t , where W is a d-dimensional subspace of H for some d satisfying 2 ≤ t ≤ d ≤ K, with the alternating and symmetric subspaces of H ⊗t . Let S t denote the set of all permutations π : [t] → [t]. For a permutation π ∈ S t , let the unitary operator U π , acting on H ⊗t , be given by |s π(1) ⊗ . . . ⊗ |s π(t) .
For permutations π 1 , π 2 , let π 1 • π 2 represent their composition. It is easily seen that U π 1 •π 2 = U π 1 U π 2 . For distinct i, j ∈ [t], let π ij be the transposition of i and j. For all distinct i, j ∈ [t], the symmetric subspace of W ⊗t with respect to i and j is given by Similarly, for all distinct i, j ∈ [t], the alternating subspace of W ⊗t with respect to i and j is defined as Alt W ⊗t ij = {|φ ∈ W ⊗t : U π ij |φ = −|φ }, and the alternating subspace of W ⊗t is defined as The subspaces Sym W ⊗t and Alt W ⊗t are of dimension d+t−1 t and d t respectively [8]. In particular, Alt H ⊗2 and Sym H ⊗2 have respective dimensions K+1 2 and K 2 and since they are orthogonal, we have Note that for W = H the claim states that (Alt H ⊗t ) ⊥ = i =j Sym H ⊗t ij . For us, a particularly important case is when the number of registers t is equal to d, the dimension of the subspace W . Then the alternating subspace Alt W ⊗d is one-dimensional. Let {|ψ 1 , . . . , |ψ d } be any orthonormal basis of W , and let the vector |W alt ∈ W ⊗d be defined as |W alt = 1 √ d! π∈S d sgn(π) U π |ψ 1 . . . |ψ d , where sgn(π) denotes the sign of the permutation π. The following claim states that |W alt spans the one-dimensional subspace Alt W ⊗d . This immediately implies that |W alt is independent of the choice of the basis (up to a global phase).
Next, we show that the projections on the spaces Alt H ⊗t and W ⊗t commute for any 2 ≤ t ≤ d.

Complexity classes
In this section we define the relevant complexity classes and state the facts needed about them. For a quantum circuit V , we let V also represent the unitary transformation corresponding to the circuit. We call a verification procedure a family of quantum circuits {V x : x ∈ {0, 1} * } uniformly generated in polynomial-time, together with polynomials k and m such that V x acts on k(|x|) + m(|x|) qubits. We refer to the first k(|x|) qubits as witness qubits and to the last m(|x|) qubits as auxiliary qubits.
To simplify notation, when the input x is implicit in the discussion, we refer to k(|x|) by k, and to m(|x|) by m. We will make repeated use of the following projections in B ⊗(k+m) : where I n is the identity operator on n qubits. We will also make use of the operator Π x defined as It is easy to see that Π x is positive semi-definite. Given a verification procedure, on input x, a Quantum Merlin-Arthur protocol proceeds in the following way: the prover Merlin sends a pure state |ψ ∈ B ⊗k , the witness, to the verifier Arthur, who then applies the circuit V x to |ψ ⊗ |0 m , and accepts if the measurement of the first qubit of the result gives 1. We will denote the probability that Arthur accepts x with witness |ψ by Pr[V x outputs Accept on |ψ ], which is equal to ||Π acc V x (|ψ ⊗ |0 m )|| 2 .
A promise problem is a tuple L = (L yes , L no ) with L yes ∪ L no ⊆ {0, 1} * and L yes ∩ L no = ∅. We now define the following complexity classes.
We next provide an alternative definition of FewQMA(c, w, s) and show that the two definitions are equivalent. 2. for all x ∈ L no , all eigenvalues of Π x are at most s(|x|).
We prove the following equivalence between the two definitions. Proof Part 1 (Definition 4 ⇒ Definition 2): Let L be a promise problem Alternative-FewQMA(c, w, s) with some verification procedure {V x } and polynomial q according to Definition 4. We show that {V x } and q satisfy also Definition 2 with the same parameters. We first consider the case x ∈ L. For every |u ∈ B ⊗(k+m) , we have It is easy to check that all eigenvectors of Π x are also eigenvectors of Π init . The 1-eigenvectors of the projector Π init are of the form |u ⊗ |0 m with |u ∈ B ⊗k , and any vector orthogonal to these is an eigenvector with eigenvalue 0. Let r be the number of eigenvalues of Π x that are at least c(|x|), by hypothesis r ∈ [q(|x|)].
We consider a pure state |ψ = i∈[r] α i |v i in W x . Then, If |φ ∈ W ⊥ x is a pure state then by similar arguments we get Π acc V x (|φ ⊗ |0 m ) 2 ≤ w(|x|). When x / ∈ L, condition 2 of Definition 2 gets satisfied analogously from condition 2 of Definition 4.

Part 2 (Definition 2 ⇒ Definition 4):
Let L ∈ FewQMA(c, w, s) with some verification procedure {V x } and polynomial q according to Definition 2. We claim that {V x } and q satisfy also Definition 4 with the same parameters. First consider the case x ∈ L. The cardinality of the dimension of the subspace of witnesses W x in B ⊗k is in [q(|x|) by hypothesis. We set W c = span{|v ∈ B ⊗k : |v ⊗ |0 m is an eigenvector of Π x with eigenvalue ≥ c(|x|)} , and W w = span{|v ∈ B ⊗k : |v ⊗ |0 m is an eigenvector of Π x with eigenvalue > w(|x|)} .
We will show that dim(W x ) = dim(W c ) and that W c = W w , from which the claim follows. For this, it is sufficient to prove that dim(W c ) = dim(W x ) = dim(W w ), since clearly W c is a subspace of W w .
First observe that the definitions of W c and W w imply that W ⊥ c = span{|v ∈ B ⊗k : |v ⊗ |0 m is an eigenvector of Π x with eigenvalue < c(|x|)} , and W ⊥ w = span{|v ∈ B ⊗k : |v ⊗ |0 m is an eigenvector of Π x with eigenvalue ≤ w(|x|)} .
Let us suppose that dim(W x ) < dim(W c ). Then there exists a vector |u in W c ∩ W ⊥ x . Since |u ∈ W c , using arguments as in Part 1 above, we have Π acc V x (|u ⊗ |0 m ) 2 ≥ c(|x|). However, since |u ∈ W ⊥ x , from condition 1(b) of Definition 2 we have Π acc V x (|u ⊗ |0 m ) 2 ≤ w(|x|) < c(|x|) which is a contradiction. We similarly reach a contradiction assuming dim(W x ) > dim(W c ) and hence dim(W x ) = dim(W c ).
The equality dim(W w ) = dim(W x ) can be proven by an argument analogous to the proof of dim(W x ) = dim(W c ).
In the case x / ∈ L, assume for contradiction that there is an eigenvalue λ > s(|x|) of Π x with eigenvector |v ⊗ |0 m . Then as before, which contradicts condition 2 of Definition 2.
The alternative definition of FewQMA(c, w, s) is useful in arriving at the following strong error probability reduction theorem whose proof follows very similar lines as the QMA strong error probability reduction proof in Marriott and Watrous [23] and hence is skipped.
Our goal is to describe a deterministic polynomial-time algorithm A, with access to the oracle O for the promise problem UQMA-CPP, that decides the promise problem L. In high level, our algorithm works in the following way. On input x and for all t ∈ [q(|x|)], A calls O with a quantum circuit A t x that uses t · k witness qubits and t · m auxiliary qubits, and outputs Accept if and only if the witness has the following two properties: first, it belongs to the alternating subspace of H ⊗t and second the circuit V x , when performed on each of the t registers separately, outputs Accept on all of them. A accepts iff for any t, oracle O accepts. We will prove that for x ∈ L yes , we have Hence O accepts A t x and therefore A accepts. On the other hand, for x ∈ L no , we show that for all t ∈ [q(|x|)], A t x ∈ UQMA-CPP no and hence A rejects. We first describe in detail the Alternating Test and the Witness Test that appear in the algorithm. In our descriptions below k, m, q, r represent the integers k(|x|), m(|x|), q(|x|) and r(|x|) respectively.

Alternating Test
Let H be the Hilbert space B ⊗k and let t ∈ [2 k ]. Let us fix some polynomial-time computable bijection between the set [t!] and the set of permutations S t . Let P t be the (t!)−dimensional Hilbert space spanned by vectors |i , for i ∈ [t!]. We will use the elements of S t for describing the above basis vectors via the fixed bijection.
The Alternating Test with parameter t receives, as input, a pure state in H ⊗t and performs a unitary operation in the Hilbert space P t ⊗ H ⊗t , followed by a measurement. We will refer to the elements of P t ⊗ H ⊗t as consisting of two registers R and S, where the content of each register is a mixed state with support over the corresponding Hilbert space.
Alternating Test(t) Input: A pure state |ψ ∈ H ⊗t in the (t · k)-qubit register S Output: The content of register S and Accept or Reject. It is easily verified that the Alternating Test(t) runs in time polynomial in t · k. Since we will only call it with t ∈ [q], its running time will be polynomial in |x|. The following lemma states that the Alternating Test(t) is a projection onto the subspace Alt H ⊗t .

Lemma 1
1. For any pure state |ψ ∈ Alt H ⊗t , the Alternating Test(t) outputs the state |ψ and Accept with probability 1.

Witness Test
The Witness Test with parameter t ∈ [q] receives as input a pure state in H ⊗t and performs a unitary operation in the Hilbert space H ⊗t ⊗B ⊗(tm) followed by a measurement. We will refer to the elements of H ⊗t ⊗ B ⊗(tm) as consisting of t pairs of registers (T i , Z i ) respectively on k and m qubits, for i ∈ [t]. All registers Z i will be initialized to |0 m .

Witness Test(t)
Input: A pure state |ψ ∈ H ⊗t in the k-qubit registers T i , for i ∈ [t] Output: Accept or Reject 1. For all i ∈ [t], append a register Z i initialized to |0 m and apply the circuit V x on registers (T i , Z i ).

Output
Accept if for all i ∈ [t], V x outputs Accept; otherwise output Reject.
We can describe the Witness Test(t) as the operator (Π acc V x ) ⊗t acting on a state |ψ ⊗ |0 tm . Hence, Pr[Witness Test(t) outputs Accept on |ψ ] = ||(Π acc V x ) ⊗t (|ψ ⊗ |0 tm )|| 2 . Note that the description of the circuit V ⊗t x can be generated in polynomial-time, since the circuit family {V x , x ∈ {0, 1} * } is uniformly generated in polynomial-time.
In what follows we will have to argue about the probability that the verification procedure V x outputs Accept when its input is some mixed state. Even though we have only considered pure states as inputs in the definition of the class FewQMA, we will see that it is not hard to extend our arguments to mixed states.

Lemma 2
1. If x ∈ L yes , then for every |ψ ∈ W ⊗t x , the Witness Test(t) outputs Accept with probability at least 2/3.

If
x ∈ L yes , then for every |φ ∈ (W ⊗t x ) ⊥ , the Witness Test(t) outputs Accept with probability at most 1/3.

If
x ∈ L no , then for every |ψ ∈ H ⊗t , the Witness Test(t) outputs Accept with probability at most 1/3.
Proof Part 1: By completeness we know that for any pure state |ψ ′ ∈ W x , we have Pr[V x outputs Reject on |ψ ′ ] ≤ 2 −r . Let ρ i denote the reduced density matrix of |ψ on register T i . Since |ψ ∈ W x ⊗t , then for every i ∈ [t], the density matrix ρ i is a distribution of pure states that all belong to W x and hence Pr[V x outputs Reject on ρ i ] ≤ 2 −r . It follows from the union bound that where the last inequality follows from the choice of r.
x stands in the i th component of the tensor product. By Fact 1 we have (W x ⊗t ) ⊥ = i∈[t] S i . Let us therefore consider a pure state |φ ∈ i∈[t] S i and let |φ = i∈[t] a i |φ i , where |φ i is a pure state in S i . Then t i=1 |a i | 2 = 1 because the |φ i 's are also orthogonal. Furthermore, let ρ i be the reduced density matrix of |φ i on register T i . Then the support of ρ i is over W ⊥ x . Since for any pure state The probability that the Witness Test(t) outputs Accept on |φ i is equal to the probability that all t applications of V x output Accept, which is less than the probability that the i th application of V x outputs Accept, since the projections, performed in different registers, commute. Hence,

Now for the input |φ we have
In the above calculation the first two inequalities follow respectively from the triangle inequality and the Cauchy-Schwarz inequality.

Part 3:
By the soundness of the original protocol we know that for any pure state |ψ ′ ∈ H Pr[V x outputs Accept on |ψ ′ ] ≤ 2 −r . The same holds for any mixed state as well. Since the probability that the Witness Test(t) outputs Accept is at most the probability that the procedure V x accepts the state on the first register T 1 we conclude that Pr[Witness Test(t) outputs Accept on |ψ ] ≤ Pr[V x outputs Accept on ρ 1 ] ≤ 2 −r ≤ 1/3.

Putting it all together
Finally we describe the algorithm A in the figure below and proceed to analyze its properties.

Algorithm A
Input: x ∈ L yes ∪ L no Output: Accept or Reject 1. For t = 1, . . . , q(|x|) do: where A t x is the description of the circuit of the following procedure on t ·k witness qubits and t ·m auxiliary qubits Input: A pure state |ψ ∈ H ⊗t ; Output: Accept or Reject i. Run the Alternating Test(t) with input |ψ .
ii. Run the Witness Test(t) with input being the output state of the Alternating Test(t).
iii. Output Accept iff both Tests output Accept.
(b) If O outputs Accept then output Accept and halt.
Running time: We have seen that the description of the circuit that performs the Alternating Test(t) can be generated in time polynomial in t · k which is polynomial in |x|. The description of the circuit that performs the Witness Test(t) can also be generated in polynomial-time, since the circuit family {V x : x ∈ {0, 1} * } can be generated uniformly in polynomial-time. Hence the description of the circuit A t x can be generated in polynomial-time and the overall algorithm A runs in polynomial-time.
Correctness in case x ∈ L yes : Let us consider the oracle call with input A d x where d is the dimension of W x . We prove that A d x ∈ UQMA-CPP yes , hence the oracle O outputs Accept and therefore A outputs Accept as well. Our claim is immediate from the following lemma. This concludes the proof of Theorem 3.
A natural question is whether the use of a subspace is necessary in the second definition or we could have just talked about a set of orthonormal vectors of polynomial size, where each vector is accepted with probability 2/3 and every vector orthogonal to these ones is accepted with probability at most 1/3. While we are unable to show the equivalence of the complexity class defined this way and FewQMA, a weak equivalence can indeed be shown. For this we include the parameters of the verification procedure and the bound on the number of witnesses in the definition of the class, and we also require strong amplification. More precisely, consider the following definition.
We show Vector-FewQMA = FewQMA. For showing the equivalence we use Horn's Theorem that states that for a Hermitian matrix, the vector of the eigenvalues majorizes the diagonal.
We now show Vector-FewQMA ⊆ FewQMA. Let L ∈ Vector-FewQMA(1 − 1 3q , 1 3·2 k , 1 3 , q, k, m), for some polynomials q, k, m such that q ≤ 2 k . Let N = 2 k and H = B ⊗k . If x ∈ L yes , then there exist an orthonormal basis {|ψ 1 , . . . , |ψ N } for H and d ∈ [q], such that for i ∈ [d], µ i ≥ 1 − 1 3q and for d + 1 ≤ i ≤ N , µ i ≤ 1 3N , where by definition Consider now the Hermitian matrix M that describes the projection operator Π x in a basis that is an extension of {|ψ 1 ⊗ |0 m , . . . , |ψ N ⊗ |0 m }. Note that µ i , i ∈ [N ] are the first N diagonal elements of M . Observe that an eigenvector of Π x with non-zero eigenvalue is also an eigenvector of Π init with non-zero eigenvalue. Since there are N non-zero eigenvalues of Π init , there are at most N non-zero eigenvalues of Π x . This also implies that µ i = 0 for N < i ≤ 2 k+m . Let the first N eigenvalues of Π x in decreasing order be λ i , i ∈ [N ]. Then, using Horn's theorem, which implies (since λ i ≤ 1, for all i ∈ [N ]) that Also, we have that If x ∈ L no then by the soundness condition λ 1 ≤ 1 3 . This shows that L ∈ FewQMA.