## Abstract

Boson Sampling is a task that is conjectured to be computationally hard for a classical computer, but which can be efficiently solved by linear-optical interferometers with Fock state inputs. Significant advances have been reported in the last few years, with demonstrations of small- and medium-scale devices, as well as implementations of variants such as Gaussian Boson Sampling. Besides the relevance of this class of computational models in the quest for unambiguous experimental demonstrations of quantum advantage, recent results have also proposed the first applications for hybrid quantum computing. Here, we introduce the adoption of non-linear photon–photon interactions in the Boson Sampling framework, and analyze the enhancement in complexity via an explicit linear-optical simulation scheme. By extending the computational expressivity of Boson Sampling, the introduction of non-linearities promises to disclose novel functionalities for this class of quantum devices. Hence, our results are expected to lead to new applications of near-term, restricted photonic quantum computers.

### Similar content being viewed by others

## Introduction

Quantum technologies promise to provide speed-up in several fields, ranging from intrinsically secure long-distance quantum communication^{1} to a novel generation of high-precision sensors^{2}, and enhanced computational and simulation capabilities^{3}. Among the currently developed experimental platforms, in the last few years, photonic technologies have recently experienced a technological boost in all fundamental components, namely photon sources, manipulation, and detection^{4}.

Recent studies have focused on identifying suitable dedicated classically-hard tasks, with the aim of leveraging the necessary technological resources and system size to reach the quantum advantage regime^{5,6}. Such a regime corresponds to the scenario where a quantum device solves a given task faster than any classical counterpart. Within this context, a computational problem named Boson Sampling^{7} has been defined as a promising approach. This problem, which consists of sampling from the output distribution of a system of *n* non-interacting bosons undergoing linear evolution, is a classically-hard task (in *n*) while it can be naturally solved by a linear-optical photonic system. Such sampling problem has also subsequently inspired other classes of sampling problems^{8,9} suitable to be solved with different quantum hardware^{5,10,11}.

Starting from the original proposal^{7}, several experimental implementations of Boson Sampling instances^{12,13,14,15,16,17,18,19,20,21,22,23} and of recently proposed variants^{24,25,26,27,28} have been reported^{29}. In particular, hybrid algorithms based on Gaussian Boson Sampling have been proposed for various tasks: quantum simulation^{27,30,31,32,33}, optimization problems^{34}, point processes^{35} graph theory^{36,37,38}, and quantum optical neural networks^{39}. Very recently, impressive experimental implementations of Gaussian Boson Sampling have been reported^{6,40}. Besides the technological advances reported in the last few years, several studies have also focused on studying and improving the classical simulation of Boson Sampling^{41,42,43,44,45,46}, and on defining the limits for simulability in the presence of imperfections, in particular losses and partial photon distinguishability^{47,48,49,50,51,52,53,54}. All these studies aimed at establishing a classical benchmarking framework for Boson Sampling, and currently place the threshold for quantum advantage in such a system to *n* ~50 photons in a network composed of *m* ~ *n*^{2} = 2500 optical modes. Recent improvements in photon sources^{55,56,57,58,59,60} enabled the first Boson Sampling experiments with a number of detected photons up to *n* = 14^{23}. However, reaching the quantum advantage regime with a photonic platform solving the original formulation of the task^{7} still requires a technological leap to enhance single-photon generation rates and indistinguishability, and to reduce losses in the current platforms for linear-optical networks.

Here, we introduce the adoption of non-linear interactions at the few-photon level within the Boson Sampling framework as a route to increase the complexity and reduce the threshold for the quantum advantage regime. This possibility is encouraged by recent advances showing the first experimental demonstrations of non-linear photonic processes with ultra-cold atoms^{61,62,63,64,65} and solid-state devices^{66,67}. We will first describe the introduction of non-linearities within the otherwise linear evolution. Then, we will provide an upper bound on the complexity of the enhanced devices via a simulation scheme based on auxiliary, linear-optical gadgets. We will discuss both the asymptotic and finite cases, leveraging results from the well-established linear Boson Sampling framework^{7}.

## Results

### Boson Sampling

Boson Sampling^{7} is a computational task that corresponds to sampling from the output distribution of *n* indistinguishable, non-interacting photons after evolution through an *m*-mode linear network [see Fig. 1a]. Given an interferometer described by a unitary matrix *U*, the transition amplitude from input \(\left\vert S\right\rangle\) to output state \(\left\vert T\right\rangle\) can be written as:

where \({{{\rm{per}}}}(A)={\sum }_{\sigma \in {S}_{n}}\mathop{\prod }\nolimits_{i = 1}^{n}{a}_{i,\sigma (i)}\) is the matrix permanent, {*s*_{i}}({*t*_{i}}) are the occupation numbers of states \(\left\vert S\right\rangle (\left\vert T\right\rangle )\), and *U*_{S,T} is the *n* × *n* matrix obtained by selecting rows and columns of *U* according to the (*s*_{1}, …, *s*_{m}) and (*t*_{1}, …, *t*_{m}) respectively. Calculation of permanents of matrices with complex entries is in the #P-hard computational complexity class^{68}. In Eq. (1), *φ*(*U*) is the unitary transformation acting on the Hilbert space \({{{{\mathcal{H}}}}}_{m,n}\) of *n* photons in *m* modes, that corresponds to the linear evolution *U* in the optical modes. Due to the linearity of the evolution, *φ*(*U*) is an homomorphism^{69}. This means that, if a given evolution is the sequence of two linear networks *W* and *V*, the overall evolution can be written in terms of permanent of submatrices of *U* = *V**W*.

In ref. ^{7} it was shown that sampling (even approximately) from the output distribution of such a system is classically hard if (i) the input state \(\left\vert S\right\rangle =\left\vert {s}_{1},\ldots {s}_{m}\right\rangle\) has at most one photon per mode, (ii) *U* is drawn randomly from the uniform Haar measure, and (iii) the number of modes *m* and photons *n* satisfy *m* ≫ *n*^{6}.

### Non-linear Boson Sampling

Let us now consider the scheme of Fig. 1b. An input state \(\left\vert S\right\rangle =\left\vert {s}_{1},\ldots {s}_{m}\right\rangle\) of *n* indistinguishable photons undergoes an *m*-mode evolution divided into three steps. While steps 1 and 3 are linear evolutions *V* and *W* drawn from the Haar ensemble, the intermediate step 2 now consists of a non-linear evolution *N*. This *N* transforms a state \(\left\vert R\right\rangle =\left\vert {r}_{1},\ldots {r}_{m}\right\rangle\) as \(\left\vert R\right\rangle \mathop{\to }\limits^{N}{\sum }_{Q\in {{{\Phi }}}_{m,n}}{{{{\mathcal{N}}}}}_{{r}_{1}\ldots {r}_{m}}^{{q}_{1}\ldots {q}_{m}}\left\vert Q\right\rangle\), where \(\left\vert Q\right\rangle =\left\vert {q}_{1},\ldots {q}_{m}\right\rangle\) and Φ_{m,n} is the set of tuples corresponding to *n* photons in *m* modes. In this equation, function \({{{{\mathcal{N}}}}}_{{r}_{1}\ldots {r}_{m}}^{{q}_{1}\ldots {q}_{m}}\) represents the transition amplitude \({{{{\mathcal{A}}}}}_{N}(\left\vert R\right\rangle \to \left\vert Q\right\rangle )\) determined by the non-linear evolution. We assume \({{{{\mathcal{N}}}}}_{{r}_{1}\ldots {r}_{m}}^{{q}_{1}\ldots {q}_{m}}\) has an efficient classical description, e.g., it is given by the composition of a small number of few-mode non-linear transformations, or by a Hamiltonian with a simple form in terms of the field operators.

Let us now write the overall transformation of the input state \(\left\vert S\right\rangle =\left\vert {s}_{1},\ldots {s}_{m}\right\rangle\) according to the three-step evolution *W* → *N* → *V*, which includes linear transformations *W*, *V* of the form given by Eq. (1), and the non-linear \({{{{\mathcal{N}}}}}_{{r}_{1}\ldots {r}_{m}}^{{q}_{1}\ldots {q}_{m}}\):

The detailed derivation is reported in Supplementary Note 1.

This amplitude is written as a Feynman path sum over all possible basis states just before and after the non-linear evolution step. If the permanent distribution was peaked, it might be possible to obtain a good approximation to Eq. (2) by summing over only the dominant terms. Haar-random matrices, however, display an anti-concentrated, relatively flat distribution^{7}. In Supplementary Note 2 and Supplementary Fig. 1, we provide numerical evidence for this, showing that to account for (90, 95, and 99%) of the total probability mass function, we need to calculate the probabilities associated with respective fractions ~(0.5, 0.6, 0.8) of all possible outcomes; moreover, this behavior is nearly independent of *n* and *m*.

Of course, there may be computational shortcuts to evaluating Eq. (2), other than the explicit sum over paths. For example, if we replace the non-linear term *N* with a linear term, the amplitude can be evaluated as a single permanent. This motivates us to investigate different ways to assess the complexity of non-linear Boson Sampling.

### Single-mode non-linear phase shift gate

Let us proceed by studying a specific example of non-linear evolution *N* consisting of a single non-linear phase gate introduced in mode *x*. Non-linear phase gates are among the simplest photon number preserving non-linear gates, implemented in various systems^{61,62,63,64,65,66}, and for which strict bounds on the success probability are known^{70}. The unitary operator describing this gate can be written as \({\hat{U}}_{{{{\rm{nlp}}}}}=\exp (-\imath {\hat{n}}_{x}^{2}\phi )\). Its action on a generic *m*-mode state \(\left\vert R\right\rangle\) leads to a function \({{{\mathcal{N}}}}\) of the form \({{{{\mathcal{N}}}}}_{{r}_{1}\ldots {r}_{m}}^{{q}_{1}\ldots {q}_{m}}=\exp (-\imath {r}_{x}^{2}\phi )\mathop{\prod }\nolimits_{i = 1}^{m}{\delta }_{{r}_{i},{q}_{i}}.\) Inserting this choice of non-linear evolution into the general expression (2), we obtain:

Eq. (3) can be rearranged in the following form (see Supplementary Note 3):

Here, \(\bar{U}\) is a unitary transformation composed of the sequence *W*, *F*, and *V*, where *F* replaces the non-linear phase in layer *N* with a linear phase shift described by the operator \(\exp (-\imath {\hat{n}}_{x}\phi )\). Equation (4) clearly shows that the departure from linear evolution is due only to bunching terms with more than a single photon in mode *x* (see Supplementary Note 4 and Supplementary Figs. 2–5).

### Linear-optical simulation using auxiliary photons

A linear-optical scheme for the simulation of non-linear Boson Sampling can be obtained starting from the results due to Scheel et al. These results, reported in ref. ^{71}, describe how auxiliary photons and modes can be used, together with linear optics, to induce effective non-linear gates. In particular, given a single mode state in the photon number basis \(\left\vert {\psi }_{{{{\rm{in}}}}}\right\rangle ={\sum }_{i}{c}_{i}\left\vert i\right\rangle\), it is possible to apply a polynomial of degree *k* in the photon number operator \({P}_{k}(\hat{n})\) to \(\left\vert {\psi }_{{{{\rm{in}}}}}\right\rangle\) by injecting the state in mode 1 of a suitably chosen (*k* + 1)-mode linear-optical gadget described by unitary *U*_{eff}, where the auxiliary modes *j* = 2, …, *k* + 1 are injected with a single-photon state \({\left\vert 1\right\rangle }_{j}\). The desired output state \(\left\vert {\psi }_{{{{\rm{out}}}}}\right\rangle ={P}_{k}(\hat{n})\left\vert {\psi }_{{{{\rm{in}}}}}\right\rangle\) is obtained upon conditional detection of a single photon on each of the auxiliary modes. If the input state has a maximum number of *l* photons \(\left\vert {\chi }_{{{{\rm{in}}}}}\right\rangle ={c}_{0}\left\vert 0\right\rangle +\ldots +{c}_{l}\left\vert l\right\rangle\), a polynomial of degree *l* in \(\hat{n}\) is sufficient to obtain the general evolution from \(\left\vert {\chi }_{{{{\rm{in}}}}}\right\rangle\) to \(\left\vert {\chi }_{{{{\rm{out}}}}}\right\rangle ={c}_{0}^{{\prime} }\left\vert 0\right\rangle +\ldots +{c}_{l}^{{\prime} }\left\vert l\right\rangle\) with arbitrary coefficients \(\{{c}_{0}^{{\prime} },\ldots ,{c}_{l}^{{\prime} }\}\). The effective evolution induced by this method must be some degree-*l* polynomial in \(\hat{n}\), though it remains an open question whether *any* degree-*l* polynomial can be implemented using only *l* auxiliary photons. This can be shown to hold for *l* = 2. Suppose we have some input \(\left\vert {\chi }_{{{{\rm{in}}}}}\right\rangle ={c}_{0}\left\vert 0\right\rangle +{c}_{1}\left\vert 1\right\rangle +{c}_{2}\left\vert 2\right\rangle\). All *c*_{i} must be phases. Phase *c*_{0} can be fixed by an overall global phase, and the phase *c*_{1} can be fixed by applying a (linear) phase shifter. As shown in Supplementary Note 5, there is a gadget that implements any chosen value of *c*_{2}. Combining these facts, it follows that any non-linear phase acting on states with, at most, two photons can be simulated by using two auxiliary photons. The success probability of the operation is equal to \({\Pr }_{{{{\rm{succ}}}}}=| {{{\rm{per}}}}({U}_{{{{\rm{eff}}}}}^{0,1,\ldots ,1}){| }^{2}\)^{71}, where \({U}_{{{{\rm{eff}}}}}^{0,1,\ldots ,1}\) is the *k* × *k* submatrix of *U*_{eff} obtained by removing row 1 and column 1 from the full matrix.

Finding the effective linear-optical simulation unitary *U*_{eff} has been done previously only for a few types of gates and small *k*^{71,72,73,74}, as the computational effort seems to scale exponentially with *k*. Nevertheless, even limited non-linear gate simulations can be quite versatile, as it is known that almost any non-linear gate can be combined with linear optics to generate arbitrary non-linear gates^{75}—for details, see Supplementary Note 5.

In Fig. 2, we describe the linear-optical, post-selection-based gadget that can be used to simulate single-mode non-linear gates. We see that the *k*-mode linear-optical gadget (with *k* ≤ *n*) replaces the single-mode non-linear gate. In the gadget, mode *x* and the *k* single photons undergo the effective unitary *U*_{eff}. This linear-optical simulation approximates the non-linear Boson Sampling evolution upon detection of *k* photons at the auxiliary output modes.

### Bounding complexity via classical simulation algorithms

An upper bound on the complexity of non-linear Boson Sampling can be obtained by devising a specific classical simulation algorithm. We define such an algorithm starting from the linear-optical gadget described above. We discuss below the specific case of a single-mode non-linear phase.

Using the state-of-the-art weak classical simulation algorithm of Clifford and Clifford^{42}, we can simulate the enlarged (*n* + *k*, *m* + *k*) linear-optical system, post-selecting only those events where a single photon is measured in each of the auxiliary modes (*m* + 1, …, *m* + *k*) (see Methods, Supplementary Note 5 and Supplementary Figs. 7–13 for more details). This results in a classical simulation algorithm for the non-linear Boson Sampling experiment.

Let us now discuss some issues that arise when using this scheme to simulate non-linear Boson Sampling in either the asymptotic regime of large numbers of photons/modes, or in the finite setting.

### Non-linearities in the asymptotic setting

Assuming uniformly drawn, Haar-random interferometer unitaries, it has been shown that the appropriate scaling between the original number of modes *m* and the number of photons *n* will result in asymptotic suppression of multi-photon collisions. More precisely: if *m* = *O*(*n*^{j/(j−1)}), then (*j* + 1)-fold collisions are suppressed, when *n*, *m* go to infinity^{76}. In particular, this will be true for the photon occupation numbers at the non-linear gates. So, by choosing *m* = *O*(*n*^{k/(k+1)}), at most *k* photons will asymptotically be present at each non-linear gate, which means the linear-optical simulation (or classical simulation based on it) can be done with only *k* auxiliary photons per non-linear gate. As we will soon show, such a simulation for small *k*, e.g., *k* = 2, 3, 4 can be readily obtained. These simulations using *k* = 2 are sufficient for an asymptotically perfect simulation for the usual Boson Sampling regime of *m* = *O*(*n*^{2}). In other words, in this setting, there is a precise correspondence between one single-mode non-linear phase gate and two extra auxiliary photons. More generally, the scaling of *m* with *n* dictates how many auxiliary photons are needed for an asymptotically perfect simulation of a non-linear phase gate *N*.

### Non-linearities in the finite setting

The setting with finite *n*, *m* is experimentally relevant, and in this case, there will be no strict suppression of multi-photon collisions at the nonlinear gates. Setting *k* = *n* results in an exact classical simulation of non-linear Boson Sampling. When *k* < *n*, we will have only an approximate simulation. As an example, when *m* ~ *n*^{2} numerical results suggest that a number of auxiliary photons equal to *k* = 2, 3 should provide a sufficiently accurate simulation given the large effective suppression of bunching at the output of Haar-random unitaries (see Supplementary Note 5).

There are two main features that increase the simulation complexity. First, finding an effective unitary *U*_{eff} that uses *k* photons for a linear-optical simulation seems to require the computation of permanents of *k* × *k* matrices^{71} (see also Supplementary Note 5), which results in a classical runtime that increases exponentially with *k*. The other cost incurred is the post-selection overhead. From all the simulated events on the enlarged linear-optical set-up with (*n* + *k*) photons, we only use events where the *k* auxiliary photons were detected at the linear-optical simulation gadget. This will happen with a probability \({\Pr }_{{{{\rm{succ}}}}}=| {{{\rm{per}}}}({U}_{{{{\rm{eff}}}}}^{0,1,\ldots ,1}){| }^{2}=p\). There is some evidence that the maximum value of *p* tends to decrease as *k* increases^{70}. This post-selection overhead arises when using the fast algorithm by Clifford and Clifford^{42} to classically draw samples from the linear-optical equivalent scheme. This overhead can be reduced by considering an adaption of the first algorithm reported in ref. ^{42}. Such an algorithm, with a slower runtime, can be modified to condition the first *k* events to occur in a specific set of modes. Finally, in Supplementary Note 6, we provide evidence that this post-selection overhead can be converted to a constant factor by adapting the classical Metropolised Independent Sampling approach^{41} via an appropriate choice of the candidate mockup distribution. This suggests that it is possible to define classical algorithms that, leveraging on the post-selected linear-optical scheme, can sample by calculating a (constant) number of permanents of matrices with size (*n* + *k*), with a simulation cost of *O*((*n* + *k*)2^{n+k}).

We have performed classical simulations of non-linear Boson Sampling with a single non-linear phase in the finite setting, using the classical algorithm based on linear-optical simulation. The results are shown in Fig. 3 and in Supplementary Fig. 13. As expected, having *k* = *n* results in exact sampling from the non-linear process, and in fact (once the appropriate gadget *U*_{eff} has been determined), is numerically found to be more computationally effective than directly using Eq. (2). For fixed *n*, *k*, note that the simulation error decreases with increasing *m*, since bunching events become rarer. These results suggest that the crucial parameter for the simulation complexity is the scaling between *n* and *m*. The regime when *m* = *O*(*n*) is particularly interesting, as there is a trade-off between a faster classical simulation algorithm^{46}, and the increased complexity required to find the linear-optical gadget unitary *U*_{eff} for larger *k*.

If the number of auxiliary photons *k* < *n*, the simulation scheme based on linear-optical gadgets will be only approximate, due to non-linear dynamics of more than *k* photons. The key open point in this scenario is to quantify the simulation error incurred. In Fig. 3, we provide a numerical study on how the simulation error depends on *n*, *m*, *k*, as quantified by the total variation distance (TVD) between the exact non-linear evolution and its simulation using *k* < *n* auxiliary photons. We observe a strong correlation between the TVD and the probability of bunching at the non-linearity site *x*. An open interesting research question is to obtain a quantitative description of this dependence between TVD and bunching, for instance, by using bounds on bunching in the uniformly random, Haar ensemble of unitaries.

## Discussion

We have proposed the adoption of non-linear gates within the framework of Boson Sampling as a way to increase the computational complexity of the model. We have shown how to define a hardware-based linear-optical simulation for non-linear Boson Sampling. Furthermore, we upper-bounded the complexity of non-linear Boson Sampling by tailoring a classical simulation algorithm using parallelism to linear optics and post-selection. For large numbers *m* of modes and *n* of photons, suppressed bunching allows asymptotically perfect simulation at the cost of two extra photons per non-linear phase gate introduced, if we assume *m* = *O*(*n*^{2}). For finite *m*, *n*, and single-mode non-linear phase gates, we identify the probability of bunching, governed by the scaling of *m* as a function of *n*, as the key factor affecting the complexity of our proposed simulation scheme.

The non-linear Boson Sampling model we propose is inherently more expressive than linear Boson Sampling. In light of the recent developments regarding the first application of Boson Sampling and its variants for hybrid quantum computational models, we expect that having access to increased functionalities enabled by non-linearities can be turned into a useful advantage for tasks solvable with linear Boson Sampling, as well as propose altogether new tasks solvable by noisy, intermediate-scale quantum (NISQ) devices. Looking at the longer term, it is known that a constant number of initial layers of non-linear gates suffice to create a photonic cluster state and enable universal photonic quantum computation. Our results are an initial step towards understanding the increase in complexity as we start this transition from the linear to the non-linear regime in photonic quantum computation. Some promising architectures for scalable photonic quantum computation^{77} rely exactly on measurement-induced non-linearities of the type we investigate here.

Finally, an important question that we leave open is the effect of imperfections—such as losses and partial distinguishability—on this model. Modelling these effects is likely to be more intricate in non-linear Boson Sampling than in the standard Boson Sampling proposal. Losses, in particular, are usually assumed to occur at the input or output of the interferometer (at least as long as they can be assumed to affect all modes equally), but that assumption is less benign when non-linear elements are involved. Some versions of it would be easy to recover for the particular case of \({\hat{U}}_{{{{\rm{nlp}}}}}\) we consider here, but not in the more general case of many non-linear and linear interspersed elements.

## Methods

### Classical simulation algorithms for non-linear Boson Sampling

The scheme of Fig. 2 employs a set of ancillary photons and modes, and an auxiliary transformation *U*_{eff} that depends on the nonlinear transformation. This scheme defines both a linear-optical simulation algorithm, which can be implemented by building the corresponding experimental apparatus and thus running the device, and an approach for the classical simulation. We describe here this approach for the classical simulation (more details can be found in Supplementary Notes 5, 6).

#### Algorithm 1

The second algorithm reported in ref. ^{42}, which provides a classical simulation of linear Boson Sampling with a cost of *O*(*n*2^{n} + poly(*m*, *n*)) and *O*(*m*) additional space, can be employed for the approximate simulation of non-linear Boson Sampling. In particular, given a level of approximation provided by the number *k* of ancillary photons and modes, one can (i) calculate the effective (*m* + *k*) × (*m* + *k*) transformation comprising the sequence of *W*, *U*_{eff}, and *V*, (ii) sample an event via the second algorithm of ref. ^{42}, and (iii) check whether the sample corresponds to a valid outcome considering the post-selection requirements from the linear gadget. If the sample is not valid, iterate point (ii) until a correct outcome is drawn. As discussed above, this implies that the algorithm has a success probability given by Pr_{succ}.

#### Algorithm 2

The first algorithm reported in ref. ^{42} for linear Boson Sampling, having a cost of *O*(*m**n*3^{n}), can be adapted to a conditional scenario. More specifically, if one needs to retain only events where photons on modes (*r*_{1}, …, *r*_{l}) are detected, this is obtained by forcing the sampling process to start directly from taking the required vector of output modes as the starting point. Then, the remaining modes are sampled by using the procedure of the first algorithm of ref. ^{42}. The requirement to discard part of the events to avoid multiple occurrences in the conditional modes introduces a failure probability \({\overline{p}}_{{{{\rm{fail}}}}}\) for this sampling process. In Supplementary Note 6A, we analyzed the scaling of the failure probability \({\overline{p}}_{{{{\rm{fail}}}}}\).

#### Algorithm 3

The metropolised independent sampling algorithm, applied in ref. ^{41} in the Boson Sampling context, can be adapted to the conditional scenario required for classical simulation of non-linear Boson Sampling exploiting the scheme of Fig. 2. The main idea behind the metropolised independent sampling approach is to construct a Markov chain process. At each step, a candidate sample, generated via a given mockup distribution, is accepted with a certain probability that depends on the probability mass function of Boson Sampling and of the mockup. Adaptation to the conditional scenario can be performed by choosing as a mockup a conditional uniform sampler, that generates samples from the uniform distribution with the correct outcome in the required modes for post-selection. In Supplementary Note 6B, we analyze the scaling of the relevant parameters for this approach.

## Data availability

The data that support the findings of this study can be made available by the corresponding author, upon reasonable request.

## Code availability

The code used to generate the numerical results presented in this paper can be made available from the corresponding author upon reasonable request.

## References

Yin, J. et al. Satellite-based entanglement distribution over 1200 kilometers.

*Science***356**, 1140–1144 (2017).Giovannetti, V., Lloyd, S. & Maccone, L. Advances in quantum metrology.

*Nat. Photonics***5**, 222–229 (2011).Nielsen, M. & Chuang, I.

*Quantum Computation and Quantum Information*(Cambridge Univ. Press, 2010).Flamini, F., Spagnolo, N. & Sciarrino, F. Photonic quantum information processing: a review.

*Rep. Prog. Phys.***82**, 016001 (2019).Arute, F. et al. Quantum supremacy using a programmable superconducting process.

*Nature***574**, 505–511 (2019).Zhong, H.-S. et al. Quantum computational advantage using photons.

*Science***370**, 1460–1463 (2020).Aaronson, S. & Arkhipov, A. The computational complexity of linear optics. In

*Proc. 43rd annual ACM symposium on Theory of Computing*333–342 (Association for Computing Machinery, 2011).Boixo, S. et al. Characterizing quantum supremacy in near-term devices.

*Nat. Phys.***14**, 595–600 (2018).Harrow, A. W. & Montanaro, A. Quantum computational supremacy.

*Nature***549**, 203–209 (2017).Bernien, H. et al. Probing many-body dynamics on a 51-atom quantum simulator.

*Nature***551**, 579–584 (2017).Neill, C. et al. A blueprint for demonstrating quantum supremacy with superconducting qubits.

*Science***360**, 195–199 (2018).Broome, M. A. et al. Photonic boson sampling in a tunable circuit.

*Science***339**, 794–798 (2013).Spring, J. B. et al. Boson sampling on a photonic chip.

*Science***339**, 798–801 (2013).Tillmann, M. et al. Experimental boson sampling.

*Nat. Photonics***7**, 540–544 (2013).Crespi, A. et al. Integrated multimode interferometers with arbitrary designs for photonic boson sampling.

*Nat. Photonics***7**, 545–549 (2013).Spagnolo, N. et al. Experimental validation of photonic boson sampling.

*Nat. Photonics***8**, 615–620 (2014).Carolan, J. et al. On the experimental verification of quantum complexity in linear optics.

*Nat. Photonics***8**, 621–626 (2014).Carolan, J. et al. Universal linear optics.

*Science***349**, 711–716 (2015).Loredo, J. C. et al. Boson sampling with single-photon Fock states from a bright solid-state source.

*Phys. Rev. Lett.***118**, 130503 (2017).He, Y. et al. Time-bin-encoded boson sampling with a single-photon device.

*Phys. Rev. Lett.***118**, 190501 (2017).Wang, H. et al. High-efficiency multiphoton boson sampling.

*Nat. Photonics***11**, 361–365 (2017).Wang, H. et al. Toward scalable boson sampling with photon loss.

*Phys. Rev. Lett.***120**, 230502 (2018).Wang, H. et al. Boson sampling with 20 input photons and a 60-mode interferometer in a 10

^{14}-dimensional hilbert space.*Phys. Rev. Lett.***123**, 250503 (2019).Bentivegna, M. et al. Experimental scattershot boson sampling.

*Sci. Adv.***1**, e1400255 (2015).Zhong, H.-S. et al. 12-photon entanglement and scalable scattershot boson sampling with optimal entangled-photon pairs from parametric down-conversion.

*Phys. Rev. Lett.***121**, 250505 (2018).Wang, X.-J. et al. Experimental time-resolved interference with multiple photons of different colors.

*Phys. Rev. Lett.***121**, 080501 (2018).Paesani, S. et al. Generation and sampling of quantum states of light in a silicon chip.

*Nat. Phys.***15**, 925–929 (2019).Zhong, H.-S. et al. Experimental gaussian boson sampling.

*Sci. Bull.***64**, 511–515 (2019).Brod, D. J. et al. Photonic implementation of boson sampling: a review.

*Adv. Photonics***1**, 034001 (2019).Huh, J., Guerreschi, G. G., Peropadre, B., McClean, J. R. & Aspuru-Guzik, A. Boson sampling for molecular vibronic spectra.

*Nat. Photonics***9**, 615–620 (2015).Huh, J. & Yung, M.-H. Vibronic boson sampling: Generalized gaussian boson sampling for molecular vibronic spectra at finite temperature.

*Sci. Rep.***7**, 7462 (2017).Chin, S. & Huh, J. Quantum computing for molecular vibronic spectra and gaussian boson sampling.

*J. Phys. Conf. Series***1071**, 012009 (2018).Banchi, L., Fingerhuth, M., Babej, T., Ing, C. & Arrazola, J. M. Molecular docking with gaussian boson sampling.

*Sci. Adv.***6**, eeax1950 (2020).Arrazola, J. M., Bromley, R. R. & Rebentrost, P. Quantum approximate optimization with gaussian boson sampling.

*Phys. Rev. A***98**, 012322 (2018).Jahangiri, S., Arrazola, J. M., Quesada, N. & Killoran, N. Point processes with gaussian boson sampling.

*Phys. Rev. E***101**, 022134 (2020).Arrazola, J. M. & Bromley, T. R. Using gaussian boson sampling to find dense subgraphs.

*Phys. Rev. Lett.***121**, 030503 (2018).Bradler, K., Dallaire-Demers, P.-L., Rebentrost, P., Su, D. & Weedbrook, C. Gaussian boson sampling for perfect matchings of arbitrary graphs.

*Phys. Rev. A***98**, 032310 (2018).Bradler, K., Friedland, S., Izaac, J., Killoran, N. & Su, D. Graph isomorphism and gaussian boson sampling.

*Spec. Matrices***9**, 166–196 (2021).Steinbrecher, G. R., Olson, J. P., Englund, D. & Carolan, J. Quantum optical neural networks.

*npj Quantum Inf.***5**, 60 (2019).Arrazola, J. et al. Quantum circuits with many photons on a programmable nanophotonic chip.

*Nature***591**, 54–60 (2021).Neville, A. et al. Classical boson sampling algorithms with superior performance to near-term experiments.

*Nat. Phys.***13**, 1153–1157 (2017).Clifford, P. & Clifford, R. The classical complexity of boson sampling. In

*SODA ’18: Proc*. 29^{th}*ACM-SIAM Symp. on Discrete Algorithms*146–155 (Society for Industrial and Applied Mathematics, 2018).Wu, J. et al. A benchmark test of boson sampling on Tianhe-2 supercomputer.

*Natl. Sci. Rev.***5**, 715–720 (2018).Gupt, B., Arrazola, J. M., Quesada, N. & Bromley, T. R. Classical benchmarking of gaussian boson sampling on the Titan supercomputer.

*Quantum Inf. Process.***19**, 249 (2020).Lundow, P. H. & Markström, K. Efficient computation of permanents, with applications to Boson sampling and random matrices.

*J. Comput. Phys.***455**, 110990 (2019).Clifford, P. & Clifford, R. Faster classical boson sampling. Preprint at https://arxiv.org/abs/2005.04214 (2020).

Aaronson, S. & Brod, D. J. Bosonsampling with lost photons.

*Phys. Rev. A***93**, 012335 (2015).Arkhipov, A. Bosonsampling is robust against small errors in the network matrix.

*Phys. Rev. A***92**, 062326 (2015).Leverrier, A. & Garcia-Patron, R. Analysis of circuit imperfections in bosonsampling.

*Quantum Inf. Comput.***15**, 0489–0512 (2015).Oszmaniec, M. & Brod, D. J. Classical simulation of photonic linear optics with lost particles.

*New J. Phys.***20**, 092002 (2018).García-Patrón, R., Renema, J. J. & Shchesnovich, V. Simulating boson sampling in lossy architectures.

*Quantum***3**, 169 (2019).Renema, J. J. et al. Efficient classical algorithm for boson sampling with partially distinguishable photons.

*Phys. Rev. Lett.***120**, 220502 (2018).Renema, J. J., Shchesnovich, V. & García-Patrón, R. Classical simulability of noisy boson sampling. Preprint at https://arxiv.org/abs/1809.01953 (2018).

Qi, H., Brod, D. J., Quesada, N. & Garcia-Patron, R. Regimes of classical simulability for noisy gaussian boson sampling.

*Phys. Rev. Lett.***124**, 100502 (2020).Michler, P. et al. A quantum dot single-photon turnstile device.

*Science***290**, 2282–2285 (2000).Ding, X. et al. On-demand single photons with high extraction efficiency and near-unity indistinguishability from a resonantly driven quantum dot in a micropillar.

*Phys. Rev. Lett.***116**, 020401 (2016).Somaschi, N. et al. Near-optimal single-photon sources in the solid state.

*Nat. Photonics***10**, 340–345 (2016).Michler, P. (ed.)

*Quantum Dots for Quantum Information Technologies*(Springer, 2017).Huber, D., Reindl, M., Aberl, J., Rastelli, A. & Trotta, R. Semiconductor quantum dots as an ideal source of polarization-entangled photon pairs on-demand: a review.

*J. Opt.***20**, 073002 (2018).Basso Basset, F. et al. Entanglement swapping with photons generated on demand by a quantum dot.

*Phys. Rev. Lett.***123**, 160501 (2019).Volz, J., Scheucher, M., Junge, C. & Rauschenbeutel, A. Nonlinear

*π*phase shift for single fibre-guided photons interacting with a single resonator-enhanced atom.*Nat. Photonics***8**, 965–970 (2014).Feizpour, A., Hallaji, M., Dmochowski, G. & Steinberg, A. M. Observation of the nonlinear phase shift due to single post-selected photons.

*Nat. Phys.***11**, 905–909 (2015).Tiarks, D., Schmidt, S., Rempe, G. & Dürr, S. Optical

*π*phase shift created with a single-photon pulse.*Sci. Adv.***2**, e1600036 (2016).Hacker, B., Welte, S., Rempe, G. & Ritter, S. A photon-photon quantum gate based on a single atom in an optical resonator.

*Nature***536**, 193–196 (2016).Stolz, T. et al. Quantum-logic gate between two optical photons with an average efficiency above 40%.

*Phys. Rev. X***12**, 021035 (2022).Kuriakose, T. et al. Few-photon all-optical phase rotation in a quantum-well micropillar cavity.

*Nat. Photonics***16**, 566–569 (2022).De Santis, L. et al. A solid-state single-photon filter.

*Nat. Nanotechnol.***12**, 663–667 (2017).Valiant, L. The complexity of computing the permanent.

*Theor. Comput. Sci.***8**, 189–201 (1979).Aaronson, S. A linear-optical proof that the permanent is #P-hard.

*Proc. Roy. Soc. A***467**, 3393–3405 (2011).Eisert, J. Optimizing linear optics quantum gates.

*Phys. Rev. Lett.***95**, 040502 (2005).Scheel, S., Nemoto, K., Munro, W. J. & Knight, P. L. Measurement-induced nonlinearity in linear optics.

*Phys. Rev. A***68**, 032310 (2003).Knill, E., Laflamme, R. & Milburn, G. J. A scheme for efficient quantum computation with linear optics.

*Nature***409**, 46–52 (2001).Uskov, D. B., Kaplan, L., Smith, A. M., Huver, S. D. & Dowling, J. P. Maximal success probabilities of linear-optical quantum gates.

*Phys. Rev. A***79**, 042326 (2009).Uskov, D. B., Smith, A. M. & Kaplan, L. Generic two-qubit photonic gates implemented by number-resolving photodetection.

*Phys. Rev. A***81**, 012303 (2010).Oszmaniec, M. & Zimborás, Z. Universal extensions of restricted classes of quantum operations.

*Phys. Rev. Lett.***119**, 220502 (2017).Arkhipov, A. & Kuperberg, G. The bosonic birthday paradox.

*Geom. Topol. Monogr.***18**, 1–7 (2012).Bartolucci, S. et al. Fusion-based quantum computation. Preprint at https://arxiv.org/abs/2101.09310 (2021).

## Acknowledgements

This work is supported by the ERC Advanced Grant QU-BOSS (QUantum advantage via nonlinear BOSon Sampling, grant agreement no. 884676), by the European Union’s Horizon 2020 research and innovation program through the FET project PHOQUSING (“PHOtonic Quantum SamplING machine”–Grant Agreement No. 899544), by FCT—Fundação para Ciência e Tecnologia, via project CEECINST/00062/2018 and by Brazilian funding agencies CNPq and FAPERJ. We acknowledge useful comments from Scott Aaronson.

## Author information

### Authors and Affiliations

### Contributions

F.S., N.S., D.J.B., and E.F.G. conceived the idea and developed the theory. N.S. performed the numerical simulations. F.S. coordinated the project. N.S., D.J.B., E.F.G., and F.S. all contributed to discussing the results and writing the paper.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Spagnolo, N., Brod, D.J., Galvão, E.F. *et al.* Non-linear Boson Sampling.
*npj Quantum Inf* **9**, 3 (2023). https://doi.org/10.1038/s41534-023-00676-x

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41534-023-00676-x