Research Article

Quantum Clone Elite Genetic Algorithm-Based Evaluation Mechanism for Maximizing Network Efficiency in Soil Moisture Wireless Sensor Networks

Algorithm 2

. Quantum NOT gate.
Input: The quantum probability amplitude matrix Q, the number of target points n, the number of soil depths y, probability R, random number r between 0 and 1
Output: The updated quantum probability amplitude matrix Q
1.  for i from 1 to n do
2.   for j from 1 to y do
3.    if r < R then
4.     Q (i, j) =1 - Q (i, j)
5.    end if
6.   end for
7.  end for
8. Return Q