## Complex quantum optical circuitry

Encoding and manipulating information in the states of single photons provides a potential platform for quantum computing and communication. Carolan *et al.* developed a reconfigurable integrated waveguide device fabricated in a glass chip (see the Perspective by Rohde and Dowling). The device allowed for universal linear optics transformations on six wave-guides using 15 integrated Mach-Zehnder interferometers, each of which was individually programmable. Functional performance in a number of applications in optics and quantum optics demonstrates the versatility of the device's reprogrammable architecture.

## Abstract

Linear optics underpins fundamental tests of quantum mechanics and quantum technologies. We demonstrate a single reprogrammable optical circuit that is sufficient to implement all possible linear optical protocols up to the size of that circuit. Our six-mode universal system consists of a cascade of 15 Mach-Zehnder interferometers with 30 thermo-optic phase shifters integrated into a single photonic chip that is electrically and optically interfaced for arbitrary setting of all phase shifters, input of up to six photons, and their measurement with a 12-single-photon detector system. We programmed this system to implement heralded quantum logic and entangling gates, boson sampling with verification tests, and six-dimensional complex Hadamards. We implemented 100 Haar random unitaries with an average fidelity of 0.999 ± 0.001. Our system can be rapidly reprogrammed to implement these and any other linear optical protocol, pointing the way to applications across fundamental science and quantum technologies.

Photonics has been crucial in establishing the foundations of quantum mechanics (*1*) and more recently has pushed efforts in understanding new nonclassical computational possibilities. Typical protocols involve nonlinear operations, such as the generation of quantum states of light through optical frequency conversion (*2*, *3*), or measurement-induced nonlinearities for quantum logic gates (*4*), together with linear operations between optical modes so as to implement core processing functions (*5*). Encoding qubits in the polarization of photons has been particularly appealing for the ability to implement arbitrary linear operations on the two polarization modes by using a series of wave plates (*6*). For path encoding, the same operations can be mapped to a sequence of beamsplitters and phase shifters. Because any linear optical (LO) circuit is described by a unitary operator, and a specific array of basic two-mode operations is mathematically sufficient to implement any unitary operator on optical modes (*7*), it is theoretically possible to construct a single device with sufficient versatility to implement any possible LO operation up to the specified number of modes.

Here, we report the realization of a six-mode device that is completely reprogrammable and universal for LO. The versatility of this universal LO processor (LPU) is demonstrated for several quantum information protocols, including tasks that were previously not possible. We implemented heralded quantum logic gates at the heart of the circuit model of LO quantum computing (*4*) and new heralded entangling gates that underpin the measurement-based model of LO quantum computing (*8*–*10*), both of which are the first of their kind in integrated photonics. We performed 100 different boson sampling (*11*–*15*) experiments, with new verification protocols realized simultaneously. Last, we used multiparticle quantum interference to distinguish six-dimensional complex Hadamard operations, including newly discovered examples, in which full classification remains an open mathematical problem. The results presented required reconfiguration of this single device to implement ~1000 experiments.

Isolated quantum mechanical processes, including lossless LO circuits acting on photons, preserve orthogonality between input and output states and are therefore described by unitary operators. Although the relevant mathematics for parameterizing unitary matrices has been known for at least a century (*16*), the theoretical formulation of a LO circuit in which an arbitrary unitary operator could be realized is more recent (*7*). The full space of *m*-dimensional unitary matrices (or unitaries) can be parametrized as a product of ≈*m*^{2}/2 two-dimensional unitary primitives, each with two free parameters. Any given unitary then corresponds to a specific set of parameter values. An arbitrarily reconfigurable LO network would be realized by implementing these unitary primitives as two-mode Mach-Zehnder interferometers (MZIs) with two beamsplitters (or integrated directional couplers) and two phase shifters, so that any given LO network corresponds to a set of phase-shift values.

Such operation can be understood, with reference to the schematic shown in Fig. 1A, as a sequence of *m* – 1 subunitaries *D _{i}* (Fig. 1A, diagonal dashed boxes), each of which is guaranteed to enable transformation of the state of an input photon (Fig. 1A, left) in waveguide

*i*to an arbitrary superposition of quantum mechanical amplitudes in all its output waveguides (Fig. 1A, right). The top MZI in each

*D*is set to give the desired probability and phase for the input photon to output in waveguide

_{i}*i*. The other parts of the quantum mechanical amplitude of the photon undergo similar operations in each successive MZI of a given

*D*in order to set the amplitudes and phases in subsequent waveguides. Full reconfigurability is realized by feeding all output waveguides from one

_{i}*D*into all but the uppermost input waveguide of the following

_{i′}*D*(

_{i′–1}*17*).

Realizing this scheme requires subwavelength stability and high-fidelity components to support both classical and quantum interference—possibilities opened up with integrated quantum photonics (*18*–*26*). Our LPU (Fig. 1B), made with planar lightwave circuit (PLC) technology (*27*, *28*), comprises an array of 30 silica-on-silicon waveguide directional couplers with 30 electronically controlled thermo-optic phase shifters to form a cascade of 15 MZIs across six modes (fabrication details are available in the supplementary materials, section S1). This LPU can implement any six-dimensional unitary operator up to undetected output phases and any three-dimensional nonunitary matrix (*17*) by using operator dilation (*29*). Here, we focus on several protocols at the forefront of quantum information science and technology.

## Quantum gates

With the addition of single-photon sources and measurements, and rapid feed-forward of classical information, both the circuit (*4*) and measurement-based (*8*–*10*) models of digital quantum computing can be efficiently implemented with LO. Basic two-qubit processes are realized probabilistically with LO circuitry; therefore, a key requirement for scalability is that a successful operation is heralded by the detection of ancillary photons (ancillas) in order to signal that the processed photonic qubits are available for use in the larger architecture (*30*). These are typically referred to as “heralded gates.”

We programmed our device to implement a new compact four-photon scheme suitable for measurement-based quantum computing, which generates the maximally entangled state of two photonic qubits upon the detection of another two ancilla photons (Fig. 2, A and B). For Bell states, measurements in common bases should be correlated, whereas measurements in different bases should be uncorrelated. We implemented both types of measurement (Fig. 2C), finding the mean statistical fidelity (*31*) between all four experimental *p*^{exp} and theoretical *p*^{th} probability distributions to be = 0.966 ± 0.004 (an explanation of error analysis is provided in the supplementary materials, section S2.1). These measurements were used to verify the entanglement of our state by calculating , finding a value of *E* = 0.673 ± 0.031, where *E* > 1/2 witnesses entanglement (a full description of gate implementation and analysis is provided in the supplementary materials, section S3.3) (*32*).

Next, the device was reprogrammed to realize a quantum logic gate designed to be scalable for the circuit model of quantum computing (Fig. 2, D and E). The gate receives four photons: Two photons are each encoded with a qubit, and two photons act as ancillas. Detecting one photon in each of the two heralding modes signals the implementation of a controlled-NOT (CNOT) operation (*4*, *33*, *34*) between the two photonic qubits: The logical state of the target qubit is flipped (0 ↔ 1) if the control qubit is in the state 1 and left unchanged if the control qubit is in state 0. We measured the logical truth table for this operation in the computational basis (Fig. 2F), finding its mean statistical fidelity averaged over all computational inputs to be = 0.930 ± 0.003 with the ideal case (supplementary materials, section S3.4).

Although the truth table measures the map between logical basis states, capturing complete phase information requires full process tomography, which we were able to perform for an unheralded CNOT gate. With no ancillas, this unscalable gate requires two photons, which are consumed as part of its operation. Several examples of photonic chips specifically fabricated to implement such two-qubit gates (*21*, *35*, *36*) have been reported. To compare the performance of our universal processor against devices fabricated for a specific task, we implemented a two-photon unheralded CNOT gate (*37*–*39*) with single-qubit preparation and measurement capabilities (Fig. 2, G and H) and performed full quantum process tomography (Fig. 2I) (*40*). The process fidelity was found to be = 0.909 ± 0.001, and the average gate fidelity was = 0.927 ± 0.001, which is greater than those previously reported (gate implementation is provided in section S3.5 and quantum process tomography details are in section S2.4 of the supplementary materials) (*21*, *35*, *41*).

Combined with two-qubit operations, a small set of single-qubit gates (Fig. 2J), including the Hadamard () and π/8 () gates, are sufficient to realize a universal gate set for quantum computing (*42*). We implemented and performed full quantum process tomography for these two gates and for the three Pauli gates (Fig. 2K), finding an average process fidelity of = 0.992 ± 0.008.

In multiphoton experiments, deviations from unit fidelity are primarily caused by imperfections in the photon source, such as reduced quantum interference between different pair creation events (*43*), and higher-order terms in the spontaneous parametric down-conversion (SPDC) process. To omit these effects and measure the performance of our LPU directly, we used one- and two-photon ensembles to recover the raw transfer matrix *M* (*44*) implemented by the device, making no assumptions about its unitarity. We calculated the circuit fidelity with the intended unitary *U*. For the Bell state generator and the heralded and unheralded CNOT, we found = 0.943 ± 0.004, 0.941 ± 0.018, and 0.939 ± 0.040, respectively (supplementary materials, section S2.3).

## Implementing boson sampling

The realization of a large-scale quantum computer that demonstrates an intrinsic exponential advantage over classical machines would be in conflict with a foundational tenet in computer science: the extended Church Turing thesis (ECT). The ECT conjectures that all realistic physical systems can be efficiently simulated with a probabilistic Turing machine, or classical computer. Designed for LO—with no requirement for quantum logic gates, qubit entangling operations, or number-resolved photon detection—boson sampling (*11*–*15*) is a quantum protocol that has been developed as a rapid route to challenge the ECT and demonstrate that quantum physics can be harnessed to provide fundamentally new and nonclassical computational capabilities.

Based on the foundations of computer science, boson sampling is a mathematical proof (using plausible conjectures) that a many-photon state, when acted on by a large LO circuit set to implement a Haar-random unitary, will give rise to a probability distribution that cannot be efficiently sampled by a classical algorithm. Quantum interference among the photons (*45*) contributes to the pattern of the probability distribution. The classical intractability arises because the probability amplitude for each correlated photon detection event is given by a classically hard function, known as the “permanent” (*46*), of the submatrix that describes a particular route of photons through the circuit. Experimentally, each detection event represents a sample drawn from that classically forbidden probability distribution.

Acting on three-photon ensembles, our device was programmed to implement 100 different boson sampling routines. Each circuit configuration was chosen randomly from the Haar measure, which was implemented via a direct parameterization of phase shifters (*47*), the probability density functions of which are displayed in Fig. 3A. For each implementation (Fig. 3B), detection events were counted for each of the 20 collision-free ways in which three photons can exit the six output ports of the device. A histogram of fidelities is displayed in Fig. 3C with statistics based on calculations of matrix permanents, with a mean statistical fidelity of = 0.950 ± 0.020. These results demonstrate the performance of our LPU over many circuit configurations, randomly and unbiasedly chosen from the full space of all possible configurations.

## Verifying boson sampling

An open and important question, particularly in light of the ECT, is how to verify that boson sampling continues to be governed by the laws of quantum mechanics when experiments reach the scale that classical computers can no longer simulate (*48*–*51*). Unlike certain algorithms for digital quantum computers—including Shor’s factoring algorithm (*52*), whereby the solution to a problem believed to be classically hard can be efficiently checked—there seems to be no analogous way to check that large-scale boson sampling is sampling from a probability distribution that arises from many-photon quantum interference.

Although it is likely that boson sampling is in principle mathematically unverifiable, methods have been proposed to gather supporting or circumstantial evidence for the correct operation of the protocol (*51*, *53*, *54*). The essence of these methods is to implement experiments that share basic quantum mechanical features with boson sampling, but where certain properties of the experimental output can be predicted and therefore checked. The zero-transmission law (ZTL) predicts that correlated photon detection for most of the exponentially growing number of configurations is strictly suppressed if the circuit is set to implement the Fourier transform (FT) on optical modes (Fig. 3, D and E) (*55*). This is known because the structure of the FT allows these matrix permanents to be efficiently evaluated without explicit calculation. Because large-scale many-photon quantum interference is at the core of the ZTL, it has been proposed as a certificate for the capability of a device to implement boson sampling (*54*).

The LPU was programmed to implement 16 examples of the two-parameter set of six-dimensional matrices, including *F*_{6} (the six-dimensional FT), which occurs at θ_{1},θ_{2} = π,0. Using statistics from three-photon ensembles, the experimental violation of the ZTL was calculated as ν = *N*_{s}/*N*, the ratio of the number of predicted suppressed events *N*_{s} to the total number of events *N*, the results of which are plotted in Fig. 3G alongside the theoretical manifold. The experimental points follow the shape of the manifold, with the minimal violation of the ZTL ν_{min} = 0.319 ± 0.009 occurring when *F*_{6} is implemented. The average ZTL violation of the nine points that are predicted to maximally violate is = 0.638 ± 0.029. Crucially, this verification protocol is implemented in the same device and with the same procedure as that for the boson sampling experiments above.

## Six-photon verification

An essential requirement of boson sampling is that of indistinguishability among photons. With the LPU set to implement *F*_{6}, the six-photon state was injected, and six-photon statistics were counted with an all-fiber beam-splitter between each output mode and two single-photon avalanche diodes (SPADs) to give probabilistic number-resolved photon detection over a total of 12 SPADs. Although the complexity of states that are not one-photon-per-mode is less understood, the input state used here allows us to implement a protocol designed to verify indistinguishability among many photons with only a small number of detection events.

Bayesian model comparison was used to update, in real time, the confidence that events are sampled from a (precalculated) quantum probability distribution (arising from completely indistinguishable photons) or from a classical probability distribution (arising from completely distinguishable photons) (Fig. 3F) (*51*). After collecting 15 sixfold coincidence events, a confidence of *P* = 0.998 was determined that these are drawn from a quantum (not classical) distribution.

## Complex Hadamard operations

The FT and are examples in the more general class of complex Hadamard matrices (CHMs), which are related to mutually unbiased bases (*56*) and are of fundamental interest in quantum information theory (*57*). CHMs are defined as *N* × *N* unitary matrices with entries of squared absolute value equal to 1/*N*. Although this definition is straightforward, classification of these matrices is far from trivial and is concerned with identifying CHMs that are inequivalent up to pre- and postmultiplication with permutation matrices and diagonal unitaries (*58*). In the *N* = {2, 3, 5} case, all CHMs are equivalent to the respective FT matrix, whereas for *N* = 4, there exists a one-parameter equivalence class. Although a full classification of *N* = 6 CHMs is unknown, it is currently conjectured that the set consists of an isolated matrix that does not belong to any family (*59*) and a newly discovered four-parameter generic family (*60*).

In LO experimental implementations, discrimination among CHMs can be accomplished via the observation of characteristic patterns of photonic quantum interference (*61*–*64*). Up until now, these observations have been too experimentally challenging for the six-dimensional case. We reconstructed correlation manifolds of two-photon detection events by scanning over the matrices, displaying four (out of the 15 sets collected) in Fig. 3H. A mean statistical fidelity of = 0.979 ± 0.007 was found.

Last, we implemented an instance of [that is not contained in ] and and observed predicted characteristic two-photon quantum interference patterns (Fig. 3, I and J, respectively), with respective statistical fidelities of = 0.986 ± 0.001 and = 0.998 ± 0.001. The intractability of calculating the permanents of certain CHMs is an interesting research line, as is the possibility of searching for new CHMs by using photonic statistics.

## Concluding remarks

Photonic approaches to quantum information science and technology promise new scientific discoveries and new applications. LO circuits lie at the heart of all of these protocols, and a single LPU device with the ability to arbitrarily “dial up” such operations promises to replace a multitude of existing and future prototype systems. Combining LPUs with existing higher-efficiency sources and detectors will expand their capabilities, and the development of LPUs with high-speed modulation (*65*) will enable the dynamically adaptive circuitry necessary for LO quantum computing. Integration of these components (*66*, *67*) with larger low-loss circuits (*68*) will open up new avenues of research and application.

## Supplementary Materials

## References and Notes

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
**Acknowledgments:**The authors acknowledge support from the Engineering and Physical Sciences Research Council (EPSRC), the European Research Council (ERC), including BBOI, QUCHIP (H2020-FETPROACT-3-2014: Quantum simulation), PIQUE (FP7-PEOPLE-2013-ITN), the Centre for Nanoscience and Quantum Information (NSQI), the U.S. Army Research Office (ARO) grant W911NF-14-1-0133, and the U.S. Air Force Office of Scientific Research (AFOSR). J.C.F.M. was supported by a Leverhulme Trust Early Career Fellowship. J.L.O’B. acknowledges a Royal Society Wolfson Merit Award and a Royal Academy of Engineering Chair in Emerging Technologies.