# Social Milieu Oriented Routing: A New Dimension to Enhance Network Security in WSNs
## 3 Algorithm Description
### Problem Representation
Thus, trustor Node 1 will choose path 1--2--4, not path 1--3--4, as its preferred social trust path according to the criteria specified by itself, although path 1--3--4 has a larger trust value according to the aggregation rules. Note that the realization of quantum annealing requires introducing an artificial and adjustable quantum kinetic operator, which can provide the quantum fluctuations to escape the local minima. Moreover, the quantum annealing process is required to be slow enough to approximate the adiabatic \begin{table}
\begin{tabular}{c c c c} \hline \(U_{mn}\) & **Social Trust Path** & **State Vector** & **Utility** \\ \hline \(U_{12}=1\)\(U_{13}=0\) & 1—2—4 & \(|01\rangle\) & 0.616 \\ \(U_{12}=0\)\(U_{13}=1\) & 1—3—4 & \(|10\rangle\) & 0.384 \\ \(U_{12}=1\)\(U_{13}=1\) & Invalid path & \(|11\rangle\) & Invalid \\ \(U_{12}=0\)\(U_{13}=0\) & Invalid path & \(|00\rangle\) & Invalid \\ \hline \end{tabular}
\end{table} 
Table 1: Possible social trust path and corresponding state vector in Figure 2.  
Figure 2: An example of WSNs (\(w_{T}=0.6\), \(w_{R}=0.4\)). evolution. Reasonably, the choice of \(H_{kin}\) should encompass one important question that is determining which configurations are to become direct neighbors of a given configuration. Here we use an effective tactic named \"plus-minus\" [29] as a disturbance mechanism to realize a neighborhood of a given configuration. Then in TISG model, to implement QA, a fictitious kinetic energy is introduced typically by the time-dependent transverse field:  
\[H_{TF}(t)=H_{Kin}=\Gamma(t)\sum_{i=1}^{K}S^{+}_{\langle i^{\prime},j\rangle}S^{+ }_{\langle j^{\prime},j\rangle}S^{-}_{\langle j^{\prime},j^{\prime}\rangle}S^{- }_{\langle j^{\prime},j^{\prime}\rangle} \tag{7}\]  
where \(\Gamma(t)\) is the time-dependent power of the transverse field, \(S\) denotes the Ising spin. Each \(S^{\pm}_{\langle j,j\rangle}\) flips an Ising spin variable at position (_i,j_) and at the symmetric position (_j,i_), _i.e._, \(S^{\pm}_{\langle j,j\rangle}=S^{\pm}_{i,j}S^{\pm}_{j,i}\). Consequently, we have the following form of the total quantum Hamiltonian of OSTP selection problem:  
\[H_{OSTP}=\sum_{i=1}^{K}v_{i}\sigma_{z}^{i}+\sum_{i=1}^{K}\sum_{j=i+1}^{K}J_{ ij}\sigma_{i}^{z}\sigma_{z}^{j}\sigma_{z}^{j}+\Gamma(t)\sum_{i=1}^{K}S^{+}_{ \langle i^{\prime},j^{\prime}\rangle}S^{+}_{\langle j^{\prime},j\rangle}S^{ -}_{\langle j,j\rangle}S^{-}_{\langle j^{\prime},j^{\prime}\rangle} \tag{8}\]  
Initially, the strength of the transverse field \(\Gamma(t)\) is chosen to be very large, and \(H_{OSTP}\) is dominated by the third term of Equation (8). Then \(\Gamma(t)\) is gradually and monotonically decreased toward zero, leaving eventually only the first two terms. Note that every state of the TISG model can be described as a state vector it will evolve with time and should follow the RT Schrodinger equation. With \(\Gamma(t)\) decreasing, accordingly, the state vector \(|\psi(t)\rangle\) is expect to evolve from the expected initial ground state of transverse-field term Equation (5) the transverse-field 1 ground state of Equation (6), which is the solution of the OSTP selection problem. Then an important issue is how slowly we should decrease \(\Gamma(t)\) to keep the state vector arbitrarily close to the instantaneous ground state of \(H_{OSTP}\). As mentioned in Section 3.2, we will not attempt an actual Schrodinger annealing evolution of the quantum Hamiltonian due to the large Hilbert space. On the contrary, we address the quantum problem by CPIMC-based QA, where annealing will take place in the fictitious time represented by the number of CPIMC steps. However, in order to figure out the OSTP selection problem by CPIMC-based QA, a Suzuki-Trotter transformation should be performed in advance, which requires calculation of the matrix elements of an exponential operator between arbitrary configurations \(|\psi\rangle\) and \(\left\langle\psi^{\prime}\right|\) of the system.