A quantum-inspired Fredkin gate based on spatial modes of light

,


Introduction
The capacity to transmit and process classical and quantum information has by far experienced a tremendous growth in the latest years [1].However the need to continue this trend poses challenges in areas such as computing, nanotechnology, telecommunications and information processing [2].One promising direction to handling increasingly huge sets of data is to build information-processing devices based on optical logic gates.
These gates make use of light beams with information encoded in their field amplitude and polarization, and at the quantum level they use single photons with the information embedded in their quantum state.A reversible logical gate that has received great attention is the Fredkin gate, or controlled-SWAP (c-swap) gate, introduced by Edward Fredkin in the context of computational models to perform any logical or arithmetic operation in the domain of reversible logic-based operations.This gate has three input bits and three output bits and swaps or not the last two bits depending on the value of the first bit that acts as control bit [3].A generalized version of the Fredkin gate allows direct estimations of linear and nonlinear functionals of a Quantum State [4].
There have been experimental and theoretical proposals to implement a Fredkin gate with optical systems [5,6].Additional theoretical work has considered a quantum version using single atoms and single photons [7,8,9,10].Current experimental work includes nuclear magnetic resonance (NMR) [11], superconducting quantum circuits [12], DNA enzymes [13], weak coherent pulses [14,15] and linear optics with quantum-entangled photons [16].Generally speaking the results obtained in these experiments are far from ideal.
One unexpected and interesting option that attracts a lot of attention is the implementation of classical logical gates whose design is inspired by counterpart quantum gates [17,18,19,20,21,22,23,24,25,26,27].They are generally much easier to implement and make use of intense beams.The main idea is to consider features of a quantum algorithm that can be mimicked with classical light.There are aspects of these quantum-inspired gates, such as non-locality, that will make fundamentally different classical analogues from its counterpart quantum algorithms.How far one can go in this analogy is a matter of discussion and controversy in the science community [28,24].
Here we demonstrate in a proof-of-concept experiment a quantum-inspired protocol for comparing strings of data and waveforms.It encodes information on spatial modes with orbital angular momentum (OAM).Spatial modes of light play a central role in the development of new information technologies, information processing, and secure communications.OAM modes are particularly interesting for quantum and classical communications due to its capacity for carrying large amounts of information [29].Attention has been directed recently towards using such beams for communications and data exchange between OAM beams in the context of free-space communications [30,31].
Here we A use spatial modes with a twisted phase to build a gate inspired by the quantum fingerprinting protocol [32].OAM beams allows to implement a crucial element of this system: a polarization-controlled SWAP operation.We use orthogonal light beams carrying Orbital Angular Momentum (OAM) as carriers of information and the polarization of these beams as control bit.The controlled-swap operation exchange data carried by different OAM beams depending on the state of polarization of the beam.This gate is inspired by the quantum-optical Fredkin gate originally proposed by Milburn [33].
Our system can compare two strings of data and evaluate the degree of similarity of the information encoded in the amplitudes.We will show below several examples of this that will validate the capability of the system proposed for estimating the fidelity of streams of data without evaluating the data itself.

The Fredkin gate in the quantum and classical domains
The circuit representation of the original quantum Fredkin gate is shown in Fig. 1 In our quantum-inspired Fredkin gate the two channels are Laguerre-Gauss spatial modes LG 0 m (r ⊥ ) with positive and negative index m.Modes with positive index m correspond to channel 1 and modes with negative m correspond to channel 2. This index corresponds to a varying phase of the field of the form ∼ exp(imϕ), where ϕ is the azimuthal angle in cylindrical coordinates.m designates the OAM content per photon of the mode.p = 0 is the radial index of the modes and r ⊥ = (x, y) is the transverse coordinate.
Information in channel 1 is encoded into N complex amplitudes A m and information in channel 2 is similarly encoded into N complex amplitudes B m .The amplitude of the electric field writes The role of control bit in our implementation of the Fredkin gate is the polarization of the spatial modes.Figure 1(b) shows a schematic representation of the controlled-swap gate between modes with positive and negative index m conditioned by the state of polarization.This is equivalent to swapping the information encoded in channels 1 (positive m) and 2 (negative m).For this we use a Mach-Zehnder interferometer where each arm of the interferometer bears a different orthogonal polarization.In each arm the beam experience a different number of reflections.A single reflection in a mirror changes the OAM of the LG modes m ⇐⇒ −m.
In the arm of the interferometer with vertical polarization the beam experience an odd number of reflections that implements the SWAP operation, the electric field amplitude changes as In the other arm, with horizontal polarization, the beam experiences an even number of reflections, we have the identity transformation.The electric field amplitude changes as

A quantum-inspired optical device for data and waveform comparison
The system we demonstrate consist of: 1) A Hadamard operation in polarization, the degree of freedom that plays the role the control bit in our scheme; 2) a Fredkin gate as discussed above; and 3) another Hadamard operation in the polarization degree of freedom.The relevant measurement for data comparison between information encoded in channels 1 and 2 is the output power in the horizontal (P x ) and vertical (P y ) polarizations.
We define the overlap γ as One can easily show that the overlap is related to the values of strings A m and B m (see Methods section) as If the two strings of complex number are equal (A m = B m ) we have P y = 0 and γ = −1.If there is a π phase difference between them (A m = −B m ), we have P x = 0 and γ = 1.If the two strings are orthogonal, i.e. there is no m for which both A m and B m are nonzero, P x = P y and γ = 0.In general the overlap is a real number between −1 and 1.
In order to unveil the meaning of the parameter γ, let us assume that {A m } and {B m } are real and that p m ≡ |A m | 2 and q m ≡ |B m | 2 (m = 1..N ) correspond to two probability distributions.We obtain that γ = − N m=1 √ p m q m .This shows that the overlap measure introduced for series of complex numbers is related to the fidelity or Bhattacharyya coefficient [34], a measure of how different are two probability distributions.
We consider now that signals A m and B m can vary in time.One can think of the discretization of signals of interest at times t 1 = 0, t 2 = ∆t, t 3 = 2∆t, . . .(Z − 1)∆t.For the case N = 1 (single-mode) we consider two functions α 1 (t i ) and β 1 (t i ) (i = 1..Z) that correspond to two probability distributions.We encode their values into the phases of A 1 and B 1 , i.e., A 1

Experimental Set-up
Experimental implementation of the protocols for waveform and data comparison, that includes the quantum inspired Fredkin gate, is shown in Fig. 2. We use a Gaussian beam from a Helium-Neon laser (λ = 633 nm) with a beam waist of ∼ 1.4 mm.The beam shows vertical polarization with the help of a linear polarizer (LP).It is collimated by two lenses (L1 and L2) with focal lengths 10 cm and separated 20 cm.We generate superpositions of Laguerre-Gauss modes (LG) with positive and negative OAM indexes (±m) with the help of a Spatial Light Modulator (SLM, Hamamatsu X10768-01, 792 × 600 pixels with pixel pitch of 20 µm ).The spatially-dependent phase of the incoming beam is tailored with appropriate computed-engineered phase patterns displayed on the SLM.A half-wave plate (not shown in figure) change the polarization orientation of the beam to horizontal as required by the SLM.
The controlled-swap gate is a Mach-Zehnder (MZ) interferometer where light in each arm of the interferometer shows a different polarization.Prior to entering the MZ interferometer, the first Hadamard operation transforms the polarization of the incoming beam into diagonal with the help of a halfwave plate (HWP 1 ).A polarizing beam splitter (PBS 1 ) splits the input beam into the reflected and transmitted beams that have orthogonal polarizations and experience a dissimilar number of reflections given by the number of mirrors present.The OAM of the beams is reversed for an uneven number of reflections and remains the same for an even number of reflections.The phase difference between the two arms is controlled by the displacement of mirrors M 3 and M 4 .
To verify that the polarization-controlled SWAP gate functions correctly we measure the transverse intensity of the beams with a CCD camera (1200 × 1600 pixels of 4.4 × 4.4µm area) before PBS 1 (input beam) and after PBS 2 (output beam).We image the beams with a telescope with two lenses of focal length 12.5 cm (L 3 and L 4 ) and separated 25 cm.The CCD is taken away after recording the spatial shape of the beams.We make measurements for light with horizontal and vertical polarizations.
We use LG modes with index m = ±1 where the amplitude of the input beam is LG 0 1 (r ⊥ ) + iLG 0 −1 (r ⊥ ) and the polarization is diagonal.Figure 3 shows the theoretical prediction and the experimental results.The intensity of the input beam is ∼ ρ 2 exp(−2ρ 2 /w 2 0 ) cos 2 (ϕ − π/4), where ρ and ϕ are the radial and azimuthal coordinates, respectively, in cylindrical coordinates and w 0 is the beam waist.Figures 3(a tal and vertical components of the output beam whose powers (P x and P y respectively) are measured with photodiodes D 1 and D 2 .

Examples of waveform and data comparison
Our system allows to compare waveforms and streams of data that vary in time without measuring its content.In a series of experiments we will consider the case that the variables {A m (t i )} and {B m (t i )} (i = 1..Z) can take only one of two values: A m (t i ), B m (t i ) = ±1.In this case the single mode case (N = 1) corresponds to bits and the two-modes case N = 2 corresponds to quarts.In general there will be M bits (or quarts) whose value will be different, and Z − M bits (quarts) with the same value.We define the mean overlap as The mean overlap γ can be used to estimate how many terms between strings {A m (t i )} and {B m (t i )} are different.If the two waveforms or strings of data to be compared are equal one has γ = −1.
A first example is shown in Figure 4 where we measure the mean overlap γ between two equal square pulses but delayed between them (for further details see Methods section).When the two pulses coincide (zero pulse separation) one obtains γ = −1 as expected.
A second example of waveform comparison is shown in Figure 5.A signal A 1 with constant phase is compared with another signal with a chirp B(t k ) = exp(iαt 2 k ) (see Methods section for details).Γ = −2 corresponds to the case where both waveforms are equal.Increasing the value of the chirp α makes both signals more and more different.We can also compare strings of data.Figure 6 shows the experimental result of comparing two strings of random bits at times t k , A 1 (t k ) and B 1 (t k ), that can take only values of ±1.M/Z is the fraction of pairs of bits that are different.If the two bits are equal, one obtains γ(t k ) = −1, while if they are different γ(t k ) = 1.The inset of Figure 6 shows measurements corresponding to the two cases.If the two series of bits are equal (M = 0) we have γ = −1.If all bits are different (M = Z) we have γ = −1.In between, the value of γ determines the fraction of bits that are different without the need to evaluate the value of each bit.To correct for the deleterious effect of detection noise in the experiment, we made use of a threshold value to decide when two bits are equal or not: two bits are different if the value measured of γ(t k ) was over 0.7, and they are equal if the value measured was below −0.7.
Figure 7 compares two sets of quarts encoded in the amplitudes of two modes, i.e., [A

Differences between quarts can originate from the two bits of the quarts
and Z is the total number of pairs of bits.The inset was obtained using 400 different random bits.The figure made use of a subset of 100 random bits from the 400 bits considered in the inset.
being different (two-bit errors, γ(t k ) = −1) or just one bit of the quarts being different (one-bit errors, γ(t k ) = 0).If the two quarts are equal γ(t k ) = 1.The inset of Figure 7 show experimental results for all of these possibilities.
As shown in the Methods section, for a given fraction of different quarts (M/Z), the value of γ ranges between two well defined values, 1/2 M/Z − 1 and 2 M/Z − 1, corresponding to one and two-bits errors, respectively.Again, in order to correct for the deleterious effect of detection noise in the experiment, we made use of a threshold value to decide when bits are equal or not.

Conclusions
We have demonstrated a quantum-inspired Fredkin gate using light beams carrying orbital angular momentum.Intrinsic characteristics of the spatial shape of these modes allows to implement easily a controlled-swap operation, a gate that is generally difficult to implement and that in many occasions can only work with a certain probability of success.Our results provide a method to estimate how close are two signals by calculating the overlap between them with a simple power measurement.Notice that we can do this in spite that we do not measure the information contained on the signals.The system proposed is another example of the advantages of using light beams with a shape (structured light).
and dr ⊥ u * m 1 (r ⊥ )v m 2 (r ⊥ ) = 0.The electric field writes where x designates horizontal polarization and y designates vertical polarization.Information is encoded into the complex amplitudes A m and B m .If one considers the case A m , B m = ±1, bits can be encoded with the help of a single mode: A 1 and B 1 .Quarts require the use of two modes: A 1 , A 2 and B 1 , B 2 .In our experimental implementation the orthogonal modes are Laguerre-Gauss (LG) beams with topological index m and radial index p = 0: where m = 1, 2, . ... Similarly for modes v m but with m = −1, −2, . ... ρ and ϕ are the radial and azimuthal coordinates, respectively, in cylindrical coordinates, w 0 is the beam waist and C m is a normalisation constant so that ρdρ dϕ|u m (ρ, ϕ)| 2 = 1.We first perform a Hadamard operation that transform the input state with polarization x to a diagonal state with polarization (x + y)/ √ 2. We use the polarization of the modes as control bit.We implement a polarizationcontrolled SWAP gate followed by a second Hadamard operation: Each reflection in a mirror performs the transformation of the topological index m ⇐⇒ −m.Five reflections along the arm of the interferometer with vertical polarization implement the SWAP operation A m ⇐⇒ B m .The beam that propagates along the arm with horizontal polarization suffers an even number of reflections so that the index m keep its sign.We should notice that it would also be possible to implement a general transformation m 1 ⇐⇒ m 2 using a spatial light modulator as demonstrated in [10].
With the help of a polarizing beam splitter we measure the output power carried by modes with orthogonal polarizations: where α is a factor that takes into account the efficiency of detectors and losses of the setup.
In order to evaluate the similarity between two strings of complex numbers A m and B m , without measuring its content directly, we define the degree of overlap γ as: Degree of similarity between two square pulses of the same width but delayed one with respect to the other (Figure 4) To construct the two square pulses we consider 20 times slots.The input signal is thus A while we change the position of the pulse defined by B 1 The height of the square pulses is 2 and the width is 4 time slot.The pulse separation goes from −7∆t to 9∆t, the shortest distance in time slots between bits with the same value +1.When the two square pulses coincide in time (l = 8) we should measure γ = −1.
Degree of similarity between two signal with different chirp (Figure 5) The input signal is A 1 (t k )u 1 (r ⊥ ) + B 1 (t k )v 1 (r ⊥ ).The signal A(t k ) = 1 is compared with a signal with chirp B = exp(iαt 2 k ).We consider values of α that go from 0 with 2π in 16 steps.
The output power in both orthogonal polarizations are: The overlap γ k at time slots k∆t is We measure the sum of all overlap γ k τ where we choose τ = T /40.When we substitute the sum for an integral over a normalized time T = 2 we obtain where FresnelC(X) is the so-called Fresnel cosine function.For no chirp (α = 0) the two waveforms are equal and one has Γ = −2.
Comparison between two strings of bits (Figure 6) The amplitude of the electric field writes From Eq. ( 12) one obtains that the overlap is γ = −A 1 B 1 .If the two bits are equal, we have γ = −1, if they are different we have γ = 1.The variable γ is where M/Z is the fraction of pairs of bits with a different value.
simplicity, let us consider the case where we compare two strings of bits encoded in a single mode.When we measure experimentally the power in the vertical and horizontal polarizations, we will obtain for different bits, and for equal bits.I 0 would be the total power detected with ideal detectors and C 0 is the background noise measured when no input is considered.When varying the degree of difference between bits we can define measure the visibility as V = P y,max − P y,min P y,max + P y,min = I 0 I 0 + 2C 0 The experimentally measured value γexp compared with the ideal value γideal that would be obtained with ideal detectors is

Figure 1 :
Figure 1: The Fredkin gate.(a) Quantum Fredkin gate.The quantum state of input channels 1 and 2 is either swapped or not depending on the value of the control bit |C 3 .(b) Quantum-inspired controlled-swap gate built with spatial modes carrying orbital angular momentum.Indexes m and −m swap their sign or not depending on the polarization of the beam.The state of polarization determines if the gate perform the identity transformation ({A m } = {A m } and {B m } = {B m }) or the swap transformation ({A m } = {B m } and {B m } = {A m }).

Figure 2 :
Figure 2: Experimental setup.Beams with OAM are generated with the help of a spatial light modulator (SLM).The Hadamard gates are implemented with half-wave plates oriented at 22.5 • with respect to the horizontal polarization.The controlled-swap gate is a Mach-Zehnder interferometer where each arm bears a different polarization.PBS i = polarizing beam splitter; L i : lenses; HWP i : Half-wave plates; M i : mirrors; D i : photodetectors; ∆ϕ: adjustable phase.

Figure 3 :
Figure 3: Demonstration of the controlled-swap gate.(a) and (d) corresponds to spatial shape of the input beam.(b) and (e) shows the output beam with vertical polarization where the effect of swap operation can be observed by the change of orientation of the beam with respect to the input beam.(c) and (f) shows the shape of the output beam with horizontal polarization, the same as the one of the input beam.(a), (b) and (c) are theory, (d), (e) and (f) are experimental results.

Figure 4 :
Figure 4: Mean overlap γ between two similar square pulses but delayed one with respect the other.The value of γ is shown as a function of the pulse separation (in number of times slots ∆t).γ = −1 corresponds to the case when the pulses are not delayed.Dots: experimental data.Solid line: theoretical prediction.See Methods section for further details.Error bars represent standard deviation of the value γ.

Figure 5 :
Figure 5: Comparison of two signals with different chirp.Signal A 1 is constant and signal B 1 shows a temporal chirp.Dots: experimental data.Solid line: theoretical prediction.See Methods section for further details.Error bars represent standard deviation of the value Γ.

Figure 6 :
Figure 6: Mean overlap γ as a function of the fraction of pairs of bits that are different.The solid line corresponds to the expression γ = 2 M/Z − 1 (see Methods section) where M is the number of pairs[A 1 (t i ), B 1 (t i )] where each bit have a different value (A 1 (t i ) × B(t i ) = −1)and Z is the total number of pairs of bits.The inset was obtained using 400 different random bits.The figure made use of a subset of 100 random bits from the 400 bits considered in the inset.

Figure 7 :
Figure 7: Mean overlap γ as a function of the fraction of pairs of quarts that are different.The inset shows results for the three possible cases: both quarts are equal (γ = −1), both bits of the quarts are different (γ = 1) or just one of the bits of the pair of quarts is different (γ = 0).The top solid line γ = 2 M/Z −1 corresponds to the case where all of the errors in a string of quarts are two-bits errors.The lower solid line γ = 1/2 M/Z − 1 corresponds to the case where all errors are one-bit errors.Coloured region shows the region of possible events.The inset was obtained using 180 quarts and for the figure we considered randomly 60 quarts of the previous 180 quarts.