Is it possible to "calculate" the absolute value of a permanent using Boson Sampling? - Quantum Computing Stack Exchange most recent 30 from quantumcomputing.stackexchange.com 2019-12-12T19:16:52Z https://quantumcomputing.stackexchange.com/feeds/question/2244 https://creativecommons.org/licenses/by-sa/4.0/rdf https://quantumcomputing.stackexchange.com/q/2244 16 Is it possible to "calculate" the absolute value of a permanent using Boson Sampling? user1271772 https://quantumcomputing.stackexchange.com/users/2293 2018-06-05T21:39:37Z 2018-08-16T09:03:56Z <p>In <a href="https://en.wikipedia.org/wiki/Boson_sampling" rel="noreferrer">boson sampling</a>, if we start with 1 photon in each of the first $M$ modes of an interferometer, the probability of detecting 1 photon in each output mode is: $|\textrm{Perm}(A)|^2$, where the columns and rows of $A$ are the first $M$ columns of the interferometer's unitary matrix $U$, and all of its rows.</p> <p>This makes it look like for any unitary $U$, we can construct the appropriate interferometer, construct the matrix $A$, and calculate the absolute value of the permanent of $A$ by taking the square root of the probability of detecting one photon in each mode (which we get from the boson sampling experiment). <strong><em>Is this true, or is there some catch?</em></strong> People have told me that you can't actually get information about a permanent from boson sampling.</p> <p>Also, what happens to the rest of the columns of $U$: How exactly is it that the experimental outcome only depends on the first $M$ columns of $U$ and all of its rows, but not at all on the other columns of $U$? <strong><em>Those columns of $U$ do not affect the outcome of the experiment in the first $M$ modes at all?</em></strong></p> https://quantumcomputing.stackexchange.com/questions/2244/-/2245#2245 7 Answer by DaftWullie for Is it possible to "calculate" the absolute value of a permanent using Boson Sampling? DaftWullie https://quantumcomputing.stackexchange.com/users/1837 2018-06-06T05:18:04Z 2018-06-07T06:54:08Z <p>It appears to be true, up to a point. As I read Scott Aaronson's <a href="https://arxiv.org/abs/1011.3245?context=cs" rel="noreferrer">paper</a>, it says that if you start with 1 photon in each of the first $M$ modes of an interferometer, and find the probability $P_S$ that a set $s_i$ photons is output in each mode $i\in\{1,\ldots, N\}$ where $\sum_is_i=M$, is $$P_s=\frac{|\text{Per(A)}|^2}{s_1!s_2!\ldots s_M!}.$$ So, indeed, if you take a particular instance where $s_i=0$ or 1 for every possible output, then, yes the probability is equal to the permanent of $A$, where $A$ is the first $M$ columns of $U$ and a specific subset of $M$ rows specified by the locations $s_i=1$. So, this is not quite as specified in the question: it is not all rows, but only some subset, so that $A$ is a square matrix, corresponding to the bits that the experiment "sees", i.e. the input rows and output rows. The photons never populate anything else, and so are blind to the other elements of the unitary matrix $U$.</p> <p>This should be fairly obvious. Let's say I have some $3\times 3$ matrix $V$. If I start in some basis state $|0\rangle$ and find its product, $V|0\rangle$, then knowing that tells me very little about the outputs $V|1\rangle$ and $V|2\rangle$, aside from what can be said from the knowledge that $V$ is unitary, and hence columns and rows are orthonormal.</p> <p>The issue that one must be careful of is the accuracy: you run this once and all you get is a single sample according to the probability distribution $P_s$. You run this a few times, and you start to build up information about the different probabilities. You run this enough times, and you can get an arbitrarily accurate answer, but how many is enough? There are two different ways that you can measure the error in an estimate of a value $p$. You can demand either an additive error $p\pm\epsilon$ or a multiplicative error, $p(1\pm\epsilon)$. Since we expect that a typical probability will be exponentially small in $n+m$, the multiplicative error demands far greater accuracy, which cannot be achieved efficiently via sampling. On the other hand, the additive error approximation can be achieved.</p> <p>While a multiplicative error is what people <em>usually</em> want to calculate, the additive error can also be an interesting entity. For example, in the evaluation of the <a href="https://arxiv.org/abs/quant-ph/0511096" rel="noreferrer">Jones polynomial</a>.</p> <p>Aaronson points us back further in time for where this connection between Boson sampling and the Permanent was first made:</p> <blockquote> <p>It has been known since work by <a href="https://link.springer.com/article/10.1007/BF02781659" rel="noreferrer">Caianiello</a> in 1953 (if not earlier) that the amplitudes for $n$-boson processes can be written as the permanents of $n\times n$ matrices.</p> </blockquote> <p>Instead, their main contribution</p> <blockquote> <p>is to prove a connection between the ability of classical computers to solve the approximate BosonSampling problem and their ability to approximate the permanent</p> </blockquote> <p>i.e. to understand the approximation problem associated with, e.g. finite sampling, and to describe the computational complexity consequences associated: that we believe such a thing is hard to evaluate classically.</p> https://quantumcomputing.stackexchange.com/questions/2244/-/2246#2246 6 Answer by glS for Is it possible to "calculate" the absolute value of a permanent using Boson Sampling? glS https://quantumcomputing.stackexchange.com/users/55 2018-06-06T10:56:51Z 2018-08-16T09:03:56Z <p>You cannot <em>efficiently</em> recover the absolute values of the amplitudes, but if you allow for arbitrary many samples, then you can estimate them to whatever degree of accuracy you like.</p> <p>More specifically, if the input state is a single photon in each of the first $n$ modes, and one is willing to draw an arbitrary number of samples from the output, then it is in principle possible to estimate the permanent of $A$ to whatever degree of accuracy one likes, by counting the fraction of the times the $n$ input photons come out in the first $n$ different output ports. It is to be noted though that this does not really have much to do with BosonSampling, as the hardness result holds in the regime of the number of modes much larger than the number of photons, and it's about the efficiency of the sampling.</p> <h1>BosonSampling</h1> <p>I'll try a very brief introduction to what boson sampling is, but it should be noted that I cannot possibly do a better job at this than Aaronson himself, so it's probably a good idea to have a look at the related blog posts of his (e.g. <a href="https://www.scottaaronson.com/blog/?p=473" rel="nofollow noreferrer">blog/?p=473</a> and <a href="https://www.scottaaronson.com/blog/?p=1177" rel="nofollow noreferrer">blog/?p=1177</a>), and links therein.</p> <p>BosonSampling is a <em>sampling</em> problem. This can be a little bit confusing in that people are generally more used to think of problems having definite answers. A sampling problem is different in that the solution to the problem is <em>a set of samples</em> drawn from some probability distribution.</p> <p>Indeed, the problem a boson sampler solves is that of <em>sampling</em> from a specific probability distribution. More specifically, <em>sampling</em> from the probability distribution of the possible outcome (many-boson) states.</p> <p>Consider as a simple example a case with 2 photons in 4 modes, and let's say we fix the input state to be $(1,1,0,0)\equiv|1,1,0,0\rangle$ (that is, a single photon in each of the two first two input modes). Ignoring the output states with more than one photon in each mode, there are $\binom{4}{2}=6$ possible output two-photon states: $(1,1,0,0), (1,0,1,0), (1,0,0,1), (0,1,1,0), (0,1,0,1)$ and $(0,0,1,1)$. Let us denote for convenience with $o_i, i=1,.,6$ the $i$-th one (so, for example, $o_2=(1,0,1,0)$). Then, a possible solution to BosonSampling could be the series of outcomes: $$o_1, o_4, o_2, o_2, o_5.$$</p> <p>To make an analogy to a maybe more familiar case, it's like saying that we want to sample from a Gaussian probability distribution. This means that we want to find a sequence of numbers which, if we draw enough of them and put them into a histogram, will produce something close to a Gaussian.</p> <h1>Computing permanents</h1> <p>It turns out that the probability amplitude of a given input state $|\boldsymbol r\rangle$ to a given output state $|\boldsymbol s\rangle$ is (proportional to) the <a href="https://en.wikipedia.org/wiki/Permanent_(mathematics)" rel="nofollow noreferrer">permanent</a> of a suitable matrix built out of the unitary matrix characterizing the (single-boson) evolution.</p> <p>More specifically, if $\boldsymbol R$ denotes the <em>mode assignment list</em>${}^{(1)}$ associated to $|\boldsymbol r\rangle$, $\boldsymbol S$ that of $|\boldsymbol s\rangle$, and $U$ is the unitary matrix describing the evolution, then the probability amplitude $\mathcal A(\boldsymbol r\to\boldsymbol s)$ of going from $|\boldsymbol r\rangle$ to $|\boldsymbol s\rangle$ is given by $$\mathcal A(\boldsymbol r\to\boldsymbol s) = \frac{1}{\sqrt{\boldsymbol r!\boldsymbol s!}} \operatorname{perm} U[\boldsymbol R|\boldsymbol S],$$ with $U[\boldsymbol R|\boldsymbol S]$ denoting the matrix built by taking from $U$ the rows specified by $\boldsymbol R$ and the columns specified by $\boldsymbol S$.</p> <p>Thus, considering the fixed input state $|\boldsymbol r_0\rangle$, the probability distribution of the possible outcomes is given by the probabilities $$p_{\boldsymbol s} = \frac{1}{\boldsymbol r_0! \boldsymbol s!} \lvert \operatorname{perm}U[\boldsymbol R|\boldsymbol S] \rvert^2.$$</p> <p>BosonSampling is the problem of drawing "points" according to this distribution.</p> <p><strong><em>This is not the same as computing the probabilities $p_s$</em></strong>, or even computing the permanents themselves. Indeed, <a href="https://en.wikipedia.org/wiki/Boson_sampling#The_complexity_of_the_problem" rel="nofollow noreferrer">computing the permanents of complex matrices is hard</a>, and it is not expected even for quantum computers to be able to do it efficiently.</p> <p>The gist of the matter is that <em>sampling from a probability distribution</em> is in general easier than <em>computing the distribution itself</em>. While a naive way to sample from a distribution is to compute the probabilities (if not already known) and use those to draw the points, there might be smarter ways to do it. A boson sampler is something that is able to draw points according to a specific probability distribution, <strong><em>even though the probabilities making up the distribution itself are not known</em></strong> (or better said, not efficiently computable).</p> <p>Furthermore, while it may look like the ability to efficiently <em>sample</em> from a distribution should translate into the ability of efficiently estimating the underlying probabilities, this is not the case as soon as there are exponentially many possible outcomes. This is indeed the case of boson sampling with uniformly random unitaries (that is, the original setting of BosonSampling), in which there are $\binom{m}{n}$ possible $n$-boson in $m$-modes output states (again, neglecting states with more than one boson in some mode). For $m\gg n$, this number increases exponentially with $n$. This means that, in practice, you would need to draw an exponential number of samples to even have a decent chance of seeing a single outcome more than once, let alone estimate with any decent accuracy the probabilities themselves (it is important to note that this is not the core reason for the hardness though, as the exponential number of possible outcomes could be overcome with smarter methods).</p> <p>In some particular cases, it is possible to efficiently estimate the permanent of matrices using a boson sampling set-up. This will only be feasible if one of the submatrices has a large (i.e. not exponentially small) permanent associated with it, so that the input-output pair associated with it will happen frequently enough for an estimate to be feasible in polynomial time. This is a very atypical situation, and will not arise if you draw unitaries at random. For a trivial example, consider matrices that are very close to identity - the event in which all photons come out in the same modes they came in will correspond to a permanent which can be estimated experimentally. Besides only being feasible for some particular matrices, a careful analysis of the statistical error incurred in evaluating permanents in this way shows that this is not more efficient than known classical algorithms for approximating permanents (technically, within a small additive error) ${}^{(2)}$.</p> <h1>Columns involved</h1> <p>Let $U$ be the unitary describing the one-boson evolution. Then, basically by definition, the output amplitudes describing the evolution of a <em>single</em> photon entering in the $k$-th mode are in the $k$-th column of $U$.</p> <p>The unitary describing the evolution of the <em>many-boson</em> states, however, is not actually $U$, but a bigger unitary, often denoted by $\varphi_n(U)$, whose elements are computed from permanents of matrices built out of $U$.</p> <p>Informally speaking though, if the input state has photons in, say, the first $n$ modes, then naturally only the first $n$ columns of $U$ must be necessary (and sufficient) to describe the evolution, as the other columns will describe the evolution of photons entering in modes that we are not actually using.</p> <hr> <p>(1) This is just another way to describe a many-boson state. Instead of characterizing the state as the list of <em>occupation numbers</em> for each mode (that is, number of bosons in first mode, number in second, etc.), we characterize the states by naming the mode occupied by each boson. So, for example, the state $(1, 0, 1, 0)$ can be equivalently written as $(1, 3)$, and these are two equivalent ways to say that there is one boson in the first and one boson in the third mode.</p> <p>(2): S. Aaronson and T. Hance. "Generalizing and Derandomizing Gurvits's Approximation Algorithm for the Permanent". <a href="https://eccc.weizmann.ac.il/report/2012/170/" rel="nofollow noreferrer">https://eccc.weizmann.ac.il/report/2012/170/</a></p>