# A Dynamic-Routing Algorithm Based on a Virtual Quantum Key Distribution Network
## 4 Experiments
### Simulation Results and Analysis  
(1) Comparison of average usage of key resources  
The average utilization rate of key resources for three algorithms with increasing business request volume is shown in Figure 7a, and the average utilization rate of keys fluctuates up and down as the number of business requests increases. This is because the actual number of key resources used will also increase correspondingly, while the number of generated keys remains relatively stable. Therefore, within a certain time period, the average utilization rate of keys will first increase until it reaches its peak, and then decrease in other time periods. As can be seen from Table 1, the algorithm has more significant values in terms of mean and standard deviation than the other two algorithms, thus indicating a more efficient use of key resources overall. As time t increases, the comparative graph of key resource  
Figure 6: Topology of simulation experiment. Figure 7: (**a**) Average utilization of key resources for three algorithms as business request volume increases; (**b**) Average utilization of keys when business request volume is constant. utilization efficiency for a given volume of service requests is shown in Figure 7. Figure 7b shows that the average utilization of key resources fluctuates and tends to stabilize. This is because when the business request volume is relatively stable, corresponding key resources can be configured based on actual needs, and proper scheduling and management can be carried out, thereby maintaining a steady utilization rate of key resources. However, fluctuations may be caused by factors such as noise in QKD systems and detector efficiency. In summary, the OSPF routing algorithm only focuses on path length, which may lead to a significant waste of key resources and a low utilization of these resources. However, the RKP routing algorithm and the routing algorithm proposed in this paper can better utilize existing key resources and avoid waste. Additionally, the routing algorithm proposed in this paper can more accurately estimate link conditions and dynamically adjust routes based on them, allowing for better utilization of key resources. (2) Key distribution blocking probabilities  
To evaluate the effectiveness and reliability of the algorithms more objectively, the comparative plots of the blocking probability of the key distribution service for the three algorithms with different service request volumes can be observed, as shown in Figure 8a-c. The volumes of 50/100/200 service requests are selected for comparison and analysis, respectively. The figure shows that the key blocking probability of the three algorithms is relatively flat when the service request volume is 50. However, when the number of service requests is 100 and 200 Erlang, the OSPF algorithm has a higher blocking rate than the other two because it does not fully consider the link situation. Its key distribution is blocking probability, mainly limited by bandwidth and reliability. The RKP algorithm uses the remaining quantum key amount in the QKP on the routing path as the weight. It gives preference to the way with a more considerable remaining quantum key amount for key distribution, thus reducing the blocking probability of key distribution. Since this algorithm considers quantum resource utilization, it can effectively reduce the blocking possibility of key distribution. On the other hand, the algorithm in this paper considers the blocking probability of the link in addition to the number of remaining keys in the QKP. Combining the link conditions can reduce the key distribution blocking possibility more effectively. (3) Delay comparison  
The average key transmission delay comparison graph is shown in Figure 9. As the volume of service requests increases, more requests must wait for key resources to be allocated and utilized, and the key delay will increase accordingly.