## Abstract

Minimizing the resources required to build logic gates into useful processing circuits is key to realizing quantum computers. Although the salient features of a quantum computer have been shown in proof-of-principle experiments, difficulties in scaling quantum systems have made more complex operations intractable. This is exemplified in the classical Fredkin (controlled-SWAP) gate for which, despite theoretical proposals, no quantum analog has been realized. By adding control to the SWAP unitary, we use photonic qubit logic to demonstrate the first quantum Fredkin gate, which promises many applications in quantum information and measurement. We implement example algorithms and generate the highest-fidelity three-photon Greenberger-Horne-Zeilinger states to date. The technique we use allows one to add a control operation to a black-box unitary, something that is impossible in the standard circuit model. Our experiment represents the first use of this technique to control a two-qubit operation and paves the way for larger controlled circuits to be realized efficiently.

- quantum computers
- circuits
- Fredkin (controlled-SWAP) gate
- downconversion
- qubits
- quantum optics
- GHZ states
- entanglement
- logic gate
- photons

## INTRODUCTION

One of the greatest challenges in modern science is the realization of quantum computers (*1*–*3*), which, as they increase in scale, will allow enhanced performance of tasks in secure networking, simulations, distributed computing, and other key tasks where exponential speedups are available. Processing circuits to realize these applications are built up from logic gates that harness quantum effects such as superposition and entanglement. At present, even small-scale and medium-scale quantum computer circuits are hard to realize due to the need to sufficiently control enough quantum systems to chain together many gates into circuits. One example of this is the quantum Fredkin gate, which requires at least five two-qubit gates (*4*) to be implemented in the standard circuit model. Thus, despite featuring prominently in quantum computing (*5*–*7*), error correction (*8*, *9*), cryptography (*10*–*12*), and measurement (*13*, *14*), no such gate has been realized to date.

The quantum Fredkin gate, as shown in Fig. 1A, is a three-qubit gate whereby, conditioned on the state of the control qubit, the quantum states of the two target qubits are swapped. The original, classical version of the gate first proposed by Edward Fredkin (*15*) also serves as one of the first examples of a reversible logic operation where the number of bits is conserved and no energy is dissipated as a result of erasure. In the framework of universal quantum computation, gates are also reversible, so it may seem natural to ask whether it is possible to construct a quantum version of the Fredkin gate. The first design of the quantum Fredkin gate was proposed by Milburn (*16*) and was to use single photons as qubits and cross-Kerr nonlinearities to produce the necessary coherent interactions. Further schemes utilizing linear optics developed these ideas further (*4*, *17*–*20*) by using ancilla photons, interference, and multiple two-qubit (*21*, *22*) and single-qubit gates. However, concatenating multiple probabilistic gates in this fashion typically leads to a multiplicative reduction in the overall probability of success of < 1/100. Thus, it would be desirable to be able to construct a quantum Fredkin gate directly without decomposition and avoid the associated resource overhead.

We begin by describing the concept of our experiment. We perform the controlled-SWAP operation by adding control to the SWAP unitary *U*_{SWAP} by applying the technique in Zhou *et al*. (*23*) to greatly reduce the complexity of quantum circuits. The notion of adding control to a black-box unitary is forbidden or difficult in many architectures (*24*, *25*)—optics lends itself well to this approach because the optical implementation of the unitary leaves the vacuum state unchanged. Here, we utilize this method to simplify a controlled multiqubit operation. A key idea in our demonstration is to use entanglement in a nonqubit degree of freedom (we use the photon’s path mode) to drive the operation of the gate. This path entanglement can be produced in different ways. In our demonstration (Fig. 1B), it is generated from spontaneous parametric downconversion (SPDC). Given the physical arrangement of the circuit and given that we only accept detection events where a single photon is counted at each of the four outputs simultaneously, the optical quantum state produced by SPDC is converted into the required four-photon path-mode entangled state (see Materials and Methods). It has the form(1)where *B*, *R*, *Y*, and *G* refer to path modes and, for example, |11〉_{B} indicates a photon occupying mode 1*B* and another photon occupying 2*B*. The path modes are distributed throughout the circuit such that *U*_{SWAP} is applied only to the *B* and *G* modes. The qubit state is encoded on the polarization of the photon. Because the photons are in a spatial superposition, polarization preparation optics must be applied to both path modes of each photon. Hence, an arbitrary, separable three-qubit state |ξ〉|ψ〉|φ〉 can be prepared as an input to the gate. In particular, the control qubit is encoded on modes 1*R* and 1*B*, target 1 is encoded on modes 2*R* and 2*B*, and target 2 is encoded on modes 1*G* and 1*Y*, yielding(2)The two control modes 1*R* and 1*B* are mixed on a polarizing beam splitter (PBS), whereas a 50:50 nonpolarizing beam splitter (NPBS) is used to erase the path information in the target and trigger arms. The SWAP is implemented via rearrangement of the path modes such that the target modes 2*B* and 1*G* are swapped whereas 2*R* and 1*Y* are not. Successful operation of the gate occurs when photons are detected at the control, target 1, and target 2 detectors (simultaneously with photon detection at either trigger detector). The polarization state of the three-qubit system, given that the required modes are occupied, is α|H〉^{C}|ψ〉^{T1}|φ〉^{T2} + β|V〉^{C}|φ〉^{T1}|ψ〉^{T2}, as expected from application of the Fredkin gate on the state |ξ〉^{C}|ψ〉^{T1}|φ〉^{T2}, where |ξ〉 = α|*H*〉 + β|*V*〉. Taking into consideration the probability of recording a fourfold coincidence event, successful execution of the gate occurs, on average, one-sixteenth of the time. This can be increased to one-fourth of the time by collecting the target photons from both NPBS outputs.

## RESULTS

The experimental arrangement of the quantum Fredkin gate is shown in Fig. 1C and consists of three interferometers designed to be inherently phase-stable. Pairs of polarization entangled photons, produced by two SPDC crystals (see Materials and Methods), impinge on a PBS. Two orthogonally polarized photons, one from each source, are sent to separate displaced Sagnac interferometers. Initially, they are incident on a beam splitter where one-half of the interface acts as a PBS and the other half acts as an NPBS. Entering at the PBS side, photons may travel along counterpropagating path modes where the polarization state |ψ〉 is encoded onto one mode and the state |φ〉 is encoded on the other mode. The two paths are then recombined on the NPBS side of the beam splitter where the path information is erased (see Materials and Methods), giving the path-mode entangled state in Eq. 1, whereas the polarization encoding procedure leads to the state in Eq. 2. The control of the gate is realized in a polarization interferometer consisting of two calcite beam displacers. The desired polarization state of the control is encoded onto modes 1*R* and 1*B*, which are coherently recombined in the second beam displacer. Given a successful operation (arrival of a photon at the control detector), the preparation of the control photon in |*H*〉 = |1〉 projects the target photons onto path modes 1*G* and 2*B*, which undergo SWAP; conversely, preparing |*V*〉 = |0〉 projects the target photons onto path modes 2*R* and 1*Y*, which undergo the identity operation. In practice, the trigger arm consists of a half-wave plate (HWP) whose optic axis (OA) is set to 22.5°, producing diagonal or antidiagonal polarized photons and a PBS. Successful operation is heralded by measuring fourfold coincidences across the trigger, control, and two target detectors.

The logical operation of the gate was measured by performing eight measurements, one for each of the possible logical inputs. For each input, we measure a total of 620 fourfold events distributed across the eight possible output states. Under ideal operation, for a given input, there is a single output. The solid bars in Fig. 1D depict the experimentally measured truth table data *M*_{exp}, whereas the transparent bars represent the ideal truth table *M*_{ideal}. To quantify the mean overlap between *M*_{exp} and *M*_{ideal}, we calculate , which confirms excellent performance in the logical basis. The slight reduction in fidelity is most likely attributable to the imperfect extinction of our polarization optics.

We demonstrate the full quantum nature of our gate by preparing the control in a superposition , which places the gate in a superposition of the SWAP and identity operations. Using our gate, we produce four of the eight maximally entangled three-photon Greenberger-Horne-Zeilinger (GHZ) states, namely(3)and(4)

Here, φ is a phase shift intrinsic to the gate, and θ(ϑ) is a corrective phase shift that can be applied by tilting an HWP at OA by an angle ϑ, such that φ + θ(ϑ) = 2*n*π (see Materials and Methods). In doing so, we are able to test the coherent interaction of all three qubits in the gate, which is a key requirement for constructing universal quantum computers. For each of the four states in Eqs. 3 and 4, we perform three-qubit quantum state tomography (QST) to fully characterize the state. The control and target qubits are measured independently in the *D*/*A* basis, which we denote as σ_{x}; in the *R*/*L* basis (σ_{y}), where and ; and in the *H*/*V* basis (σ_{z}). Therefore, full state reconstruction can be carried out by a set of 27 measurements settings (σ_{x}σ_{x}σ_{x}, σ_{x}σ_{x}σ_{y}, …), effectively resulting in an overcomplete set of 216 projective measurements as each measurement setting has eight possible outcomes. Figure 2 shows the real (left) and imaginary (right) parts of the reconstructed density matrices of the four GHZ states, each of which was calculated from ~5000 fourfold events using a maximum-likelihood algorithm. We measure fidelities and purities of *F* = 0.88 ± 0.01 and *P* = 0.79 ± 0.02 for , *F* = 0.90 ± 0.01 and *P* = 0.83 ± 0.02 for , *F* = 0.93 ± 0.01 and *P* = 0.87 ± 0.02 for , and *F* = 0.92 ± 0.01 and *P* = 0.85 ± 0.02 for . The errors were calculated from 500 samples of a Monte Carlo simulation. These values are most likely limited by an imperfect mode overlap at the NPBS in each displaced Sagnac interferometer. Nevertheless, to the best of our knowledge, these values are the highest reported for photonic GHZ states, surpassing the previous values reported in Hamel *et al*. (*26*).

We perform further measurements to characterize the quality of the state. GHZ states can show a strong contradiction between local hidden variable theories and quantum mechanics (*27*). Mermin (*28*) derived a Bell-like inequality by imposing locality and realism for three particles, which holds for any local hidden variable theory(5)

This inequality can be violated by performing measurements with settings *a* = *b* = *c* = σ_{x} and *a*′ = *b*′ = *c*′ = σ_{y}, with a maximum violation of *S*_{M} = 4. From the QST of , 747 of the 5029 fourfold events can be used to calculate the correlation functions *E* in Eq. 5; these results are shown in Fig. 3A. This leads to *S*_{M} = 3.58 ± 0.06, which is a violation by 24 SD. The implication of using these particular measurement settings is that the state exhibits genuine tripartite entanglement.

An additional test, namely, the violation of Svetlichny’s inequality, is required to test whether the state is capable of displaying tripartite nonlocality (*29*, *30*). Nonlocal hidden variable theories cannot be ruled out with Mermin’s inequality, as they can be violated for arbitrarily strong correlations between two of the three particles. Svetlichny’s inequality takes the form(6)with the following settings: *a* = Sv1_{±} , *a*′ = Sv2_{±} . The maximum violation allowed by quantum mechanics is . Figure 3B shows the correlations calculated from 2348 fourfold events leading to *S*_{Sv} = 4.88 ± 0.13, which is a violation by 7 SD.

An application of the quantum Fredkin gate is the direct estimation of nonlinear functionals (*13*) of a quantum state, described by a density matrix ρ, without recourse to QST. Here, ρ = ϱ_{T1} ⊗ ϱ_{T2} is the density matrix of two separable subsystems. The circuit we use is shown in Fig. 4A, where an interferometer is formed using two Hadamard gates and a variable phase shift θ(ϑ). This interferometer is coupled to the controlled-SWAP operation of our quantum Fredkin gate such that measuring the control in the logical basis leads to an interference pattern given by Tr[*U*_{SWAP}ϱ_{T1} ⊗ ϱ_{T2}] = Tr[ϱ_{T1}ϱ_{T2}] = *ve*^{iθ(ϑ)}. If ϱ_{T1} ≠ ϱ_{T2}, then measurement of the fringe visibility provides, for pure states, a direct measure of the state overlap |〈T1| T2〉|^{2}, where ϱ_{T1} = |T1〉〈T1| and ϱ_{T2} = |T2〉〈T2|. Conversely, if ϱ_{T1} = ϱ_{T2}, then the fringe visibility provides an estimate of the length of the Bloch vector (that is, the purity *P* = Tr[ϱ^{2}]). We realize the Hadamard operations in Fig. 4A by setting the quarter-wave plate (QWP) and HWP combinations to prepare or measure σ_{x}.

Figure 4B shows the results of preparing the target qubits in the states |0〉^{T1}|0〉^{T2}, , and |0〉^{T1}|1〉^{T2}, corresponding to ideal (measured) overlaps and visibilities of 1 (0.82 ± 0.02), 0.5 (0.52 ± 0.02), and 0 (0.05 ± 0.01), respectively. Although the maximum measurable visibility is limited by the performance of the three interferometers in the circuit, our measurements show a clear reduction in visibility, as the single-qubit states are made orthogonal. Figure 4C shows the results of setting ϱ_{T1} = ϱ_{T2}. As we increase the degree of mixture (see Materials and Methods), we observe a reduction in visibility from 0.82 ± 0.02 for a pure state to 0.03 ± 0.02 for a maximally mixed state.

## DISCUSSION

In conclusion, we have used linear optics to perform the first demonstration of the quantum Fredkin gate. This is achieved by exploiting path-mode entanglement to add control to the SWAP operation. Our implementation has an improved success rate of more than one order of magnitude compared to previous proposals and does not require ancilla photons or decomposition into two-qubit gates. Our gate performs with high accuracy in the logical basis and operates coherently on superposition states. We have used the gate to generate genuine tripartite entanglement with the highest fidelities to date for photonic GHZ states and have implemented a small-scale algorithm to characterize quantum states without QST.

An alternative method for generating the polarization-path entanglement that drives the gate is the use of C-path gates (*23*) at the input. Our implementation varies from a fully heralded quantum Fredkin gate (see Materials and Methods), which does not require preexisting entanglement; however, it demonstrates the key properties of a quantum Fredkin gate. For completely general quantum circuits that incorporate Fredkin (or similar controlled-arbitrary-unitary) gates at arbitrary circuit locations, the C-path methodology may be necessary at the cost of some additional resources and success probability (see Materials and Methods), though we conjecture that specific circuits comprising multiple Fredkin gates might be optimized using techniques similar to those that allow us to simplify the Fredkin gate down from a circuit of five two-qubit gates. Nevertheless, for small algorithms or operations and whenever possible, it is significantly favorable to directly generate path entanglement.

The quantum Fredkin gate has many applications across quantum information processing. Our demonstration should stimulate the design and implementation of even more complex quantum logic circuits. Later, we became aware of related work carried out by Takeuchi (*31*).

## MATERIALS AND METHODS

### Source

Our source consisted of a 150 fs pulsed Ti-sapphire laser operating at a rate of 80 MHz and at a wavelength of 780 nm, which was frequency-doubled using a 2-mm lithium triborate crystal. Two dispersion-compensating ultrafast prisms spatially filtered any residual 780 nm laser light. The frequency-doubled light (with 100 mW power) pumped two 2 mm type II β barium borate (BBO) crystals in succession. Entangled photons, generated via SPDC, were collected at the intersection of each set of emission cones. They then encountered an HWP with its OA at 45*°* and an additional 1 mm type II BBO crystal used to compensate for spatial and temporal walk-offs. The single photons were coupled into a single-mode fiber and delivered to the gate. This configuration gave, on average, a fourfold coincidence rate of 2.2 per minute at the output of the gate.

### Entangled state preparation

Each SPDC source emitted pairs of entangled photons of and . Polarization optics were used to distribute the path modes throughout the circuit and thus convert this state into the path-entangled states and . Path modes from and were combined on a PBS (Fig. 1C, PBS with outputs 2*R*, 1*G*, 1*Y*, and 2*B*); along with postselection of fourfold coincidence events at the outputs of the control, target, and trigger outputs, this led to Eq. 1 in the main text. Each qubit was encoded using photon polarization: using Eq. 1, considering that each photon exists in a superposition of path modes and omitting the unoccupied modes, an arbitrary polarization state can be encoded onto each qubit by performing a local unitary operation on each mode, giving Eq. 2. The state encoding was performed inside the beam displacer (control qubit) and displaced Sagnac (target qubits) interferometers.

### Tuning the phase

The phase was tuned by tilting an HWP set to its OA. To set the correct phase for each of the four GHZ states, we varied the tilt of the HWP and measured fringes in the fourfold coincidences with our measurement apparatus in the σ_{x}σ_{y}σ_{y} basis. For , we set the tilt to maximize (minimize) the occurrence of the |DRR〉, |DLL〉, |ARL〉, and |ALR〉 events.

### Mixed-state preparation

The mixed states of the form were obtained by measuring output statistics for a combination of pure input states. The input states of the target were prepared, in varying proportions given by the parameter *m*, as 0.25(1 + *m*)^{2}|0〉^{T1}|0〉^{T2}, 0.25(1 − *m*)^{2}|0〉^{T1}|1〉^{T2}, 0.25(1 − *m*)^{2}|1〉^{T1}|0〉^{T2}, and 0.25(1 − *m*)^{2}|1〉^{T1}|1〉^{T2}. The aggregated data resulted in a fringe pattern that reflects the purity of the mixed single-qubit state.

### Erasing the which-path information

Generation of path-mode entanglement and successful operation of the gate in the quantum regime relied on the erasure of the which-path information in the two displaced Sagnac interferometers. We tested this by performing a Hong-Ou-Mandel (HOM) two-photon interference measurement after each interferometer. After overlapping path modes 2*R* and 1*G* on an NPBS, an HWP with its OA set to 22.5*°* rotated the polarization of the photons to |*D*〉 and |*A*〉, respectively. Sending these photons into the same port of a PBS led to bunching at the output if the path modes were indistinguishable. Doing the same for modes 2*B* and 1*Y* gave two separate HOM dips (see Materials and Methods) with visibilities of 90 ± 5% and 91 ± 6%.

### Heralding the quantum Fredkin gate

In order to use quantum Fredkin gate as part of a much larger quantum circuit (with gates in series), it is preferable that the gate be heralded. Realizing our gate in this manner involves adding C-path gates (*23*) to each input. For the best probability of success *P*_{success}, each C-path gate requires two heralded Controlled-NOT gates (*32*), which in turn requires two entangled pair ancillae. Execution of the C-path gate succeeds with *P*_{success} = (1/4)^{2} (*23*, *32*). C-path gates are not a necessity at the output if successful execution is heralded by nondetection at the relevant NPBS ports, at an additional probability cost of a factor of ¼.

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/2/3/e1501531/DC1

Section S1. Erasing the which-path information.

Section S2. Generation of three-photon GHZ states.

Fig. S1. HOM dip measurements.

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**We thank S. Slussarenko, A. Boston, and K. Modi for useful discussions.

**Funding:**This work was supported by the Australian Research Council Centre of Excellence for Quantum Computation and Communication Technology (project number CE110001027).

**Author contributions:**T.C.R., F.F., and G.J.P. conceptualized the scheme. R.B.P., J.H., and F.F. designed and constructed the experiment. R.B.P. and J.H. performed the experiment and analyzed the data, with input from G.J.P. R.B.P. wrote the manuscript, with input from all authors. G.J.P. oversaw the work.

**Competing interests:**The authors declare that they have no competing interests.

**Data and materials availability:**All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2016, The Authors