# A Performance-Consumption Balanced Scheme of Multi-Hop Quantum Networks for Teleportation
## 4 Design of Purification Algorithm and Simulation Results  
### Purification Algorithm  
Purification is realized in a quantum network under the pumping manner as reported in [22] and shown in Figure 8.  
The fidelity as a function of the error probability is shown in Figure 9. Purification time (PT) means the number of successful purifications. When PT = 0, Bell states are more resilient against noise than GHZ states. With the help of purification, we can see a huge improvement in fidelity. Under the existence of purification, lines of GHZ states and Bell states have an intersection point under the same PT. When \(p\) is on the left side of the intersection point, the fidelity of the GHZ state is higher than that of the Bell state. With the increasing number of PT, the intersection point moves to the right side.  
Figure 8: Entanglement pumping for purification. \(F\) is the fidelity of the entangled states before purification, satisfying \(F^{\prime\prime}>F^{\prime}>F\). Purification increases the fidelity of control states to \(F^{\prime\prime}\). Target states are always with fidelity \(F\).  
We observe that entanglement swapping can bring a 12.77% decline in fidelity. Noise in the quantum channel only affects the entanglement distribution in the network. Purification in the initial entanglement distribution is not so effective because of subsequent entanglement swapping. Thus, when designing the scheme, we focus on the purification after each entanglement swapping. In the end, we add an extra purification for fusion to obtain a higher fidelity. So, we set \(m_{1}=1\), and \(m_{2}=1\). \(m_{1}\) is the PT for entanglement swapping, \(m_{2}\) is the PT for fusion. The purification algorithm of a multi-hop quantum network is shown in Algorithm 1.  
```
1:procedurePurification(\(m_{1},m_{2},n\))\(\triangleright\)Swapping round n
2:while\(m_{2}>0\)do
3:while\(n>0\)do
4: finish entanglement distribution between adjacent nodes
5: finish i round entanglement swapping
6:if purification condition for swapping is true then
7: finish swapping purification for once
8:\(m_{1}\gets m_{1}-1\)
9:endif
10:if\(m_{1}==0\)then
11:\(n\gets n-1\)
12:endif
13:endif
14:if purification condition for fusion is true then
15: finish fusion purification for once
16:\(m_{2}\gets m_{2}-1\)
17:endif
18:endif
19:endwhile
20:returnfidelity
21:endprocedure
```  
**Algorithm 1** Purification Algorithm  
Since we design the network for teleportation, only the entanglement distribution contains transferring quantum states in the channel. To avoid collision of quantum states, the quantum channel is set to simplex. If node B wants to share the entangled pairs with  
Figure 9: Fidelity as a function of the error probability with different PT under bit-flip noise. We use different colors to indicate different purification time, solid line to represent fidelity of Bell states, and dotted line to represent fidelity of GHZ states. The same color represents the same PT. PT = 0 with blue line means that purification is not applied on entangled states. With the increasing number of PT, fidelity of the entangled states will be higher.  
node A, it can ask node A for an entangled state through the classical channel. Thus, duplex communication is not necessary in the quantum channel.