## 4 Proposed Protocol
### Multi-Hop Routing Approaches
#### 4.3.3 Route Generation
\(L_{a,b}=1\) and \(L_{b,a}=1\) represent two different connection relationships which cannot both be \(1\). \(L_{a,b}=1\) means that node \(a\) is the parent node of node \(b\), and data are transmitted from \(a\) to \(b\). We set the first constraint \(P_{1}\) that each node can have only one child node, that is, every column has only one element of \(1\), in which case \(P_{1}=0\):  
\[P_{1}=\sum_{b=1}^{C}\left(\sum_{a=1}^{C}L_{a,b}=1\right) \tag{15}\]  
The second constraint term ensures that CHs are connected to a path:  
\[P_{2}=\left(Num-1\right)^{2} \tag{16}\]  
We used an array \(Num\) to denote the total count of CHs in the matrix \(L\) which satisfies the condition of the number of child nodes being zero. If \(Num=1\), that is, only the BS has no child nodes, \(P_{2}=0\). Otherwise, \(P_{2}>0\), which is an unreasonable routing scheme. The potential energy is calculated from the above objective function and two constraint terms:  
\[H_{p}(t)=f_{route}+\omega_{\max}(P_{1}+P_{2}) \tag{17}\]The weight of constraint terms is increased to eliminate incorrect routing schemes. \(\omega_{\max}\) is the largest element value in \(\omega\); if the routing scheme satisfies the actual situation, \(P_{1}=0\) and \(P_{2}=0\), that is, the corresponding \(H_{p}(t)\) is smaller. C. Construction of classical Hamiltonian  
The random construction generates n different connection replicas to form the set \(M=\left\{L^{1},L^{2},\cdots,L^{k},\cdots L^{n}\right\}\). The greater the number of copies, the higher the accuracy of the solution; however, this will also lead to an increase in calculation time and cost. After careful consideration, we refer to the parameter value, n = 40, with the best effect after comparative experiments in the literature [38]. Kinetic energy \(H_{k}(t)\) is generated by quantum fluctuations which refer to the interaction between n sets; that is, the values at the same position between adjacent copies are multiplied and summed. We used the scheme in [37] for the calculation:  
\[H_{k}(t)=J_{\Gamma}\left(\sum_{k=1}^{n}\sum_{a,b}L_{a,b}^{k}L_{a,b}^{k+1}\right) \tag{18}\]  
where \(L_{a,b}^{k+1}=L_{a,b}^{1}\), and \(J_{\Gamma}\) is introduced as a coupling term to adjust the magnetic field strength [39], which is calculated by Equation (19):  
\[J_{\Gamma}=-\frac{T}{2}\ln\tanh\left(\frac{\Gamma}{T_{q}}\right)>0 \tag{19}\]  
where \(T_{q}=nT\) is the effective QA temperature. As the Monte Carlo step progresses, the tunneling field intensity \(\Gamma_{0}\) slowly decreases from a relatively high value. After manual parameter adjustment for testing, the optimal values of \(T_{q}\) and \(\Gamma_{0}\) were found within the ranges of \(T_{q}\in(0,1]\) and \(\Gamma_{0}\in\left(0,3T_{q}\right)\)[40]. According to the Monte Carlo method, the classical Hamiltonian can be expressed as  
\[H(t)=\frac{1}{n}\sum_{k=1}^{n}H_{p}\left(L^{k}\right)-J_{\Gamma}H_{k}(t) \tag{20}\]  
If the number of the same positions with a value of 1 in n sets is higher, there tends to be greater consistency among adjacent copies, and then the value of \(H_{k}(t)\) is higher and the value of \(H(t)\) is lower. The operator set introduced in the subsequent section is utilized for updates, enabling kinetic energy to reach lower values when potential energy cannot be further reduced, thereby escaping local optima. \(J_{\Gamma}\) determines the relative importance between the kinetic energy term and the potential energy term. With the annealing process, the sets gradually become similar, \(\Delta H_{k}(t)\) (the difference value between the candidate kinetic energy term and the current kinetic energy term) gradually decreases, and \(J_{\Gamma}\), which is inversely proportional to \(T\), gradually increases, ensuring that the kinetic energy term continues to play a role. From the current Hamiltonian, we obtain the optimal two-dimensional routing connection matrix \(L_{best}\) using the PIMC-QA algorithm in Matlab.