## 4 Quantum Exchange Lock Parallel Scheduler
### Quantum Circuit Hierarchical Strategy Based on Qelps
The only SWAP operations that satisfy the conflict constraints are \(\text{SWAP}q_{3},q_{4}\) and \(\text{SWAP}q_{0},q_{3}\). Figure 2: The hardware architecture of a quantum circuit and the quantum circuit after the first layering. The introduction of SWAP gates increases execution time. In the upper coordinate diagram of Figure 3a, the parallel execution time for \(\text{CNOT}q_{1},q_{2}\) and \(\text{SWAP}q_{0},q_{3}\) is \(6\tau\). After updating the quantum mapping, the execution time of the \(\text{CNOT}q_{0},q_{4}\) operation is \(2\tau\). In layer \(l_{1}\), the parallel execution time for \(\text{CNOT}q_{2},q_{5},\text{CNOT}q_{0},q_{4}\), and \(\text{H}q_{0}\) is also \(2\tau\). The execution of \(\text{CNOT}q_{1},q_{4}\) in layer \(l_{2}\) requires \(2\tau\), leading to a total execution time of \(6\tau+2\tau+2\tau+2\tau=12\tau\). With the introduction of the quantum locking mechanism, qubits \(q_{1}\) and \(q_{2}\) are initially locked and remain so for \(2\tau\), as illustrated in the lower coordinate diagram of Figure 3a. When the SWAP gate is still executing, quantum gates that do not conflict with the qubits involved in the current SWAP operation can be identified from subsequent layers and inserted into the current layer. The inserted quantum gates must ensure that the execution time of this layer does not exceed its original execution time before stratification. Following this approach, when \(\text{SWAP}q_{0},q_{3}\) is executed, \(\text{CNOT}q_{2},q_{5}\) and \(\text{CNOT}q_{1},q_{4}\) are inserted into layer \(l_{0}\), maintaining an execution time of \(6\tau\). After updating the mapping, the execution time of \(\text{CNOT}q_{0},q_{4}\) is \(2\tau\). Finally, \(\text{CNOT}q_{1},q_{3}\) and \(\text{H}q_{0}\) execute in parallel for \(2\tau\), resulting in a total execution time of \(6\tau+2\tau+2\tau=10\tau\). The circuit structure after the second stratification is shown in Figure 3b, where one quantum circuit layer is eliminated, and the parallel execution of quantum gates is fully utilized to improve computational efficiency. ## 5 Full-Level Joint Optimization Swap Algorithm

### Limitations of the QELPS Algorithm

The limitation of the QELPS algorithm is that, although parallel execution of quantum gates within each layer is ensured, dependencies and interactions across subsequent layers are not effectively handled. To address this, SWAP gate operations must be introduced to modify the quantum mapping. However, excessive SWAP insertions increase the gate error rate and prolong execution time. The FJOSA algorithm builds upon QELPS by more comprehensively considering gate dependencies and interactions, thereby improving scheduling efficiency and reducing unnecessary SWAP operations. Figure 3: Quantum circuit after secondary stratification: (**a**) Quantum gate duration diagram; (**b**) Quantum circuit after secondary stratification improvement. ### Algorithm Principle

We propose a Full-level Joint Optimization SWAP Algorithm based on a heuristic approach. Instead of strictly following the execution order of each layer, deep optimization is performed across multiple layers. Although breaking the layer structure may increase the complexity of circuit dependency management and reduce parallelism, the layers are not entirely broken. After completing the layering process using a deep optimal greedy algorithm based on SWAP conflicts, full-level joint optimization is further applied. However, when multiple layers are processed simultaneously, dependency complexity increases significantly. Therefore, the cost function must be carefully designed to select appropriate layers for joint optimization. \[Cost(i,l,e)=\lambda S_{norm}+(1-\lambda)Q_{norm} \tag{3}\]

\[\Delta S(i,l,e)=s(i,l,e)-S(i,l,e) \tag{4}\]

\[S_{norm}=\Delta S(i,l,e)/\Delta S_{max} \tag{5}\]

\[Q_{norm}=Q(i)^{l}/Q(i)_{max} \tag{6}\]

where \(i\) represents the \(i^{th}\) optimization, while \(e\) denotes the number of optimized layers and the current total number of layers.