One of the greatest challenges in modern science is the realisation of quantum computers which, as their scale increases, will allow enhanced performance of tasks across many areas of quantum information processing. Quantum logic gates play a vital role in realising these applications by carrying out the elementary operations on the qubits; a key aim is minimising the resources needed to build these gates into useful circuits. While the salient features of a quantum computer have been shown in proof-of-principle experiments, e.g., single- and two-qubit gates, difficulties in scaling quantum systems to encode and manipulate multiple qubits has hindered demonstrations of more complex operations. This is exemplified by the classical Fredkin (or controlled-SWAP) gate  for which, despite many theoretical proposals [2,3] relying on concatenating multiple two-qubit gates, a quantum analogue has yet to be realised.
Here, by directly adding control to a two-qubit SWAP unitary , we use photonic qubit logic to report the first experimental demonstration of a quantum Fredkin gate . Our scheme uses linear optics and improves on the overall probability of success by an order of magnitude over previous proposals [2,3]. This optical approach allows us to add control an arbitrary black-box unitary which is otherwise forbidden in the standard circuit model . Additionally, the action of our gate exhibits quantum coherence allowing the generation of the highest fidelity three-photon GHZ states to date.
The quantum Fredkin gate has many applications in quantum computing, quantum measurements  and cryptography [8,9]. Using our scheme, we apply the Fredkin gate to the task of direct measurements of the purity and state overlap of a quantum system  without recourse to quantum state tomography.