Optimal synthesis of the Fredkin gate in a multilevel system

The optimal cost of a three-qubit Fredkin gate is 5 two-qubit entangling gates, and the overhead climbs to 8 when restricted to controlled-not (CNOT) gates. By harnessing higher-dimensional Hilbert spaces, we reduce the cost of a three-qubit Fredkin gate from 8 CNOTs to 5 nearest-neighbor CNOTs. We also present construction of an n-control-qubit Fredkin gate with 2n+3 CNOTs and 2n single-qudit operations. Finally, we design deterministic and nondeterministic three-qubit Fredkin gates in photonic architectures. The cost of a nondeterministic three-qubit Fredkin gate is further reduced to 4 nearest-neighbor CNOTs, and the success of such a gate is heralded by a single-photon detector. Our insights bridge the gap between the theoretical lower bound and the current best result for the n-qubit quantum computation.


Introduction
Quantum computing promises great advantages over its classical counterpart and may be used to solve intractable problems in many areas [1]. A great challenge in building a full-scale quantum computer is the large number of basic gates required, even in small quantum circuits. The cost of a quantum circuit is usually measured by the number of controlled-NOT (CNOT) gates. Several methods have been used to minimize the number of CNOT gates required in a given circuit, including orthogonaltriangular [2], cosine-sine matrix [3], odd-even [4], Khanja and Glaser [5], concurrence canonical [6], and quantum Shannon decompositions (QSD) [7]. Unfortunately, a gap continues to remain between the current minimum number of CNOTs determined with QSD ((23/48) × 4 n − (3/2) × 2 n + 4/3) and the unstructured theoretical lower bound ((4 n − 3n − 1)/4) [8] for an n-qubit quantum circuit. A specific optimal quantum gate usually cannot be produced using the above approaches.
The Fredkin (controlled-swap) gate is a fundamental multi-qubit gate. With the help of Hadamard gates, it can be used to simulate arbitrary multi-qubit quantum computations [9]. Moreover, a Fredkin gate has been applied to quantum algorithms [10,11], quantum fingerprinting [12], quantum state preparation [13], quantum state estimation [14], optimal cloning [15], etc. Early in 1995, Chau and Wilczek [16] decomposed a three-qubit Fredkin gate into 6 two-body operators. In 1996, Smolin and DiVincenzo [17] decomposed a three-qubit Fredkin gate into 5 specific two-qubit entangling gates. In 2015, Yu and Ying [18] proved theoretically that 5 two-qubit gates are sufficient and necessary for implementing a three-qubit Fredkin gate, but a concrete circuit was not provided. In 2015, Ivanov et al. [19] presented a three-qubit Fredkin gate with 4 globe two-qubit gates or 5 nearest-neighbor interactions. If we further restrict our attention to CNOTs, the overhead of a three-qubit Fredkin gate will increase to 8 CNOTs [20], which is less desirable than the minimum of 5 two-qubit gates [18]. In addition, the simplified synthesis of an n-qubit Fredkin gate in terms of CNOTs and single-qubit gates is not presented today.
By transforming the target qubit into a qutrit, Ralph et al. [21] and Lanyon et al. [22] reduced the length of a Toffoli gate from 6 CNOTs to 3 CNOTs. By exploiting qudit catalysis, Ionicioiu et al. [23] reduced the cost of a generalized Toffoli gate from O(n 2 ) two-qubit gates to n two-particle gates. With the help of an accessory Hilbert space, Li et al. [24] optimized an n-qubit universal quantum circuit with (5/16)×4 n −(5/4)×2 n +2n CNOTs when n is even and (5/16)×4 n −2 n +2(n−1) CNOTs when n is odd. Therefore, multi-level physical systems might provide an alternative method for further simplifying quantum circuits. In other words, the cost of a Fredkin gate might be further reduced by using auxiliary dimensions or degrees of freedom (DOFs).
In this paper, we present a procedure for constructing Fredkin gate circuits, including one-control-qubit and n-control-qubit Fredkin gates, in terms of CNOTs and single-qudit operations, where the first target qubit in a Fredkin gate is allowed to be a temporary multi-level system during the gate operation. Synthesis of an n-control-qubit Fredkin involves only 2n + 3 CNOTs and 2n single-qudit operations. Our three-qubit Fredkin beats the constructions based on 5 two-qubit entangling gates [17,18], 6 specific two-body gates [16], and 8 CNOTs [20], in terms of source overheads. Finally, we present deterministic and nondeterministic optical architectures for implementing a three-qubit Fredkin gate, and the gate success is heralded by a single-photon detector. The cost of such a Fredkin gate is further reduced to 4 nearest-neighbor CNOTs.
2. Deterministic Fredkin gates using multi-level systems 2.1. Synthesis of three-qubit Fredkin gate using qutrit As shown in Fig. 1, optimal synthesis of our three-qubit Fredkin gate involves only 5 nearest-neighbor CNOTs and 2 single-qutrit operations. Optimization is achieved by expanding the first target to a qutrit (labeled |0 , |1 , and |2 ); others are labeled as common logic states |0 and |1 (i.e., qubit). All CNOTs act on the qubit-level in the usual manner.
We describe our synthesis in some detail. Suppose a three-qubit state is initially prepared as follows: Here, the coefficients α i (i = 1, 2, · · · , 8) are arbitrary complex numbers satisfying the normalization condition 8 i=1 |α i | 2 = 1. The subscripts c, t 1 , and t 2 represent the control qubit c, first target qubit t 1 , and second target qubit t 2 , respectively. Figure 1. Optimal synthesis of a three-qubit Fredkin gate using CNOTs and singlequtrit operations. The CNOT gate acts on the qubit-level |0 and |1 in the normal manner. The X A operator exchanges the states between |0 and |2 . The controls "•" and "•" are turned on for inputs "|0 " and "|1 ", respectively.
First, as shown in Fig. 1, a CNOT gate with t 2 as the control qubit and t 1 as the target qubit is used to obtain the following: Second, the operator X A is defined in the following matrix representation: The basis {|0 , |1 , |2 } is used to move information from the |0 state of t 1 to the |2 state for bypassing the three subsequent CNOTs. That is, the three subsequent CNOTs only operate on the subspaces Third, the CNOT gate with c (t 1 ) as the control (target) qubit, CNOT gate with t 1 (t 2 ) as the control (target) qubit, and CNOT gate with c (t 1 ) as the control (target) qubit are preformed in succession. This arrangement of three gates transforms the state of the whole system from to Here, the CNOT gate flips the state of the target qubit if and only if (iff) the control qubit is in the state |0 . Hence, the CNOT and CNOT gates are equivalent up to two local bit-flip operations σ x = |0 1| + |1 | 0|, i.e., Finally, X A is used to contract t 1 into the original two-dimensional space, and the CNOT gate with t 2 (t 1 ) as the control (target) qubit is used again to obtain the state From Eqs. (1)- (7), one can see that a three-qubit Fredkin gate can be synthesized from 5 nearest-neighbor CNOTs and 2 single-qutrit gates (see Fig. 1). Our synthesis is optimal as the CNOT-count test suggests its optimization in Ref. [18].

Synthesis of an n-control-qubit Fredkin gate using qudit
Our method can be generalized to simulate an n-control-qubit Fredkin gate by expanding the first target qubit to (n + 2) levels. The n-control-qubit Fredkin gate exchanges information with the two target qubits iff the n-control qubits are all in the |1 state. Fig. 2 specifically describes the synthesis of a two-control-qubit Fredkin using 7 CNOTs and 4 single-qudit gates. The increased efficiency requires use of X A (X B ) to exchange quantum information between |0 (|1 ) and |2 (|3 ), thus subsequent operations can be bypassed. Figure 2. Synthesis of a two-control-qubit Fredkin gate using a four-dimensional Hilbert space. Operations X A and X B complete the transformations |0 ↔ |2 and |1 ↔ |3 , respectively.
Generally, as shown in Fig. 3, 2n+3 CNOTs and 2n single-qudit gates are sufficient for constructing an n-control-qubit Fredkin gate by allowing the first target qubit to temporarily take (n + 2) levels. Evidently, the polynomial number of CNOTs in our scheme is far less than the minimum required number of CNOTs O(n 2 ) [2], and a growing advantage of our presented scheme emerges as n increases. Our simplified outcomes indicate that the gap between the theoretical lower bound [8] and the current minimum result might be bridged by harnessing higher-dimensional Hilbert spaces. Figure 3. Synthesis of an n-control-qubit Fredkin. Operations X A , X B , · · ·, X N complete the transformations |0 ↔ |2 , |1 ↔ |3 , · · ·, |0 ↔ |n + 1 if n is odd, or |0 ↔ |2 , |1 ↔ |3 , · · ·, |1 ↔ |n + 1 if n is even. The control node of the middle CNOT is turned on "•" (corresponding to |0 ) when n is odd and turned on "•" (corresponding to |1 ) when n is even, respectively.

Photonic architecture of the Fredkin gate
Multi-level systems are necessary for the technique we use to simplify a Fredkin gate. Fortunately, photons serve as outstanding candidates for encoding quantum information and naturally offer multi-level structures owing to their wide range of accessible DOFs, including polarization, spatial-mode, time-bin, frequency, and orbital momentum. A linear polarization CNOT gate with 0.75 success probability was prepared by Knill, Laflamme, and Milburn [25] in 2001. A polarization CNOT gate with 0.25 success probability can be obtained when using an entangled photon pair as resources [26]. A measurement-based optical CNOT gate was demonstrated [27] in 2007. Moreover, parallel and hyperparallel deterministic optical CNOT gates prepared from photonmatter emitters have been proposed in recent years [28][29][30][31] and cross-Kerr approaches [32].  Fig. 4 shows the scheme we designed for implementing three-qubit optical Fredkin gate using a qutrit. The gate qubits are encoded in the polarization DOF of a single photon such that |H ≡ |0 and |V ≡ |1 . Here, |H (|V ) represents a horizontally (vertically) polarized photon. X A is a key ingredient in our program, which is achieved through the use of two polarizing beam splitters (PBS 1 and PBS 2 ). PBS 1 and PBS 2 transmit the H-polarized component and reflect the V -polarized component, respectively. The polarization-encoded optical CNOT gate can be fabricated to apply to our schemes by assisting an entangled photon source [26]. The first CNOT gate with t 2 (t 1 ) as the control (target) qubit transforms the total state of the composite system from the initial state |ϕ 0 into |ϕ 1 . Here, and |V c |H, d t 1 |V t 2 to bypass the subsequent three CNOTs. Here, u and d are two spatial modes of the first target photon t 1 . Therefore, after PBS 1 and the subsequent three CNOTs are used in succession, the state of the system becomes Third, PBS 2 contracts the logical states |H, u t 1 , |V, u t 1 |H, d t 1 , and |V, d t 1 into the original polarized states |H t 1 and |V t 1 . Therefore, PBS 2 and the last CNOT gate transform |ϕ 2 into From the aforementioned, one finds that a deterministic optical three-qubit Fredkin gate can, in principle, be prepared with the scheme shown in Fig. 4.

Heralded three-qubit optical Fredkin gate
The cost of the above deterministic optical three-qubit Fredkin gate is 5 nearest-neighbor CNOTs, although this gate can be reduced to a probabilistic three-qubit Fredkin gate containing 4 CNOTs. The operation of this gate can be demonstrated with a singlephoton detector (see Fig. 5). First, the same arguments for the deterministic three-qubit optical Fredkin gate show that, the first three CNOTs, HWP 67.5 • and HWP 22.5 • transform the joint state of the system to Here, half-wave plates HWP 67.5 • and HWP 22.5 • are oriented at 67.5 • and 22.5 • to complete the following transformations: Subsequently, photons emitted from spatial modes u and d converge at PBS 2 , and PBS 2 transforms the state |φ 1 to Here, |H, D and |V, D denote H-polarized and V -polarized photons will be detected by a single-photon detector. Third, the last CNOT gate with t 2 (t 1 ) as the control (target) qubit is executed, resulting in From Eq. (15), one can see that if the single-photon detector is activated, the entire system collapses into the following unwanted state: Otherwise, the entire system will collapse into the following desired state: . (17) Therefore, the quantum circuit shown in Fig. 5 can function as a non-deterministic three-qubit optical quantum Fredkin gate, and the success of such a heralded gate can be demonstrated with a single-photon detector.

Discussion and conclusion
Quantum computation has received increased attentions. Seeking a minimum use of CNOTs is at the core of quantum computing [33,34]. By harnessing a qudit of the first target information carrier, we illustrated a procedure for simulating an n-control-qubit Fredkin gate. Our method helped bridge the gap between the current optimal result and the theoretical lower bound (4 n − 3n − 1)/4 CNOTs for n-qubit quantum circuits. The number of CNOTs implied that our synthesis of a one-control-qubit Fredkin gate is optimal [18] and the 5 CNOTs are all nearest neighbors. Furthermore, one should note that a nonlocal two-qubit gate is not allowed in general. A long-range CNOT gate between the 1 st and 3 rd qubits can be stimulated by 4 nearest-neighbor CNOTs [35]. For the longer-range CNOT gate between the 1 st qubit and the 4 th qubit, the number of the nearest-neighbor CNOTs will increase to 8. Assisted by a further spatial DOF of a single photon, we also designed two compact schemes for implementing a three-qubit deterministic Fredkin gate and a heralded Fredkin gate. The cost of the non-deterministic Fredkin gate can be further reduced to 4 nearest-neighbor CNOTs, which is superior to the post-selected [36], partial-SWAPbased [37], and cross-Kerr-based constructions [38]. Indeed, the superconducting circuit, diamond nitrogen-vacancy (NV) defect center, and optical system can provide multiple levels to implement universal quantum gates. The two computing states and one auxiliary state can be encoded in the higher energy level states in superconducting circuits [39]. In superconducting circuits, the coherence time and energy relaxation time of the higher energy levels exceed 20 µs [40,41] and 30-140 µs [42,43], respectively. Different transformations between high levels can be achieved by applying consecutive π pulses for each sequential transition frequency [40]. The operation time of a two-qubit gate is 40 ns [44,45] in the current superconducting systems. Therefore, our Fredkin gate operation is approximately 200 ns, which is within the coherence time of the multilevel state. The three-level system can also be encoded in long-lived (∼ms coherence time) ground states of the diamond NV defect center |m s = ±1 and |m s = 0 [46]. Alternatively, two computing states are encoded in the electron-spin states |m s = 0 and |m s = 1 (∼ms coherence time), and the auxiliary state is encoded in the 13 C ( 14 N) nuclear-spin |m I = + 1 2 or |m I = − 1 2 (|m I = 0 or |m I = −1 ) with ∼s coherence time in the NV center, respectively [47]. In the NV center, the single-qubit manuscript time is ∼10 ns for the electron spin and greater than 10 µs for the nuclear spin [48]. Moreover, we can also encode computing states in the horizontal polarization state |H and vertical polarization state |V , and the auxiliary state can be encoded in the spatial mode of a photon.
In summary, we have presented a general technique for synthesizing an n-controlqubit Fredkin gate with 2n + 3 CNOTs and 2n single-qubit operations. The synthesis of the three-qubit Fredkin gate is optimal in terms of the number of CNOTs, and all CNOTs are nearest-neighbor interaction CNOTs. Furthermore, using the available spatial DOF of the first target photon, we implemented three-qubit deterministic and non-deterministic optical Fredkin gates. The cost of the latter can be further reduced to 4 nearest-neighbor CNOTs, and the operation of this heralded gate is demonstrated through the use of a single photon detector. Our insights into Fredkin gate construction may contribute to simplification of large quantum circuits and even break through the theoretical lower bound of required CNOT-count.