1 Introduction

Quantum communication, one of the quantum information processing schemes, can transfer the quantum state (quantum or classical information) between distant users (Alice and Bob), and which is necessary in quantum key distribution [1,2,3], quantum secure direct communication [4,5,6,7], quantum signature [8,9,10], quantum teleportation and computation [11,12,13].

The quantum channel (including the entanglement channel) plays an important role in quantum communication. Thus, carriers of information are required in order to communicate and construct the quantum channel. One of the carriers is a flying photon, which is a feasible resource to transfer information and to compose the channel in long-distance communication. However, when we directly transmit the photon, the transfer rate of the photon is exponentially lower due to optical absorption and noise in the channel. This will make long-distance communication and the extended network impractical. Fortunately, Briegel et al. [14] proposed quantum repeaters to overcome this problem. Via the trust centers (TCs) in quantum repeater schemes, the transmission channel (long-distance) between users can be divided into many short segments that share entangled states in order to link, respectively. Finally, through entanglement swapping [15, 16] in segments, entangled states could be distributed between users (constructing the quantum channel for communication). Subsequently, various types of quantum repeater scheme were proposed, such as the single-photon type [17,18,19,20,21] and the coherent-state type [22, 23]. However, entanglement (entangled state) distribution and entanglement swapping in these schemes are probabilistic.

Also, for feasible long-distance communication (including quantum repeaters and quantum networks) with efficiency, quantum memory (which can store entangled states for a sufficiently long time) is necessary during protocols. The energy levels of the trapped atoms and ions may be candidates for a long coherence time. Thus, methods of constructing a quantum channel have been proposed via the various physical resources, such as nitrogen vacancy centers in diamond [24,25,26], quantum dot cavity systems [27,28,29,30,31,32], single trapped ions [33], and atomic ensembles [34,35,36,37,38,39,40]. Recently, as is well known, the states of atoms in cavity quantum electrodynamics (QED) are good physical resources for quantum information processing in terms of long-lived internal states. And many proposals have been put forward, such as realizing the controlled phase flip (CPF) gate [41,42,43,44,45,46], generating entangled states [47,48,49,50], analysis of entangled states [51, 52], quantum cloning [53, 54], and quantum networks [55, 56] in theoretical and experimental researches [41,42,43,44, 57,58,59,60,61,62,63,64,65].

In this paper, we propose schemes that are realizing the generation of entangled states (Bell and Greenberger–Horne–Zeilinger [GHZ] states) and entanglement swapping, based on CPF gates using the interaction of photons and three-level atoms inside optical cavities, to construct an entanglement channel for long-distance communication. The existing schemes [41, 51, 52] employed methods that encode the operations (the generation of entangled states or the controlled operations, and so on) into only the photons via cavity-assisted interactions for quantum information processing. Namely, the result of CPF operation [41] is encoded only two photons via cavity QED and entangled states of between photons are analyzed by measuring atom state in cavity [51, 52]. On the other hand, other schemes [43,44,45, 47, 48, 53, 54, 56] concentrate to encode quantum information into atoms inside the optical cavities (quantum nodes), such as quantum controlled operation [43,44,45], generation of entangled state between atoms in cavities [47, 48, 56], and cloning of quantum state [53, 54]. And flying photons are only used to connect quantum nodes (cavities) in a quantum network. As we know, two resources (photons and trapped atoms in cavities) have the distinguishable advantages. Photons are utilized to the best carriers for fast and reliable communication and being easy to manipulate with linear optical operations, but they are inconvenient to store for a long time, while the trapped atoms, which can maintain a long coherence time, in cavities are ideal for the storage of quantum information. Thus, those can be used to store and operate quantum information in quantum nodes.

In our schemes, thus, to maximize the merits of physical resources (the flying photon and the trapped atom), we design our schemes to be comprised of users (like customers) which are provided with an entangled state or an entanglement channel from the TC (like a channel provider). For quantum communication between users who want to communicate with each other, only the flying photons (entangled states or entanglement channels), which are the best carriers to transfer for communication, are distributed from TC to users. While to manage (provide) entangled states and an entanglement channel, the TC has quantum nodes (trapped atoms inside cavities) for the preservation of long coherence times of quantum states. Furthermore, our schemes, which utilize the CPF gates via cavity QED, are experimentally feasible with a certain probability of success.

2 Realization of the controlled phase flip gate via three-level atom in an optical cavity

We introduce the CPF gate [41, 43, 45], which is shown in Fig. 1, through cavity-assisted interactions with a single photon. The atom in the cavity has a three-level structure, one excited state \(|e\rangle \) and two ground states \(|0\rangle \) and \(|1\rangle \), in hyperfine manifolds. The atomic transition \(|0\rangle \leftrightarrow |e\rangle \) is resonantly coupled to the cavity mode, \(a_{H}\), with the polarization \(|H\rangle \) (horizontal) and is resonantly driven by the input single-photon pulse. Suppose that the polarization \(|H\rangle \) of the photon enters a single-sided cavity, while the polarization \(|V\rangle \) of the photon is reflected to the mirror via the polarizing beam splitter (PBS). When the incoming photon \(|H\rangle \), it will have resonant interaction with the cavity if the atom is in ground state \(|1\rangle \) and, then, acquires a phase of \(\exp (i\pi )\) but its pulse shape is almost unchanged after its reflection. However, if the atom is in ground state \(|0\rangle \), the resonant atom-cavity coupling is significantly detuned from frequency of the incoming photon \(|H\rangle \). Thus, the photon pulse will be reflected by an off-resonant cavity with both shape and phase unchanged.

Fig. 1
figure 1

Controlled phase flip (CPF) operation is realized using a single photon and a three-level atom inside a single-sided cavity. The atomic transition \(|0\rangle \leftrightarrow |e\rangle \) is coupled to the horizontal polarization, \(|H\rangle \), of cavity mode with coupling strength g. When the single-photon pulse passes through the polarizing beam splitter (PBS), \(|H\rangle \) is transmitted and \(|V\rangle \) (vertical polarization) is reflected. By PBS, the transmitted \(|H\rangle \) of the input single-photon pulse resonantly drives the cavity mode and the reflected \(|V\rangle \) of the input single-photon pulse moves to the mirror. After interaction of between a single photon, \(|H\rangle \), and cavity, the phase of photon pulse \(|H\rangle \) (reflected from cavity) will be changed or not and \(|V\rangle \) will be reflected by the mirror. Thus, by reflecting an output single-photon pulse, the CPF gate is realizable

Now, we introduce a theoretical model of the single-sided cavity for the CPF gate [41, 43, 45]. When the trapped atom is in ground state \(|0\rangle \), the interaction Hamiltonian of the system of atom-cavity is described as

$$\begin{aligned} H=g\left( |e\rangle \langle 0|a_{H}+|0\rangle \langle e|a_{H}^{+}\right) , \end{aligned}$$
(1)

where \(\hbar =1, g\) is the atom-cavity coupling strength and \(a_{H}\) is the cavity mode with horizontal polarization. According to quantum Langevian equation, the cavity mode, \(a_{H} (t)\), is driven by the incoming photon pulse \(|H\rangle \) (corresponding cavity input operator: \(a_{H}^{{\mathrm{in}}})\), having duration time T, through

$$\begin{aligned} \dot{a}_H (t)=-i\left[ a_{H} (t),H \right] -\left( i\delta +\frac{\kappa }{2}\right) a_{H} (t)-\sqrt{\kappa }a_{H}^{\mathrm{in}} (t), \end{aligned}$$
(2)

where \(\delta \) (here \(\delta =0\) in our scheme, but we retain it for the following analysis) denotes the detuning of cavity mode from the atomic transition and \(\kappa \) is the decay rate of the cavity mode. And the cavity output \(a_H^{\mathrm{out}} \) operator is related with the cavity input operator, \(a_H^{\mathrm{in}} \), by the input-output relation

$$\begin{aligned} a_{H}^{\mathrm{out}} (t)=a_H^{\mathrm{in}} (t)+\sqrt{\kappa }a_H (t), \end{aligned}$$
(3)

where the cavity input and output operators satisfy the commutation relations \([a_{H}^{\mathrm{in}} (t),a_{H}^{\mathrm{in+}} (t')] =[a_{H}^{\mathrm{out}} (t),a_{H}^{\mathrm{out+}}(t')]=\delta (t-t')\). While the polarization \(|V\rangle \) of the photon pulse is reflected by mirror, the input-output relation is \(a_V^{\mathrm{out}} (t)=a_V^{\mathrm{in}} (t)\). In the case of the input photon pulse duration \(T>>1/\kappa \), the input-output relation of the single-sided cavity is given by

$$\begin{aligned} a_H^{\mathrm{out}} (t)\approx \frac{i\delta -\kappa /2}{i\delta +\kappa /2}a_H^{\mathrm{in}} (t). \end{aligned}$$
(4)

If the trapped atom is in the state \(|1\rangle \), the Hamiltonian H in Eq. (1) does not operate and induces \(\delta =0\). And we can obtain the input-output relation as \(a_H^{\mathrm{out}} (t)\approx -a_H^{\mathrm{in}} (t)\). Thus, the output pulse \(|H\rangle \) can acquire a phase of \(\exp (i\pi )\) from the cavity. However, the trapped atom is in the state \(|0\rangle \), the effective detuning of the two dressed cavity modes from input pulse are \(\delta =\pm g\), respectively, for strong coupling \(g>>(\kappa , \gamma )\), where \(\gamma \) is the spontaneous high-level emission rate. Thus, we can obtain the input-output relation as \(a_H^{\mathrm{out}} (t)\approx a_H^{\mathrm{in}} (t)\) from Eq. (4). Consequently, the operation of the CPF gate between the atom and the photon pulse is given by \(\hbox {U}_{CPF} =\exp (i\pi |1\rangle \langle 1 |\otimes |H\rangle \langle H|)\). Subsequently, we will utilize this CPF gate in our schemes as the quantum node in the TC.

3 Generation of Bell and GHZ states and entanglement swapping

Network communication is extended from the users of a small group to a large number of multi-users to let them securely communicate. As the number of linked users grows for communication, the TC (the channel provider) that can produce and distribute the channel needs to enhance efficiency. Also, it is possible for the TC to take charge of a trusted third party, which effectively certifies the authentication of users in the network. Therefore, researchers have proposed various protocols [2, 8,9,10, 55, 56] including the TC (trusted third party, or Trent) for efficiency and security.

3.1 Generation of Bell state and GHZ state of a TC having quantum nodes through cavity QED

We present two schemes for the generation Bell and GHZ states via cavity QED. For efficient and secure communication, we employ a TC (provider and manager), which has the optical cavities (quantum nodes) in our schemes. Furthermore, the TC possesses the atoms that make long-time storage possible in optical cavities (quantum nodes) to facilitate implementation of quantum information processing. Flying photons are used for communication to transfer the information between users.

Fig. 2
figure 2

Left figure theoretically represents a schematic setup for generating and distributing a Bell state by the TC. The right setup shows that the left figure is experimentally implemented utilizing cavity QED in which the TC keeps atom 1 inside cavity 1 (the quantum node), where C is a circulator. After photon A is reflected from the quantum node (cavity 1), it is correlated to atom 1 (the generation of a Bell state). Then, a reflected photon A is transferred to Alice. Finally, the entanglement (quantum) channel, which entangled between the state of atom 1 (stored by the TC) and the state of photon A (with Alice), is constructed between the TC and Alice for quantum communication

As shown in Fig. 2, the TC in the right-hand scheme generates a Bell state between atom 1 and photon A and distributes it to Alice using a quantum node (cavity 1). We suppose that the TC prepares the state of atom 1 inside cavity 1 as \(|-,a\rangle _{1}\equiv (|0\rangle _{1}-|1\rangle _{1})/\sqrt{2}\) (the superposition of the ground states), and the state of photon A is \(|+,p\rangle _{\mathrm{A}}\equiv (|H\rangle _{\mathrm{A}}+|V\rangle _{\mathrm{A}})/\sqrt{2}\) (superposition of the polarizations). After the interaction (\(\hbox {U}_{CPF}\): CPF operation, as described in Sect. 2) of the photon–atom in the quantum node (cavity 1), the initial state \(|-,a\rangle _{1}|+,p\rangle _{\mathrm{A}}\) is transformed to

$$\begin{aligned} \hbox {U}_{CPF} \left( |-,a\rangle _{1}|+,p\rangle _{\mathrm{A}}\right) \rightarrow |{{\varvec{\Phi }}}_{ap}^{+}\rangle _{\mathrm{1A}} =\frac{1}{\sqrt{2}}\left( |+,a\rangle _{1}|H\rangle _{\mathrm{A}} +|-,a\rangle _{1}|V\rangle _{\mathrm{A}}\right) , \end{aligned}$$
(5)

where \(|\pm ,a\rangle _{1}\equiv (|0\rangle _{1}\pm |1\rangle _{1})/\sqrt{2}\) and \(|\pm ,P\rangle _{\mathrm{A}}\equiv (|H\rangle _{\mathrm{A}} \pm |V\rangle _{\mathrm{A}})/\sqrt{2}\). Also, all basis sets of \(\{|+,a\rangle _{1}, |-,a\rangle _{1}\}, \{|+,p\rangle _{\mathrm{A}}, |-,p\rangle _{\mathrm{A}}\}\) and \(\{|0\rangle _{1}, |1\rangle _{1}\}, \{|H\rangle _{\mathrm{A}}, |V\rangle _{\mathrm{A}}\}\) are orthogonal. Then, the TC sends photon A to Alice. Finally, the TC (atom 1) and Alice (photon A) will share a Bell state \(|{\varvec{\Phi }}_{ap}^{+}\rangle _{\mathrm{1A}}\) for the entanglement channel. In addition, all output states (4-Bell states) according to the four different kinds of input state are given by

$$\begin{aligned}&|-,a\rangle _{1}|\pm ,p\rangle _{\mathrm{A}} {\xrightarrow {\mathrm{quantum~node:~photon~A}}}\left| {\varvec{\Phi }}_{ap}^{\pm }\right\rangle _{\mathrm{1A}} =\frac{1}{\sqrt{2}}\left( |+,a\rangle _{1} |H\rangle _{\mathrm{A}}\pm |-,a\rangle _{1} |V\rangle _{\mathrm{A}}\right) \nonumber \\&|+,a\rangle _{1}|\pm ,p\rangle _{\mathrm{A}} {\xrightarrow {\mathrm{quantum~node:~photon~A}}}\left| {\varvec{\Psi }}_{ap}^\pm \right\rangle _{\mathrm{1A}}=\frac{1}{\sqrt{2}}\left( |-,a\rangle _{1}|H\rangle _{\mathrm{A}} \pm |+,a\rangle _{1}|V\rangle _{\mathrm{A}}\right) .\nonumber \\ \end{aligned}$$
(6)

Consequently, this scheme can generate and distribute 4-Bell states (between atom 1 and photon A) using the TC’s quantum node via cavity QED.

Fig. 3
figure 3

Left figure theoretically represents a schematic setup of generating and distributing a GHZ state by the TC. The right setup shows that the left figure is experimentally implemented utilizing cavity QED, in which the TC keeps atom 1 inside cavity 1 (the quantum node), where C is a circulator, HWP is a half wave plate, and S1 and S2 are two switches. The HWP is used as a Hadamard gate and the switches are controlled to transmit or reflect photons according to a time table (black-line box). After two photons A and B are reflected from the quantum node (cavity 1), they are correlated to atom 1 (the generation of the GHZ state). Then, reflected photons A and B are transferred to Alice and Bob. Finally, the entanglement (quantum) channel, which was entangled between the state of atom 1 (stored by the TC) and the states of photon A (Alice) and photon B (Bob), is constructed between the TC, Alice, and Bob for quantum communication

Next, we propose generation of a GHZ state via linear optical devices and an optical cavity in the TC for two users (Alice and Bob). As shown in Fig. 3, the TC in the right-hand scheme generates and distributes a GHZ state between atom 1 and photons A and B, with Alice and Bob using a quantum node (cavity 1). The \(22.5^{\circ }\)-titled half wave plate (HWP) can realize the Hadamard operation as \(|H\rangle \rightarrow (|H\rangle +|V\rangle )/\sqrt{2}\) and \(|V\rangle \rightarrow (|H\rangle -|V\rangle )/\sqrt{2}\). Switch 1 (S1) and Switch 2 (S2) can be controlled in the operation of transmitting or reflecting the states of the photon, depending on the time table (black-line box) in Fig. 3. Let us consider the preparation of the states of atom 1 and photons A and B as \(|+,a\rangle _{1}|+,p\rangle _{\mathrm{A}}|+,p\rangle _{\mathrm{B}}\) by the TC. After the photon A passes through S1 (transmission), it interacts with the quantum node (cavity 1) in CPF operation \((\hbox {U}_{CPF})\), as described in Sect. 2. The transformed state \(|{\varvec{\upvarphi }}_{1}\rangle _{\mathrm{1AB}}\) is expressed as

$$\begin{aligned}&|+,a\rangle _{1}|+,p\rangle _{\mathrm{A}} |+,p\rangle _{\mathrm{B}} {\xrightarrow {\mathrm{S1~+~quantum~node:~photon~A}}} \left| {\varvec{\upvarphi }}_{1} \right\rangle _{\mathrm{1AB}}\nonumber \\&\quad =\frac{1}{\sqrt{2}}\left( |-,a\rangle _{1} |H\rangle _{\mathrm{A}}+|+,a\rangle _{1} |V\rangle _{\mathrm{A}}\right) |+,p\rangle _{\mathrm{B}}. \end{aligned}$$
(7)

And then, after the photon B sequentially passes through S1 (reflection) and the quantum node (cavity 1), the state \(|{\varvec{\upvarphi }}_{2}\rangle _{\mathrm{1AB}}\) is expressed as

$$\begin{aligned}&|{\varvec{\upvarphi }}_{1}\rangle _{\mathrm{1AB}}{\xrightarrow {\mathrm{S1~+~quantum~node:~photon~B}}} \nonumber \\&\quad |{\varvec{\upvarphi }}_{2}\rangle _{\mathrm{1AB}} =\frac{1}{2}\left( |+,a\rangle _{1}|H\rangle _{\mathrm{A}} |H\rangle _{\mathrm{B}}+|-,a\rangle _{1}|H\rangle _{\mathrm{A}} |V\rangle _{\mathrm{B}}+|-,a\rangle _{1}|V\rangle _{\mathrm{A}} |H\rangle _{\mathrm{B}}\right. \nonumber \\&\qquad \left. +|+,a\rangle _{1}|V\rangle _{\mathrm{A}} |V\rangle _{\mathrm{B}}\right) \nonumber \\&\qquad =\frac{1}{\sqrt{2}}\left( |0\rangle _{1}|+,p\rangle _{\mathrm{A}}|+,p \rangle _{\mathrm{B}}+|1\rangle _{1}|-,p\rangle _{\mathrm{A}}|-,p\rangle _{\mathrm{B}}\right) . \end{aligned}$$
(8)

Subsequently, two photons A and B in the state \(|{\varvec{\upvarphi }}_{2} \rangle _{\mathrm{1AB}}\) consecutively pass through the HWP and S2 (photon A: reflection and, then, photon B: transmission), the final state, \(|{\varvec{\upvarphi }}_{\mathrm{f}} \rangle _{\mathrm{1AB}}\), is given by

$$\begin{aligned} |{\varvec{\upvarphi }}_{1}\rangle _{\mathrm{1AB}} {\xrightarrow {\mathrm{HWP~+~S2:~photon~A~and~B}}}\left| {\varvec{\upvarphi }}_{\mathrm{f}}\right\rangle _{\mathrm{1AB}} =\frac{1}{\sqrt{2}}\left( |0\rangle _{1}|H\rangle _{\mathrm{A}} |H\rangle _{\mathrm{B}}+|1\rangle _{1} |V\rangle _{\mathrm{A}} |V\rangle _{\mathrm{B}}\right) .\nonumber \\ \end{aligned}$$
(9)

Then, the TC sends photon A to Alice and photon B to Bob. Finally, the TC (atom 1) and Alice (photon A) and Bob (photon B) will share a GHZ state, \(|{\varvec{\upvarphi }}_{\mathrm{f}}\rangle _{\mathrm{1AB}}\) for an entanglement channel. All output states (GHZ states) according to the input states are listed in Table 1.

Table 1 All possible GHZ states can be generated by linear optical devices and a single atom in a cavity (quantum node), according to the prepared states of the TC

Consequently, this scheme can generate and distribute GHZ states (between atom 1 and two photons, A and B) using the TC’s quantum node via cavity QED.

Fig. 4
figure 4

Left figure theoretically represents a schematic setup of entanglement swapping by the TC. This theoretical scheme is composed of two steps: The first step is the distribution of two Bell states, and the second step is the detection of probe photon and two single-qubit measurements (theoretically corresponding to Bell state measurement) for entanglement swapping. The right setup shows that the left figure is experimentally implemented utilizing cavity QED, in which the TC keeps atoms 1 and 2 inside cavities 1 and 2 (the quantum nodes), where C is a circulator, HWP is a half wave plate, S1 and S2 are two switches, and DL is the delayed loop. Switches are controlled to transmit or reflect photons according to a time table (black-line box). The DL is used to control (or synchronize) the optical lengths of the photons. After two photons, A and B, are reflected from cavity 1 and cavity 2, respectively, two Bell states (atom 1–photon A and atom 2–photon B) are generated. Then, reflected photons A and B are transferred to Alice and Bob (constructed with two entanglement channels of TC–Alice and TC–Bob). For entanglement swapping (TC–Alice and TC–Bob \(\rightarrow \) Alice–Bob), the TC performs single-qubit measurements in terms of atoms 1 and 2 in the cavities and the probe photon P, which interacted with the quantum nodes (cavities 1 and 2). Finally, the entanglement (quantum) channel, which is entangled between the state of photon A of Alice and the state of photon B of Bob, is constructed between Alice and Bob by the TC for quantum communication

3.2 Entanglement swapping scheme of a TC with quantum nodes via cavity QED

We propose an entanglement swapping scheme, as shown in Fig. 4, via linear optical devices and two optical cavities (two quantum nodes) in a TC for constructing an entanglement channel between Alice and Bob. Our scheme is comprised of two quantum nodes (two atoms inside the two cavities) and three flying photons (A, B, and P). The TC in our scheme can produce the distribution of two entangled states between atom 1 and photon A (1-Bell state: TC–Alice) and between atom 2 and photon B (1-Bell state: TC–Bob) via quantum nodes (cavity 1 and 2). It can then compose the entanglement channel (Bell state between photon A and photon B: Alice–Bob) by entanglement swapping. By employing photon P (we call this the probe photon) in the proposed scheme, we can swap entangled states through single-qubit measurements without Bell state measurement. In other words, we can simply perform single-qubit measurements of atoms 1 and 2 and probe photon P, instead of Bell measurement, which is difficult to realize experimentally. Therefore, compared with the theoretical scheme (the left side in Fig. 4), our scheme can enhance the experimental implementation and efficiency of entanglement swapping by not using Bell state measurement. For example, the TC prepares the initial state as \(|{\varvec{\uppsi }}_{\mathrm{in}} \rangle _{\mathrm{P1A2B}}=|+,p\rangle _{\mathrm{P}}|+,a\rangle _{1}|+,p\rangle _{\mathrm{A}} |+,a\rangle _{2}|+,p\rangle _{\mathrm{B}}\), where subscript P means the state of probe photon P. After photon A passes through S1 (reflection), photon A is reflected from cavity 1 (a CPF operation), and photon B is reflected from cavity 2 (a CPF operation), the state \(|{\varvec{\uppsi }}_{\mathrm{in}}\rangle _{\mathrm{P1A2B}}\) is transformed as follows:

$$\begin{aligned} |{\varvec{\uppsi }}_{\mathrm{in}}\rangle _{\mathrm{P1A2B}} {\xrightarrow {\mathrm{S1,~2~+~quantum~node~1, 2:~photon~A~and~B}}}\left| {\varvec{\uppsi }}_{1}\right\rangle _{\mathrm{P1A2B}}= & {} |+,p\rangle _{\mathrm{P}} |{\varvec{\Psi }}_{ap}^{+}\rangle _{\mathrm{1A}}|{\varvec{\Psi }}_{ap}^{+} \rangle _{\mathrm{2B}},\nonumber \\ \end{aligned}$$
(10)

where \(|{\varvec{\Psi }}_{ap}^{\pm }\rangle _{\mathrm{1A}}, | {\varvec{\Psi }}_{ap}^{\pm }\rangle _{\mathrm{2B}}\) are Bell states (atom–photon), as described in Eq. (6). Then, the TC sends two photons, A and B, to Alice and Bob, respectively, (constructing two entanglement channels: TC–Alice and TC–Bob). And then, after photon P (the probe photon) passes sequentially along path (S1: reflection \(\rightarrow \) cavity \(1 \rightarrow \) S1: reflection), the transformed state \(|{\varvec{\uppsi }}_{2}\rangle _{\mathrm{P1A2B}}\) is expressed as

$$\begin{aligned}&|{\varvec{\uppsi }}_{1}\rangle _{\mathrm{P1A2B}} {\xrightarrow {\mathrm{S1~+~quantum~node~1~+~S1:~photon~P}}}\left| {{\varvec{\uppsi }}}_{2}\right\rangle _{\mathrm{P1A2B}}\nonumber \\&\quad =\frac{1}{\sqrt{2}}\left( |H\rangle _{\mathrm{P}}|{\varvec{\Phi }}_{ap}^{+} \rangle _{\mathrm{1A}} +|V\rangle _{\mathrm{P}}|{\varvec{\Psi }}_{ap}^{+}\rangle _{\mathrm{1A}}\right) |{\varvec{\Psi }} _{ap}^+\rangle _{\mathrm{2B}} . \end{aligned}$$
(11)

Then, the state, \(|{\varvec{\uppsi }}_{3}\rangle _{\mathrm{P1A2B}} \), in which the photon P moves along path (cavity 2 \(\rightarrow \) S2: transmission) is given by

$$\begin{aligned}&|{\varvec{\uppsi }}_{2}\rangle _{\mathrm{P1A2B}} {\xrightarrow {\mathrm{quantum~node~2~+~S2:~photon~P}}} \left| {\varvec{\uppsi }}_{3}\right\rangle _{\mathrm{P1A2B}}\nonumber \\&\quad =\frac{1}{\sqrt{2}}\left( |H\rangle _{\mathrm{P}}|{\varvec{\Phi }}_{ap}^{+} \rangle _{\mathrm{1A}}|{\varvec{\Phi }}_{ap}^{+}\rangle _{\mathrm{2B}} +|V\rangle _{\mathrm{P}}|{\varvec{\Psi }}_{ap}^{\mathrm{+}} \rangle _{\mathrm{1A}}|{\varvec{\Psi }}_{ap}^{+}\rangle _{\mathrm{2B}}\right) . \end{aligned}$$
(12)

Subsequently, the photon P passes through the HWP and PBS in sequence. Then, before performing single-qubit measurements, the final state, \(|{\varvec{\uppsi }}_{\mathrm{f}}\rangle _{\mathrm{P12AB}} \), of the system between atoms (1 and 2) and photons (A, B and P) is given by

$$\begin{aligned}&|{\varvec{\uppsi }}_{3}\rangle _{\mathrm{P1A2B}}{\xrightarrow {{\mathrm{HWP}}\rightarrow {\mathrm{PBS:~photon~P}}}}\nonumber \\&\quad |{\varvec{\uppsi }}_{\mathrm{f}}\rangle _{\mathrm{P12AB}} =\frac{1}{2}\left[ |H\rangle _{\mathrm{P}} \left( |{\varvec{\Phi }}_{aa}^{+}\rangle _{12} |{\varvec{\Phi }}_{pp}^{+}\rangle _{\mathrm{AB}} +|{\varvec{\Psi }}_{aa}^{+}\rangle _{12} |{\varvec{\Psi }}_{pp}^{+}\rangle _{\mathrm{AB}}\right) \right. \nonumber \\&\qquad \left. +|V\rangle _{\mathrm{P}} \left( |{\varvec{\Phi }}_{aa}^{-} \rangle _{12}|{\varvec{\Phi }}_{pp}^{-} \rangle _{\mathrm{AB}}+|{\varvec{\Psi }}_{aa}^{-}\rangle _{12} |{\varvec{\Psi }}_{pp}^{-}\rangle _{\mathrm{AB}}\right) \right] , \end{aligned}$$
(13)
Table 2 All possible Bell states (Alice–Bob) can be generated by linear optical devices and two atoms in cavities (quantum nodes) according to the pre-distributed Bell states (TC–Alice and TC–Bob), and the TC’s measurement outcomes using single-qubit measurements

where \(\{|{\varvec{\Phi }}_{aa}^{\pm }\rangle _{\mathrm{12}}, |{\varvec{\Psi }}_{aa}^{\pm }\rangle _{\mathrm{12}}\} \equiv \{(|+,a\rangle _{1}|+,a\rangle _{2}\pm |-,a\rangle _{1}|-,a\rangle _{2})/\sqrt{2}, (|+,a\rangle _{1}|-,a\rangle _{2}\pm |-,a\rangle _{1}|+,a\rangle _{2})/\sqrt{2}\}\) are Bell states between the atoms in the quantum nodes of the TC. And \(\{|{\varvec{\Phi }}_{pp}^{\pm }\rangle _{\mathrm{AB}}, |{\varvec{\Psi }}_{pp}^{\pm }\rangle _{\mathrm{AB}}\}\equiv \{(|H\rangle _{\mathrm{A}}|H\rangle _{\mathrm{B}}\pm |V\rangle _{\mathrm{A}}|V\rangle _{\mathrm{B}} )/\sqrt{2}, (|H\rangle _{\mathrm{A}}|V\rangle _{\mathrm{B}}\pm |V\rangle _{\mathrm{A}} H\rangle _{\mathrm{B}})/\sqrt{2}\}\) are Bell states between photons Alice and Bob. Finally, when the TC measures probe photon P and the two atoms, 1 and 2, on the basis of \(\{|H\rangle , |V\rangle \}\) and \(\{|+,a\rangle |-,a\rangle \}\) (three times single-qubit measurements), if the result is \(\{|V\rangle _{\mathrm{P}},|+,a\rangle _{1}, |+,a\rangle _{2}\}\), then Alice and Bob can be shared as \(|{\varvec{\Phi }}_{pp}^{-}\rangle _{\mathrm{AB}} =(|H\rangle _{\mathrm{A}}|H\rangle _{\mathrm{B}}-|V\rangle _{\mathrm{A}} |V\rangle _{\mathrm{B}})/\sqrt{2}\) (a Bell state between photons A and B) in Eq. (13). All possible Bell states between Alice and Bob are listed in Table 2, depending on the results of single-qubit measurements (the polarization of probe photon P, and the states of atom 1 and atom 2 in the quantum nodes). The second column in Table 2 lists the combinations of the pre-shared two Bell states (TC–Alice: atom 1–photon A, and TC–Bob: atom 2–photon B), as in Eq. (10), before measurement of probe photon P and the atoms by the TC. Consequently, we acquire the entanglement swapping operation to construct an entanglement channel between two users for communication via cavity QED.

4 Discussion and conclusion

We first discuss the experimental feasibility of our schemes. The experimental components of our schemes are linear optical devices, HWPs, circulators and switches, and CPF gates, which can be implemented via three-level atoms inside optical cavities (cavity QED). The linear optical devices, HWPs, circulators, and switches are easy to realize experimentally with high efficiency and performance for quantum information processing schemes [43, 45, 48,49,50,51,52,53,54]. In our scheme, the critical elements are CPF gates via cavity QED [41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]. The feasible implementation of the CPF gate, which has high fidelity and a low error rate in the intermediate coupling region, has been researched under experimental conditions [41, 43, 60,61,62,63,64,65]. For the efficiency of the CPF gate (TC’s quantum node), if we can take the experimental parameters (applied to our schemes) \(T>>1/\kappa \) for strong coupling \(g>>(\kappa ,\gamma )\), then the operation of photon-atom is given by \(\hbox {U}_{CPF}=\exp (i\pi |1\rangle \langle 1|\otimes |H\rangle \langle H|)\) under the ideal condition after the interaction of a photon and three-level atom inside cavity, as described in Sect. 2. Then, we can calculate the fidelity of the output state from the CPF gate between the ideal state \(| {\psi _{\mathrm{Id}} } \rangle \) and the practical state \(|\psi _{\mathrm{Pr}}\rangle \) when the input state is \(|+,a\rangle \otimes |+,p\rangle \).

Fig. 5
figure 5

Fidelity of the output states with respect to the differences in the atom-cavity coupling strength \(g/\kappa \). Here, we have taken the condition \(T>>1/\kappa \) and \(g>>(\kappa ,\gamma )\) and can calculate the fidelity of output state as \(\hbox {F}=\left| \sqrt{\langle \psi _{\mathrm{pr}}|\psi _{\mathrm{Id}}\rangle \langle \psi _{\mathrm{Id}}|\psi _{\mathrm{pr}}\rangle }\right| \) where \(|\psi _{\mathrm{Id}}\rangle \) and \(|\psi _{\mathrm{pr}}\rangle \) are the ideal and practical state form the CPF gate

Figure 5 shows the fidelity of the CPF gate (quantum node) in our schemes according to the differences in the atom-cavity coupling strength \(g/\kappa \) for \(T>>1/\kappa \) and \(g>>(\kappa ,\gamma )\). When \(g=0.5\kappa , g=1\kappa \) and \(g=2.4\kappa \) with \(T\sim 5\,\mu s\), the fidelities are 0.79, 0.922 and 0.984. These results mean that if g is getting larger than \(\kappa \), then we can get high fidelity \((\hbox {F}\rightarrow 1)\). According to the above analysis, considering a neutral atom trapped in an optical cavity [41] with \(T=240/\kappa (\kappa T>>1)\), the photon pulse duration (width), \(T/5\sim 1\mu s\), and the fidelity, \(\hbox {F}\), of the CPF gate can be calculated at about 99.9%. When the pulse (photon) is reflected from the cavity, the relative shape change of the output pulse is smaller than \(10^{-4}\) for g, varying from \(6\kappa \) to \(\kappa \). Also, in practice (based on current experiments), the probability, \(P_{s}\), of spontaneous emission, which incurs the photon loss, is \(P_s =3.2\% \) for \((g,\kappa , \gamma )/2\pi \approx (25, 8, 5.2)\hbox {MHz}\). Xiao et al. [43] demonstrated that the atomic trivalent rare-earth ions \(\hbox {Eu}^{3+}\) (or \(\Pr ^{3+})\) in a silica-microsphere cavity with fiber tapers are utilized for longer coherence time and a lower spontaneous emission rate, instead of the neutral atoms. Fidelity \(\hbox {F}\) and the probability \(P_{s}\) of spontaneous emission error in the CPF gate can reach 99.998% and \(10^{-8}\) for the photon pulse duration \(T\sim 3.0\mu s\) and \((g,\kappa , \gamma )/2\pi \approx (10^{3}, 32, 10^{-3})\hbox {MHz}\). Hereafter, in 2010, researchers show that CPF gate has high fidelity and a low error rate in the intermediate coupling region after considering some realistic conditions by controlling the reflectivity of the input single-photon pulse, as described in Ref. [60]. Also, Gehr et al. [61] proposed schemes of the experiments to extract a single atom from a Bose-Einstein condensate trapped inside a high-finesse cavity and to achieve high fidelity readout of the hyperfine state of the extracted atom for the control against changing the reflection and transmission of the cavity having an atom with the resonant state. And a single atom \(^{87}\hbox {Rb}\) is resonantly coupled to the cavity mode with the maximal coupling strength \(g/2\pi \approx 215\hbox {MHz}\), while the cavity decay rate \(\kappa /2\pi \approx 53\hbox {MHz}\) and the atomic decay rate \(\gamma /2\pi \approx 3\hbox {MHz}\) which are available parameters for the experimental setup [61,62,63]. On the other hand, Englund et al. [64] and Fushman et al. [65] treated the photonic crystal cavity as a single-sided system, which is thermally isolated, for reliable the controlling cavity reflectivity and the controlled phase shifts on reflected photon pulse. And they employed heating laser to control the resonances of the cavity. In the experiments, the cavity decay rate was \(\kappa /2\pi \approx \hbox {16GHz}\) (corresponding a quality factor \(Q=10^{4})\), and an estimated spontaneous emission rate of \(\gamma /2\pi \approx \hbox {0.2GHz}\) with a strongly coupling \(g/2\pi \approx \hbox {16GHz}\). Therefore, in order to realize our schemes, in a real experiment, we employed CPF gates, which have the experimental feasibility by cavity QED.

We proposed the generation of Bell and GHZ states and entanglement swapping via linear optical devices and cavity QED for quantum communication. Our schemes have the advantages besides the feasible implementation, as follows: (1) Quantum communication of users (Alice and Bob) in advance, TC plays the roles of the provider and manager of channel. This means that only the authenticated users can use entanglement channel to communicate after verification process of TC by information (the initial state and measurement outcomes). Namely, our schemes guarantee the secure channel for quantum communication by TC (having quantum nodes). (2) The proposed schemes (via entanglement swapping) of constructing channel based on the cavity QED can be operated to construct entanglement channels between users using the single-qubit measurements and the probe photon without Bell state measurement. Thus, we can enhance the feasibility to realize entanglement swapping by no Bell state measurement (having the difficulty of the implementation). (3) We designed our schemes to maximize the merits of physical resources (flying photon and the confined atoms inside cavity). The TC possesses the quantum node (consisting of the CPF gate), which can store quantum information in the long time during the processes for the generation (and distribution) of entangled states and the construction of entanglement channel. Meanwhile, the users only retain the photons, which can be utilized for fast and reliable communication owing to the readily manipulation, after distributed entangled states and entanglement channel from the TC for quantum communication. Consequently, our schemes can be efficient quantum information processing schemes for quantum communication and experimentally realized with feasibility using current technologies.