A Linear-Optical Proof that the Permanent is #P-Hard
Scott Aaronson
Introduction
Given an matrix , the permanent of is defined as
A seminal result of Valiant says that computing is -hard, if is a matrix over (say) the integers, the nonnegative integers, or the set .See Hrubes, Wigderson, and Yehudayoff for a recent, “modular” presentation of Valiant’s proof (which also generalizes the proof to the noncommutative and nonassociative case). Here means (informally) the class of counting problems—problems that involve summing exponentially-many nonnegative integers—and -hard means “at least as hard as any problem.”See the Complexity Zoo (www.complexityzoo.com) for the definitions of and other complexity classes used in this paper.,If is a nonnegative integer matrix, then is itself a function, which implies that it is -complete (the term for functions that are both -hard and in ). If can have negative or fractional entries, then strictly speaking is no longer -complete, but it is still -hard and computable in the class .
More concretely, Valiant gave a polynomial-time algorithm that takes as input an instance of the Boolean satisfiability problem, and that outputs a matrix such that encodes the number of satisfying assignments of . This means that computing the permanent is at least as hard as counting satisfying assignments.
Unfortunately, the standard proof that the permanent is -hard is notoriously opaque; it relies on a set of gadgets that seem to exist for “accidental” reasons. Could there be an alternative proof that gave more, or at least different, insight? In this paper, we try to answer that question by giving a new, quantum-computing-based proof that the permanent is -hard. In particular, we will derive the permanent’s -hardness as a consequence of the following three facts:
Postselected linear optics is capable of universal quantum computation, as shown in a celebrated 2001 paper of Knill, Laflamme, and Milburn (henceforth referred to as KLM).KLM actually prove the stronger (and more practically-relevant) result that linear optics with adaptive measurements is capable of universal quantum computation. For our purposes, however, we only need the weaker fact that postselected measurements suffice for universal QC, which KLM prove as a lemma along the way to their main result.
Quantum computations can encode -hard quantities in their amplitudes.
Amplitudes in -photon linear-optics circuits can be expressed as the permanents of matrices.
Even though our proof is based on quantum computing, we stress that we have made it entirely self-contained: all of the results we need (including the KLM Theorem , and even the construction of the Toffoli gate from -qubit and gates) are proved in this paper for completeness. We assume some familiarity with quantum computing notation (e.g., kets and quantum circuit diagrams), but not with linear optics.
If one counts the complexity of all of the individual pieces we use—especially the universality results for quantum gates—then our reduction from to the permanent ends up being at least as complicated as Valiant’s, and probably more so. In our view, however, this is similar to how writing a program in C++ tends to produce a longer, more complicated executable file than writing the same program in assembly language. Normally, one also cares about the length and readability of the source code! Our purpose in this paper is to illustrate how quantum computing provides a powerful “high-level programming language” in which one can, among other things, easily rederive the most celebrated result in the theory of -hardness.
But why does the world need a new proof that the permanent is -hard—especially a proof invoking what some might consider to be exotic concepts? Let us offer several answers:
Any theorem as basic as the -hardness of the permanent deserves several independent proofs. And our proof really is “independent” of the standard one: rather than composing variable and clause gadgets,Indeed, our proof does not even go through the Cook-Levin Theorem: it reduces a computation directly to the permanent, without first reducing to . we multiply matrices corresponding to quantum gates, and use ideas from linear optics to keep track of how such multiplications affect the permanent. One way to see the difference is that our proof never uses the notion of a cycle cover.
While our proof, like the standard one, requires “gadgets” (one to simulate a Toffoli gate using gates, another to simulate a gate using postselected linear optics), the connection to quantum computing gives those gadgets a natural semantics. In other words, the gadgets were introduced for “practical” reasons having nothing to do with proving the permanent -hard, and can be motivated independently of that goal. If one already knows the quantum universality gadgets, then we offer what seems like a major advance in complexity-theoretic pedagogy: a proof that the permanent is -hard that can be reproduced on-the-spot from memory!
As Kuperberg pointed out, by their nature, any -hardness proofs (including ours) that are based on “quantum postselection” almost immediately yield hardness of approximation results as well.
We expect that the quantum postselection approach used here could lead to -hardness proofs for many other problems—including problems not already known to be -hard by other means. In this direction, one natural place to look would be special cases of the permanent.
2 Related Work
By now, there are many examples where quantum computing has been used to give new or simpler proofs of classical complexity theorems; see Drucker and de Wolf for an excellent survey. Within the area of counting complexity, Aaronson showed that the class is equal to (quantum polynomial-time with postselection), and then used that theorem to give a simpler proof of the landmark result of Beigel, Reingold, and Spielman that is closed under intersection. Later, also using the theorem, Kuperberg gave a “quantum proof” of the result of Jaeger, Vertigan, and Welsh that computing the Jones polynomial is -hard, and even showed that a certain approximate version is -hard (which had not been shown previously). Kuperberg’s argument for the Jones polynomial is conceptually similar to our argument for the permanent.
There is also precedent for using linear optics as a tool to prove theorems about the permanent. Scheel observed that the unitarity of linear-optical quantum computing implies the interesting fact that for all unitary matrices .
Rudolph showed how to encode quantum amplitudes directly as matrix permanents, and in the process, gave a “quantum-computing proof” that the permanent is -hard. However, a crucial difference is that Rudolph starts with Valiant’s proof based on cycle covers, then recasts it in quantum terms (with the goal of making Valiant’s proof more accessible to a physics audience). By contrast, our proof is independent of Valiant’s; the tools we use were invented for separate reasons in the quantum computing literature.
There has been a great deal of work on linear-optical quantum computing, beyond the seminal KLM Theorem on which this paper relies. Recently, Aaronson and Arkhipov studied the complexity of sampling from a linear-optical computer’s output distribution, assuming no adaptive measurements are available. By using the -hardness of the permanent as an “input axiom,” they showed that this sampling problem is classically intractable unless . More relevant to this paper is an alternative proof that Aaronson and Arkhipov gave for their result. Inspired by work of Bremner, Jozsa, and Shepherd , the alternative proof combines Aaronson’s theorem with the fact that postselected linear optics is universal for , and thereby avoids any direct appeal to the -hardness of the permanent. In retrospect, that proof was already much of the way toward a linear-optical proof that the permanent is -hard; this paper simply makes the connection explicit.
Background
Not by accident, this section constitutes the bulk of the paper. First, in Section 2.1, we fix some facts and notation about standard (qubit-based) quantum computing. Then, in Section 2.2, we give a short overview of those aspects of linear-optical quantum computing that are relevant for us, and (for completeness) prove the KLM Theorem in the specific form we will need.
Abusing notation, we will often identify a quantum circuit with the unitary transformation that it induces: for example, represents the amplitude with which maps its initial state to itself. We use to denote the number of gates in .
The first ingredient we need for our proof is a convenient set of quantum gates (in the standard qubit model). Thus, let be the set of gates consisting of (1) all -qubit gates, and (2) the -qubit controlled-sign gate
which flips the amplitude if and only if both qubits are .A more common -qubit gate than is the controlled-NOT () gate, which maps each basis state to . However, is more convenient for linear-optics purposes, and is equivalent to by conjugating the second qubit with a Hadamard gate. Then Barenco et al. showed that is a universal set of quantum gates, in the sense that generates any unitary transformation on any number of qubits (without error). For our purposes, however, the following weaker result suffices.
generates the Toffoli gate, the -qubit gate that maps each basis state to .
Proof. The circuit can be found in Nielsen and Chuang for example, but we reproduce it in Figure 1 for completeness. In the diagram,
is another -qubit gate, and the six vertical bars represent gates.
2 Linear-Optical Quantum Computing
We now give a brief overview of linear-optical quantum computing (LOQC), an alternative quantum computing model based on identical photons rather than qubits. For a detailed introduction to LOQC from a computer science perspective, see Aaronson and Arkhipov .
In LOQC, each basis state of our quantum computer has the form , where are nonnegative integers summing to . Here represents the number of photons in the location or “mode,” and the fact that means that photons are never created or destroyed. One should think of and as both polynomially-bounded. For this paper, it will be convenient to assume that is even, that , and that the initial state has the form : that is, one photon in each even-numbered mode, and no photons in the odd-numbered modes.
Let be the set of nonnegative integer tuples such that , and let be the Hilbert space spanned by basis states with . Then a general state in LOQC is just a unit vector in :
with .
To transform , one can select any unitary transformation . This then induces a larger unitary transformation on the Hilbert space of -photon states. There are several ways to define , but perhaps the simplest is the following formula:
for all tuples and in . Here is the matrix obtained from by taking copies of the row of and copies of the column, for all . To illustrate, if
and , then
Intuitively, the reason the permanent arises in formula (*) is that there are ways of mapping the photons in basis state onto the photons in basis state . Since the photons are identical bosons, quantum mechanics says that each of those ways contributes a term to the total , with the contribution given by the product of the transition amplitudes for each of the photons individually.
It turns out that is always unitary and that is a homomorphism. Both facts seem surprising viewed purely as algebraic consequences of formula (*), but of course they have natural physical interpretations: is unitary because it represents an actual physical transformation that can be applied, and is a homomorphism because generalizing from one photon to photons must commute with composing beamsplitters. In this paper, we will not need that is unitary; see Aaronson and Arkhipov for a proof of that fact. Below we prove that is a homomorphism.
Proof. We want to show that for all tuples and all unitaries ,
By equation (*), the above is equivalent (after multiplying both sides by ) to the identity
We will prove identity (**) in the special case and , since the general case is analogous. We have
In the second line above, we decomposed the sum by thinking about each permutation as a product of two permutations: one, , that maps particles in the initial configuration to particles in the intermediate configuration when is applied, and another, , that maps particles in the intermediate configuration to particles in the final configuration when is applied. This yields the same result, as long as we remember to sum over all possible intermediate configurations , and also to divide each summand by , which is the size of ’s automorphism group (i.e., the number of ways to permute the particles within that leave unchanged).
In the standard qubit model, every unitary transformation can be decomposed as a product of gates, each of which acts nontrivially on only or qubits. Similarly, in LOQC, every unitary transformation can be decomposed as a product of linear-optics gates, each of which acts nontrivially on only or modes. Then a linear-optics circuit is simply a list of linear-optics gates applied to specified modes (or pairs of modes) starting from the initial state .A crucial difference between standard quantum circuits and linear-optics circuits is that, whereas a standard quantum gate is the tensor product of a small (say ) unitary matrix with an exponentially-large (say ) identity matrix, a linear-optics gate is the direct sum of a small (say ) unitary matrix with a polynomially-large (say ) identity matrix. It is only the homomorphism that produces exponentially-large matrices. One consequence, pointed out by Reck et al. , is that, whereas most -qubit unitary transformations require gates to implement (as follows from an easy dimension argument), every -mode unitary transformation can be implemented using only linear-optics gates.
The last notion we need is that of postselected LOQC. In our context, postselection simply means measuring the number of photons in a given mode , and conditioning on a particular result (for example, photons, or photon). After we postselect on the number of photons in some mode, we will never use that mode for further computation.In physics language, all photon-number measurements are assumed to be “demolition” measurements. For this reason, without loss of generality, we can defer all postselected measurements until the end of the computation.
Our -hardness proof will fall out as a corollary of the following universality theorem, which is implicit in the work of KLM . Indeed, we could just appeal to the KLM construction as a “black box,” but we choose not to do so, since the properties of the construction that we want are slightly different from the properties KLM want, and we wish to verify in detail that the desired properties hold.
Postselected linear optics can simulate universal quantum computation. More concretely: there exists a polynomial-time classical algorithm that converts a quantum circuit over the gate set into a linear-optics circuit , so that
where is the number of gates in and is the standard initial state.
Proof. To encode a (qubit-based) quantum circuit by a postselected linear-optics circuit, KLM use the so-called dual-rail representation of a qubit using two optical modes. In this representation, the qubit is represented as , while the qubit is represented as . Thus, to simulate a quantum circuit that acts on qubits, we need optical modes. (We will also need additional modes to handle postselection, but we can ignore those for now.) Let the modes corresponding to qubit be labeled and respectively. Notice that the initial state in the qubit model maps onto the initial state in the optical model.
Since is a homomorphism by Lemma 2, to prove the theorem it suffices to show how to simulate the gates in . Simulating a -qubit gate is easy: simply apply the appropriate unitary transformation to the Hilbert space spanned by and . The interesting part is how to simulate a gate. To do so, KLM use another gate that they call , which applies the following unitary transformation to a single mode:
(We do not care how acts on , , and so on, since those basis states will never arise in our simulation.) Using , it is not hard to simulate on two qubits and . The procedure, shown in Figure 2, is this: first apply a Hadamard transformation to modes and .
One can check that this induces the following transformation on the state of and :
The key point is that we get a state involving photons in the same mode, if and only if the modes and both contained a photon. Next, apply gates to both and . This flips the amplitude if and only if we started with . Finally, apply a second Hadamard transformation to and , to complete the implementation of .
We now explain how to implement on a given mode , using postselection. To do so, we need two additional modes and , which are initialized to the states and respectively. First we apply the following unitary transformation to :
Then we postselect on and being returned to the state . As shown in , this postselection always succeeds with amplitude (corresponding to probability ); and that conditioned on it succeeding, the effect is to apply in mode . To prove this, observe that since the number of photons is conserved, the effect of on mode must have the form
for some . Using formula (*), we then calculate
This implies that the circuit shown in Figure 2 succeeds with amplitude (corresponding to probability ), and furthermore, we know when it succeeds.
In the proof of Theorem 3, the main reason the matrix looks complicated is simply that it needs to be unitary. However, notice that unitarity is irrelevant for our -hardness application—and if we drop the unitarity requirement, then we can replace by a simpler matrix, such as
To implement on a given mode , we would apply to as well as another mode that initially contains one photon, then postselect on still containing one photon after is applied. One can verify by calculation that the effect on mode is
where and .
Main Result
In this section we deduce the following theorem, as a straightforward consequence of Theorem 3.
In classical complexity theory, one is often more interested in various corollaries of Theorem 4: for example, that computing remains -hard even if is a nonnegative integer matrix, or a -valued matrix, or a -valued matrix. Valiant gave simple reductions by which one can deduce all of these corollaries from Theorem 4. We do not know how to use the linear-optics perspective to get any additional insight into the corollaries.
Let be a classical circuit that computes a Boolean function , and let . Then computing , given as input, is a -hard problem essentially by definition. On the other hand, it is easy to encode as an amplitude in a quantum circuit:
There exists a classical algorithm that takes a circuit as input, runs in time, and outputs a (qubit-based) quantum circuit , consisting of gates from , such that
Proof. Let be a diagonal unitary matrix whose entry is . Then since the Toffoli gate is universal for classical computation, a quantum circuit consisting of -qubit gates and Toffoli gates can easily apply . To do so, one uses the standard “uncomputing” trick:
Finally, by Lemma 1, we can simulate each of the Toffoli gates in using gates from the set .
Let be the quantum circuit from Lemma 5, and assume uses qubits. By Theorem 3, we can simulate by a linear-optics circuit such that
where is the number of gates in . Furthermore, the circuit uses optical modes. Let be the unitary matrix induced by , and let be the submatrix of obtained by taking the even-numbered rows and columns only. Then we have
where the first line follows from formula (*) and the third from Lemma 5. Since can be produced in polynomial time given , this already shows that computing to sufficient precision is -hard.
However, we still need to deal with the issue that the entries of are real numbers.Indeed, the matrices that we multiply to obtain can be complex matrices, but itself (and hence the submatrix ) will always be real. Let . Then notice that truncating the entries of to bits of precision produces a matrix such that
For this reason, we can assume that each entry of has the form for some integer . Now set . Then is an integer matrix satisfying , whose entries can be specified using bits each. This completes the proof of Theorem 4.
We conclude by noticing that our proof yields not only Theorem 4, but also the following corollary:
Proof. By the above equivalences, it suffices to show that computing is -hard. This is true because, given the ability to compute , we can determine exactly using binary search. In more detail, given a positive integer , let denote the circuit modified to contain additional inputs such that , and let denote modified to contain additional ’s such that . Then clearly
Thus we can use the following strategy: compute the signs of and so on, increasing by successive factors of , until a is found such that . At that point, we know that must be between and . Then by computing , we can decide whether is between and or between and , and so on recursively until has been determined exactly.
Corollary 6 implies, in particular, that approximating to within any multiplicative factor is -hard—since to output a multiplicative approximation, at the least we would need to know whether is positive or negative.
Using a more involved binary search strategy (which we omit), one can show that, for any , even approximating or to within a multiplicative factor of would let one compute exactly, and is therefore -hard under Turing reductions. It follows from this that approximating or to within a multiplicative factor of is -hard as well. (Aaronson and Arkhipov gave a related but more complicated proof of the -hardness of approximating and , which did not first replace with .)
Acknowledgments
I am grateful to Alex Arkhipov and Michael Forbes for helpful discussions, and to Andy Drucker, Greg Kuperberg, Avi Wigderson, Ronald de Wolf, and the anonymous reviewers for their comments.