Introduction

As quantum counterpart of classical computer, quantum computer reveals incredible efficiency to execute arithmetic tasks and threatens the security of classical communication. Quantum algorithm is the sole of quantum computation, which shows the amazing power of quantum parallelism and quantum interference. It attracts particular concern to develop new quantum algorithms in recent years. The concept of simulating physics progresses with quantum computers was originated in Richard Feynman's observation that computers built from quantum mechanical components would be ideally suited to simulating quantum mechanics1. Since then, the first efficient quantum algorithm was proposed by Deutsch in 19852 and generalized by Deutsch and Jozsa in 19873. Lately, an increasing number of practical programs were presented, such as factoring large integer4, Grover's searching algorithm for database5 and Simon's exponential acceleration algorithm for the black box problem6. What's more, Harrow et al. came up with a quantum scheme to decrease the computational complexity of solving linear system of equations from O(n) to log(n) and this was the first quantum algorithm to work out the most fundamental problems in engineering science7. Some quantum algorithms have been demonstrated in different physical systems, such as ion traps8,9,10,11, superconducting devices12,13,14, optical lattices15,16, quantum dots17,18 and linear optics19,20,21,22,23,24,25. Due to its good scalability, easy-handling and high stability, linear optical system is a good candidate for implementing quantum algorithms.

There is a permutation problem which is to determine the parity of the permutation realized by a black box. For example, considering a black box to realize permutation operation f(x) on a input set x {1, 2, 3}, the output states have six different possible permutations (1, 2, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1), (2, 1, 3) and (1, 3, 2), where the first three are positive cyclic or even permutations and the last three are negative cyclic or odd permutations. To determine the parity of transformation requires the evaluation of f(x) for at least two different input values of x with classical algorithm. However, a new algorithm based on quantum Fourier transformation has been proposed recently to solve this problem with only one step of evaluation26.

In this report, we consider four orthonormal states, i.e., = (1, 0, 0, 0)T,  = (0, 1, 0, 0)T,  = (0, 0, 1, 0)T and  = (0, 0, 0, 1)T and the bijection is f : {1, 2, 3, 4} → {1, 2, 3, 4}. For the input state (1, 2, 3, 4), there are eight different possible output states. These eight output states and the corresponding transformations are divided into two categories as mentioned above. The positive cyclic permutations and the corresponding unitary transformations are:

and the negative cyclic permutations and the corresponding unitary transformations are:

The black box can be regarded as a special device which can realize the corresponding operation for a given permutation task.

To discriminate the parity, a direct running of the operator on the eigen states of ququart will not work. For example, if we input a state and get the output state , this progress corresponds to two possible permutation transformations f3 and f8. Therefore at least twice runnings are needed to evaluate the box as in the classical case.

The quantum circuit to realize the permutation algorithm is shown in Fig. 1. Considering the quantum algorithm of this task, we start from a superposition state

here and UFT is the quantum Fourier transformation:

Figure 1
figure 1

Quantum circuit to realize the permutation algorithm.

UFT denotes the Fourier transformation. The black box contains all the eight permutation operators in the algorithm and is the inverse Fourier transformation.

Then the input state gets through the black box and the output state can be written as

where k = 1, 2,…, 8 labels eight permutation transformations. The output state will reveal the parity of fk—even for and odd for . By employing the inverse Fourier transform on and checking the final state, we will know the parity of permutation is even (odd) when we acquire the state . Thus, the quantum algorithm allows us to determine the parity of a cyclic permutation with only single evaluation of the permutation function instead of two.

Reviewing this algorithm, the Fourier transform UFT and inverse Fourier transform are not necessary if we can directly prepare the superposition state and discriminate the output state and . Luckily, by employing the photon's polarization and spatial mode, we can easily realize the ququart and distinguish and in our experiment. We should address that is also a proper input state for the permutation discrimination and in our experiment, we have demonstrated the algorithm for both and .

Results

In our experiment, we utilize photon's polarization and spatial mode to code the ququart23 and we carry out the whole eight different permutations in the black box which is composed by Dove prism (DP) and half wave plates (HWP). The four eigen states of ququart can be defined as

where H(V) represents horizontal (vertical) polarization and r(l) represents right (left) spatial mode. Thus the input state can be written in the form

Then the black box will carry out the permutation transformation on . For example, suppose the operation is f2, the output state after the black box can be expressed as , which is equal to .

The sketch of the experimental setup is shown in Fig. 2(a). The source is achieved by deeply attenuating coherent light into single photon level (coherent parameter α ≈ 0.1). Polarizer (P) and HWP3 are placed to prepare the initial input polarization state and beam splitter (BS1) is to prepare spatial state. The black box consists of a DP and two HWPs as shown in Fig. 2(b), the dove prism is located at an angle 0° relative to the horizontal plane. The spatial modes (r and l) and polarizations (H and V) will be swapped by DP at 0° and HWP at 45°, respectively. By adding or removing the DP or HWPs, all the permutation transformations can be achieved succinctly.

Figure 2
figure 2

Experimental setup of permutation algorithm.

(a) The single photon source is achieved by deeply attenuating coherent light into single photon level. P denotes the polarizer for preparing horizontal polarization state. Half wave plate (HWP) is used for initial polarization state preparation. Two beam splitters (BS) and four mirrors (M) are used to set up a Mach-Zehnder interferometer. The piezo transmitter (PZT) is used to modulate the phase φ between l and r paths. The black box is used to realize eight permutation transformations. Two detectors (D1 and D2) are single-photon counting modules (SPCM-AQRH-14-FC) used to record the count of photons. (b) The black box consists of a DP at 0° and two HWPs at 45°. Different permutation transformation can be achieve by different combination of DP and HWPs.

In this scheme, we prepare the initial polarization state of photon in a superposition state , then we transform the spatial mode into by BS1. The relative phase φ between two spatial modes can be adjusted by a PZT mounted on the first reflecting mirror (M1). Thus the input state can be written as

Especially, when φ = π/2, the initial state turns to be which is expressed in Eq (7); when φ = 3π/2, the initial state turns to be . Then the state is injected into the black box to carry out the permutation transformations. The states of and in our definition can be discriminated directly by checking the phase in spatial mode . So we let the different spatial states interfere at the second beam splitter (BS2) and the parity of permutation can be determined by checking which single photon detector (D1 or D2) clicks.

Implementation of positive cyclic permutation

For the identity operation f1, we remove the DP and HWPs, the input states pass through the setup remain unchanged. For the f2 operation, DP and HWP1 are required in the setup. When the photons in different paths pass through the DP, they will exchange their paths (lr and rl) and the state changes into . After that, HWP1 at an angle 45° is located at the l path and it will alter horizontal polarization to vertical polarization and vice versa. So far we get the final state which is equal to when φ = π/2 and achieve the mapping operation f2. The f3 operation can be carried out similarly by removing the DP and inserting HWP1 and HWP2. Analogous to the action above, the last positive cyclic permutation f4 can be accomplished by inserting DP and HWP2. When photons pass through the device for the positive cyclic permutation, a simple calculation shows the output state as follows:

Implementation of negative cyclic permutation

f5 can be realized by placing both DP and HWPs into the optical route. If we remove the DP and only place HWP1, when the photons pass this setup, it will go through an f6 transformation. For the purpose of carrying out f7 operation, it is easy to obtain that only a DP is needed. The last operation can be achieved by only employing HWP2 to change the polarization mode on the right route. Similarly, we arrive the final output states:

From the above discussion, we carry out all the eight essential transformations for the parity determining algorithm. All the transformations and corresponding implementation approaches are summarized in Table 1. In particular, when , the output states in Eqs. (9) and (10) are equal to and , respectively. The Eqs. (9) and (10) clearly show that, for different parity of permutations, the polarization of output states are same while the relative phase between two spatial modes are different. This means that we can accomplish the progress of identify only on the spatial qubits and save the inverse Fourier transformation. After the spatial modes interfered on BS2, we can determine the parity is odd (even) when detector D1 (D2) clicks. With similar analysis, when the input state is (relative phase ), we can determine the parity is odd (even) when detector D2 (D1) clicks.

Table 1 Experimental implementation of eight different permutations.

We record the photon counts of the two detectors D1 and D2 with 0.5 V a step of the PZT voltage synchronously. Our experimental results are shown in Fig. 3. Figure 3(a) shows the results of positive cyclic permutation transformations from f1 to f4 and Fig. 3(b) gives the results of the remaining four odd operations. The black square spots represent the counts of D1 and the red triangular spots corresponding to the counts of D2. As we discussed above, when the relative phase φ is equal to (2N + 1/2)π, where N is an integer, only detector D1 clicks for the odd parity and D2 clicks for the even parity. These special points are pointed out by the green dashed line and from these points we can get the parity information of the permutation evidently. Analogously, when the relative phase φ is equal to (2N + 3/2)π, we still can determine the parity by the blue dashed line labelled in Fig. 3.

Figure 3
figure 3

Experimental data of the parity determining algorithm.

(a) positive cyclic permutation operation, (b) negative cyclic permutation operation. Black square dots show the photon counts of D1 and red triangle points show the photon counts of D2. Fitting lines are also displayed. Green (blue) dashed vertical lines are used to mark the proper phases of the initial states , which can be used to perfectly discriminate the parity of transformations.

Discussion

We define as the contrast ratio to evaluate the accuracy of our experiment, where CD1 and CD2 denote the photon counts of D1 and D2, respectively. Theoretically, the contrast ratio η is equal to 1. In our experiment, the contrast ratio is 96 ± 2% for all eight cases. The error and the small shift of the dashed line for different permutations mainly comes from the imperfection of optical devices and removing or adding DP and HWPs.

In conclusion, we briefly introduce the quantum permutation algorithm and put forward a scheme to implement this algorithm by employing linear optical elements . By using composite qubit to realize the ququart, our experiment is greatly simplified both in state preparation and state discrimination, where Fourier transformations UFT and are saved. To our knowledge, this is the first time of realization quantum permutation algorithm in linear optical system. The experimental method we used is simple and pave a way for realization other high-dimensional quantum information tasks. Although this algorithm only provide a two to one speed-up towards classical case, it shows the power of quantum parallelism and quantum computation validly. As we know, generating a new quantum algorithm is quite difficult. We wish this algorithm can expand our thinking for more efficient algorithms. We noticed that this scheme has also been realized in spin- NMR quadrupolar system with four energy levels27,28.

Method

In this experiment, we used a typical Mach-Zehnder interferometer to realize the determination of permutation. The interferometer was located on a special small experimental platform and had a soft buffer to resist the vibration noise. And the experimental elements were placed as compact as possible to make the interferometer more stable. The Mach-Zehnder interferometer was stable enough for us to accomplish the data measurement. Furthermore, we also calibrated the voltage of PZT and the initial phase between two paths each time before inserting or removing the optical components.

For the specific operation such as f2, only one HWP at 45° is needed in the left route, therefore this HWP gives an additional phase because of the intrinsic thickness. With the purpose of eliminating this extra effect, we put another HWP at 0° in the right path to compensate phase without changing the polarization.

Additional Information

How to cite this article: Wang, F. et al. Demonstration of quantum permutation algorithm with a single photon ququart. Sci. Rep. 5, 10995; doi: 10.1038/srep10995 (2015).