Keywords

1 Introduction

Quantum computing is one of the most fascinating technology in the Post-Moore era [31]. It studies computation techniques based on quantum mechanics which promises to outperform its classical counterpart fundamentally. This field was initiated and developed by Paul Benioff in 1980 [3], Richard Feyman in 1982 [11] and David Deutsch in 1985 [8]. In 1994, Peter Shor developed a quantum algorithm solving the integer factorization problem in polynomial time, whereas the well-known classical algorithm takes exponential time [24]. Since the integer factorization forms the base of RSA scheme, a widely used public-key cryptography scheme, quantum computing came to attract more attentions.

There are various technologies [16], such as photons [1, 2, 22], trapped atoms [21, 26], quantum dots [14], superconductors [6], nuclear magnetic resonance (NMR) [25], that can be used for the implementation of quantum computing. On the one hand, researchers have been studying how to reduce decoherence that hinders the scalability of quantum systems. On the other hand, a lot of efforts have been made to construct small-scale quantum devices to demonstrate quantum algorithms. In 2001, Shor’s algorithm was demonstrated on a 7-qubit NMR computer to factor 15 [28]; in 2012, an all-bulk optics system was constructed at the University of Bristol to factor 21 [20]; in 2013, a quantum boson sampling machine is devised using photons [4, 12, 27]. Besides, D-Wave systems, although doubted about its quantum speedup, has been built based on Ising model and superconductor technology [9, 10, 13, 17].

Most of these work implemented quantum algorithm [19] only with quantum hardware [5, 13, 18, 20, 30], just like classical Application Specific Integrated Circuits (ASIC). They did not run programs as a classical computer. Here, we focus on the programmability of a quantum system, and have implemented a demo system based on photons. The main contributions are listed in the following:

  • We propose a programmable structure for two-particle bosonic and fermionic quantum simulation, which completes a certain task controlled by a program. Such a program consists some classical statements and some quantum ones. These quantum statements are executed on the corresponding quantum computation units.

  • We have implemented our programmable structure based on entangled photons. To the best of our knowledge, this is one of rare programmable quantum computation systems. Previous work, except D-Wave systems, did not involve any concept of programming.

In the rest of this paper, we first introduce some preliminary knowledge for our simulation system, then report on the structure and implementation of a programmable two-particle bosonic-fermionic quantum simulation system, and finally present the test and evaluation of our system.

2 Preliminary

Quantum State and Entanglement. Quantum state is used to describe the state of a quantum system. It is denoted by a vector in Hilbert space, \(|\psi \rangle \). In quantum mechanics, a special quantum state, denoted by \(\alpha |\psi _1\rangle +\beta |\psi _2\rangle \), is called a superposition of \(|\psi _1\rangle \) and \(|\psi _2\rangle \), if \(|\psi _1\rangle \) and \(|\psi _2\rangle \) are both quantum states where the system stays. The coefficients satisfy \(|\alpha |^2+|\beta |^2=1\). However, if we measureFootnote 1 the quantum system at \(\alpha |\psi _1\rangle +\beta |\psi _2\rangle \), the state collapses to \(|\psi _1\rangle \) or \(|\psi _2\rangle \) with the probability information. The probability of the possible result \(|\psi _1\rangle \) (\(|\psi _2\rangle \)) is \(|\alpha |^2\) (\(|\beta |^2\)).

A photon can be horizontal polarized or vertical polarized. The polarization state means the oscillating direction of the electrical field of a photon. We can use \(|H\rangle \) to express a horizontal polarized state and \(|V\rangle \) a vertical one. A photon at the superposition state of \(\frac{1}{\sqrt{2}}(|H\rangle +|V\rangle )\) corresponds to the polarization of 45\(^\circ \), as shown in Fig. 1.

As for a quantum system with more than one photon, with 2 photons for example, the system at the state with two horizontal polarized photons is denoted by \(|HH\rangle \). The system with two vertical polarized photons is denoted by \(|VV\rangle \). It also can be at a superposition state, \(\frac{1}{\sqrt{2}}(|HH\rangle +|VV\rangle )\), which is a special state in quantum physics, called entanglement. As is shown in Fig. 1, it cannot be written as a tensor product of two quantum states, while a non-entangled state can be written as a tensor product. The second photon must be in \(|H\rangle \) (\(|V\rangle \)) no matter how far it is from the first one, if we detect the first photon at the state \(|H\rangle \) (\(|V\rangle \)). The special phenomenon is often portrayed as quantum non-locality. There are other types of entangled states in two-photon system, such as \(\frac{1}{\sqrt{2}}(|HH\rangle -|VV\rangle )\), \(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\) and \(\frac{1}{\sqrt{2}}(|HV\rangle -|VH\rangle )\). The latter two are used in our simulation system.

Fig. 1.
figure 1

Superposition and entanglement

Fig. 2.
figure 2

Quantum identical particles: bosons and fermions

Bosons and Fermions. In quantum mechanics, there are two kinds of identical particles: bosons (photons, alpha particles, etc.) and fermions (electrons, protons, neutrons, etc.). Identical particles are particles that cannot be distinguished from each other substantially. Suppose the two particles in Fig. 2 have the same internal properties, such as the spin, the frequency. In classical physics, the situation in which the first particle stays at \(r_1\) and the second particle at \(r_2\) is different from the situation in which the first particle stays at \(r_2\) and the second one at \(r_1\). The former situation is described in \(|r_1(1)r_2(2)\rangle \), and the latter in \(|r_1(2)r_2(1)\rangle \). \(r_a(b)\) indicates the particle b stays at \(r_a\). However, it is impossible to distinguish the first particle from the second one. In this case, the system goes into a superposition of \(|r_1(1)r_2(2)\rangle \) and \(|r_1(2)r_2(1)\rangle \). If the particles are bosons with property of exchange symmetry, the superposition state will be \(\frac{1}{\sqrt{2}}(|r_1(1)r_2(2)\rangle +|r_1(2)r_2(1)\rangle )\). If the particles are fermions with exchange antisymmetry, the superposition state will be \(\frac{1}{\sqrt{2}}(|r_1(1)r_2(2)\rangle -|r_1(2)r_2(1)\rangle )\).

Simulating Two Bosons (Fermions) with Polarization-Entangled Photon Pairs. Photons are bosons as stated in the preceding paragraph. However, the symmetric and antisymmetric entangled photon pairs can mimic two noninteracting bosonic and fermionic particles respectively. The brief principle is derived as follows.

Suppose the quantum simulation network is denoted by a unitary matrix U. If the network has N input ports and N output ports, U will be an \(N\times N\) matrix. With two identical particles injected into the input port \(I_m\) and \(I_n\) (m and n indicate the port number), the system evolves to the quantum state:

$$\begin{aligned} \sum _{i=1}^N\sum _{j=1}^NU_{I_mO_i}U_{I_nO_j}|\ldots ,1_{O_i},\ldots ,1_{O_j},\ldots \rangle , \end{aligned}$$

where \(U_{I_mO_i}\) is the element of U in row \(I_m\) and column \(O_i\). \(|\ldots ,1_{O_i},\ldots ,1_{O_j},\ldots \rangle \) denotes that there are a particle in output port \(O_i\) and a particle in output port \(O_j\), with no particles in other ports.

If the input particles are two identical bosons, the quantum state will be written as

$$\begin{aligned} \frac{1}{2}\sum _{i=1}^N\sum _{j=1}^N\left[ (U_{I_mO_i}U_{I_nO_j}+U_{I_mO_j}U_{I_nO_i}]|\ldots ,1_{O_i},\ldots ,1_{O_j},\ldots \rangle \right] . \end{aligned}$$

The probability of finding a particle in output ports \(O_p\) and \(O_q\) respectively is

$$P_{boson}=\left\{ \begin{array}{cl} |U_{I_mO_i}U_{I_nO_j}+U_{I_mO_j}U_{I_nO_i}|^2 &{} p\ne q \\ \frac{1}{2}|U_{I_mO_i}U_{I_nO_j}+U_{I_mO_j}U_{I_nO_i}|^2 &{} p=q \end{array} \right. .$$

However, if the input particles are two identical fermions, the quantum state and the probability will be

$$\begin{aligned} \frac{1}{2}\sum _{i=1}^N\sum _{j=1}^N\left[ (U_{I_mO_i}U_{I_nO_j}-U_{I_mO_j}U_{I_nO_i}]|\ldots ,1_{O_i},\ldots ,1_{O_j},\ldots \rangle \right] , \end{aligned}$$
$$P_{fermion}=\left\{ \begin{array}{cl} |U_{I_mO_i}U_{I_nO_j}-U_{I_mO_j}U_{I_nO_i}|^2 &{} p\ne q \\ 0 &{} p=q \end{array} \right. .$$

If we inject two photons at entanglement state \(\frac{1}{\sqrt{2}}(|H_{I_m}V_{I_n}+V_{I_m}H_{I_n}\rangle )\) or \(\frac{1}{\sqrt{2}}(|H_{I_m}V_{I_n}-V_{I_m}H_{I_n}\rangle )\), the former state will lead to bosonic behavior and the latter fermionic behavior. As for the \(\frac{1}{\sqrt{2}}(|H_{I_m}V_{I_n}-V_{I_m}H_{I_n}\rangle )\) input, the output quantum state is

$$\begin{aligned} \frac{1}{\sqrt{2}}\sum _{i=1}^N\sum _{j=1}^N\left[ (U_{I_mO_i}U_{I_nO_j}-U_{I_mO_j}U_{I_nO_i})|H_{O_i}V_{O_j}\rangle \right] . \end{aligned}$$

The probability of detecting one photon in \(O_p\) and one in \(O_q\) is

$$P=\left\{ \begin{array}{cl} |U_{I_mO_i}U_{I_nO_j}-U_{I_mO_j}U_{I_nO_i}|^2 &{} p\ne q \\ \frac{1}{2}|U_{I_mO_i}U_{I_nO_j}-U_{I_mO_j}U_{I_nO_i}|^2 &{} p=q \end{array} \right. .$$

It is obvious that the probability of detecting two photons in two distinct output ports is the same as that of two fermions. Therefore, we can use a polarization-entangled photon pair at \(\frac{1}{\sqrt{2}}(|H_{I_m}V_{I_n}-V_{I_m}H_{I_n}\rangle )\) to simulate the behavior of two fermions.

Fig. 3.
figure 3

Structure of the system

3 Structure

As is shown in Fig. 3, we design a structure that adopts a quantum “coprocessor” for two-particle bosonic-fermionic quantum simulation. Unlike most previous quantum experiments with only quantum devices, our structure consists of a computer, home-made circuits and quantum elements used for quantum experiments. A user-designed “program” with both classical statements and quantum statements is executed by the monitor program on computers. When quantum statements are executed, the host will schedule the quantum coprocessor through the controlling driver or the measurement circuits. The driver is applied to receive commands to adjust the entangled states. The measurement circuits are applied to transfer the measured data from quantum parts to the computer.

The quantum coprocessor is constructed with a polarization-entangled two-photon source, an interference-based optic network and several avalanche photodiodes (APDs). The two-photon source produces photon pairs in a certain entangled state controlled by commands. The adjustment is accomplished by a motorized cage rotator, on which a half-wave plate is mounted. The produced photon pairs are send to the interference-based optic network to carry out the simulation. The APDs output electrical signals once they detect photons from optical network. The measurement circuits complete the coincidence counting which is a typical task in photonic experiments.

In this structure, quantum information, carried by photons, only exists in the quantum “coprocessor”; i.e., quantum state like entanglement only occurs in the quantum part. When simulating two bosons, the quantum part employs the entanglement of \(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\). When simulating two fermions, it employs the entanglement of \(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\). Besides, two anyons can also be simulated by other entangled states.

4 Implementation

We have implemented the proposed structure based on photonic system as shown in Fig. 4. The scheme of the quantum coprocessor is shown in Fig. 5. In the following subsection, we will introduce the scheme in detail.

Fig. 4.
figure 4

System implementation

Fig. 5.
figure 5

Scheme of quantum coprocessor for two-particle bosonic-fermionic quantum simulation

4.1 Polarization-Entangled Two-Photon Source

We implement the two-photon source using spontaneous parametric down-conversion (SPDC) [15]. In SPDC, a high-frequency photon can split into a pair of low-frequency photons in accordance with the law of conservation of energy and law of conservation of momentum when it enters a nonlinear crystal. The process of SPDC happens randomly with extremely low probability, which makes the experiment challenging.

A two-crystal geometry is used to construct the polarization-entangled two-photon source. When a vertically polarized photon enters the specially-designed nonlinear crystals, down-conversion will only occur in the first crystal. The emitted light cones will be horizontally polarized, due to the type-I coupling. Similarly, with a horizontally polarized pump injected, down-conversion will only occur in the second crystal, producing otherwise identical cones of vertically polarized photon pairs. A 45\(^\circ \)-polarized pump photon will lead to the same probability of down-conversions in either crystal (neglecting losses from passing through the first crystal). The possible down-conversion processes in the two adjacent nonlinear crystals are coherent with one another, as long as the emitted spatial modes for a given pair of photon are indistinguishable for the two crystals. Consequently, the photons in the state \(\frac{1}{\sqrt{2}}(|HH\rangle +e^{i\phi }|VV\rangle )\) will automatically be created. \(\phi \) is determined by the details of the phase matching and the crystals thickness, and in our experiment we adjust the wave plate group to set different \(\phi \) for different simulation.

Figure 5 shows the experimental setup used to produce and characterize the entangled photons. The pump beam at 405 nm is directed to the two crystals after passing through: a half-wave plate (HWP) and a polarizing beam splitter (PBS) to adjust the power (\(|H\rangle \)); a rotatable HWP to adjust the polarization (\(\frac{1}{\sqrt{2}}(|H\rangle +|V\rangle )\)); and a wave plate group to set \(\phi \) in the final output state (\(\frac{1}{\sqrt{2}}(|H\rangle +e^{\phi _p}|V\rangle )\))Footnote 2. The nonlinear crystals are \(\beta \)-barium borate (BBO). The optic axis of each BBO is cut at 33.9\(^\circ \). For this cut the degenerate-frequency photons(\(\frac{1}{\sqrt{2}}(|HH\rangle +e^{i\phi }|VV\rangle )\)) at 810 nm are emitted into a cone of half-opening angle 3\(^\circ \). An HWP is added to one down-conversion path to get the state of \(\frac{1}{\sqrt{2}}(|HV\rangle +e^{i\phi }|VH\rangle )\). Interference filters (IFs) centered at 810 nm with full width at half maximum (FWHM) of 5 nm are placed to reduce the background noise and select only these (nearly) degenerate photons.

4.2 Interference-Based Optic Network

The interference-based optic network in Fig. 5 completes the quantum simulation task of the system. Beam splitters (BSs) with transmittance rate of 50 % transmit a particle with 50 % probability and reflect it with 50 % probability [23]. If we send a classical particle into any input port of the network, each output port will emit the particle with a probability of 0.25. If we send two classical particles into it, the probability of detecting one particle in port i and one in port j will be 0.0625 (\(0.25\times 0.25\)). i and j are A, B, C or D. The probabilities of all cases are listed in Table 1. However, if we send two bosons into the network, it is impossible to detect bosons from A and C simultaneously because of the interference in the first BS; i.e., the two bosons will either be reflected or transmitted by the first BS. This phenomenon is called photon-bunching in physics. If two fermions are input into the network, they will exhibit antibunching behaviour. Table 1 shows all probabilities in classical, bosonic and fermionic situations. Note that two classical particles are distinguished from each other as discussed in the preceding section. The situation that port A output the first particle and B the second one is different from the situation that A output the second particle and B the first one. We will always get the probability of 1 when summarizing all probabilities of these 16 situations (\(0.0625\times 16=1\)). As for the quantum particles, the two identical particles cannot be distinguished from each other. Therefore, there is no difference between AC and CA in Table 1. In addition, it is impossible for the measurement circuits to distinguish coincidence AC from CA in the experiments.

Table 1. Probabilities of output particles in different ports of the network

The key of the experiment is to realize identical, which requires the minimum distance difference between entangled photons arriving at the first BS. If the distance difference is greater than 40 \(\upmu \)m, the coherent length of down-converted pump, the two particles will be distinguishable.

4.3 Interface Between Classical Host and Quantum Coprocessor

There is a two-way information flow between classical host and quantum coprocessor. The information flow from quantum coprocessor to classical host relies on the measurement circuits, while the information flow from classical host to quantum coprocessor relies on the driver.

From Quantum Coprocessor to Classical Host. APD will output an electrical pulse in the width of 8 ns once it detects a photon. The pulses from different APDs are sent into a coincidence counting circuits to count the coincident events in a duration time. A coincident event is defined as two pulses arising in a coincidence window. In our experiment, the coincidence window is set to 10 ns. As is discussed above, the coincidence count between A and B is apparently more than that between A and C in a two-boson quantum simulation, which is in contrast to the situation for fermions. We have implemented the circuits on a Xilinx FPGA development board.

From Classical Host to Quantum Coprocessor. The information sent from classical host to quantum coprocessor is to adjust \(\phi \) in the entangled state of \(\frac{1}{\sqrt{2}}(|HV\rangle +e^{i\phi }|VH\rangle )\). This task is completed by rotating an HWP on a motorized cage rotator. Once the rotator driver receives commands from the host, it will drive the rotator to the target position. The overall function of the wave plate group can be expressed as the product of Jones matrices in Eq. (1).

$$\begin{aligned} \frac{1}{\sqrt{2}}\left( \begin{array}{cc} 1 &{} -i \\ -i &{} 1 \end{array} \right) \left( \begin{array}{cc} cos2\theta &{} sin2\theta \\ sin2\theta &{} -cos2\theta \end{array} \right) \frac{1}{\sqrt{2}}\left( \begin{array}{cc} 1 &{} -i \\ -i &{} 1 \end{array} \right) =e^{-i2\theta }\left( \begin{array}{cc} 1 &{} 0 \\ 0 &{} e^{i(\pi +4\theta )} \end{array} \right) \end{aligned}$$
(1)

The fast axis of each QWP is set at 45\(^\circ \) with respect to the horizontal axis. When the state of the input pump laser beam is \(\frac{1}{\sqrt{2}}(|H\rangle +|V\rangle )\), the output state will be \(\frac{e^{-i2\theta }}{\sqrt{2}}(|H\rangle +e^{i(\pi +4\theta )}|V\rangle )\). We can adjust \(\phi \) in the final entanglement state by rotating the HWP in the wave plate group. The phase prefactor cannot be detected in our system.

Fig. 6.
figure 6

Moniter program and an instance of quantum “program”

4.4 Quantum “Program”

We use Python to implement the monitor program executing a quantum “program”. As is shown in Fig. 6, the monitor program communicates with quantum coprocessor and schedule a quantum program. Figure 6 gives an example of a quantum program to simulate fermionic behavior. The statements began with QUANTUM_ are quantum statements used to interact with quantum hardware. They are encapsulated into python functions. The sample code gets the coincidence counts and controls the entangled state according to the comparison of the counts. It will find a position with the maximum coincidence count between port A and C, which exhibits the fermionic behavior.

5 Evaluation and Analysis

The performance of the system strongly depends on the quality of polarization-entangled two-photon source. Therefore, we first evaluated the polarization-entangled state and then evaluated the final state.

5.1 Polarization-Entangled Two-Photon Source

There are several typical methods to evaluate the quality of an entangled-photon source. We have measured the polarization correlations, the CHSH inequalityFootnote 3 and the fidelity. The measurement was performed with the pump laser of 63 mW, coincidence window of 10 ns and counting duration of 0.5 s.

Polarization Correlations. The polarization correlations were measured with adjustable polarization analyzers, consisting of a polarizer in front of each coupler. The polarizer in one path was fixed at 0\(^\circ \) or 45\(^\circ \), while the polarizer in the other path was rotated. The coincidence rate displayed sinusoidal fringes with nearly perfect visibility. As is shown in Fig. 7, the visibilities are \(98.28\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\)) and \(99.65\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\)) respectively, with a polarizer fixed at 45\(^\circ \). With a polarizer fixed at 45\(^\circ \), the visibilities are \(98.55\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\)) and \(97.48\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\)) respectively.

Fig. 7.
figure 7

Correlation of two photons in polarization.

CHSH Inequality. CHSH inequality is another method to evaluate the quality of the entanglement [7]. We obtained 2.72 of S and \(15-\sigma \) violation in 0.5 s using Eqs. (2) and (3). In 50 s, we obtained 2.41 of S and \(94-\sigma \) violation.

$$\begin{aligned} E(x,y) = \frac{N(x,y)+N(x_{\bot },y_{\bot })-N(x_{\bot },y)-N(x,y_{\bot })}{N(x,y)+N(x_{\bot },y_{\bot })+N(x_{\bot },y)+N(x,y_{\bot })} \end{aligned}$$
(2)
$$\begin{aligned} S=|E(-45^\circ ,-22.5^\circ )|+|E(-45^\circ ,22.5^\circ )|+|E(0^\circ ,-22.5^\circ )|+|E(0^\circ ,22.5^\circ )| \end{aligned}$$
(3)

Fidelity. We calculated the density matrix by quantum state tomography [29], and got the fidelities of \(94\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle +|VH\rangle )\)) and \(92\,\%\) (\(\frac{1}{\sqrt{2}}(|HV\rangle -|VH\rangle )\)).

5.2 Two-Particle Bosonic-Fermionic Simulation

The control program adjusted the simulation system to the target states automatically. The similarity(S) of fermionic simulation can be calculated as Eq. (4).

$$\begin{aligned} S=\frac{\left( \Sigma _{i,j}\sqrt{P_{ij}D_{ij}}\right) ^2}{\Sigma _{i,j}{P_{ij}}\Sigma _{i,j}{D_{ij}}} \end{aligned}$$
(4)

\(P_{ij}\) is the ideal probability of coincidence between port i and port j given in Table 1. \(D_{ij}\) is the experimental coincidence count between port i and port j.

We have tried several quantum programs with different algorithms to test the system. The similarity for bosonic simulation is \(95.2\,\%\) and for fermionic simulation \(97.1\,\%\). There are several factors accounting for the experimental error. First, the dither of the system, including source and detector, influences the count rates, which are the essential input of the script. Second, the quantum programs still have potential to be optimized.

6 Conclusion

This paper has proposed a programmable structure for two-particle bosonic and fermionic quantum simulation and implemented the whole system based on entangled photons. The evaluation of the experiment has shown the feasibility of this programmable system. Quantum computing is an interdisciplinary field of physics and computer science. We expect to improve our system with the help of methods from both physics and computer science.