To accelerate the evolutionary process and increase the probability to find the optimal solution, the following methods are proposed to improve the conventional quantum genetic algorithm: an improved method to determine the rotating angle, the selfadaptive rotating angle strategy, adding the quantum mutation operation and quantum disaster operation. The efficiency and accuracy to search the optimal solution of the algorithm are greatly improved. Simulation test shows that the improved quantum genetic algorithm is more effective than the conventional quantum genetic algorithm to solve some optimization problems.
Quantum genetic algorithm (QGA) is the product of the combination of quantum computation and genetic algorithms, and it is a new evolutionary algorithm of probability [
Quantum computation is contrary to classical computation. It uses the superposition, coherence, and the entanglement of different qubits of quantum state to realize quantum computation [
(1) Superposition of quantum computation: the basic unit for information storage is qubit in the quantum computer [
(2) Coherence of quantum computation: different from classical computation, coherence is another important property of quantum computation. The relative phase of the respective ground states changes with the interference that occurs to each ground state by the action of quantum rotating gates. For example, a quantum system of a single qubit is
(3) Entanglement of the quantum state: the quantum state which cannot be broken down into the form of the direct product of two subsystems is called entanglement state [
(4) Parallelism of the quantum computation: parallelism of quantum computation is completed in the same quantum circuit rather than being implemented by multiple hardwares calculated simultaneously. Parallelism of quantum computation makes use of the superimposed ability of different states which the quantum computer lies in; therefore, using a single
Quantum genetic algorithm is proposed based on the concept of quantum bits and quantum superposition state [
Binary code is used to encode qubit on the polymorphic problem. A qubit can be defined by its probability amplitude as
Initialize the quantum encoding
Compared with the conventional genetic algorithm, quantum genetic algorithm applies the probability amplitude of qubits to encode chromosome and uses quantum rotating gates to realize chromosomal updated operation. Since the chromosomes are in superposition state or entanglement state, the generation of offspring is not determined by the parent group when the Quantum rotating gates is used to realize the genetic operation. It is jointly determined by the optimal individual of the parent group and probability amplitude of each state. In other words, the genetic manipulation of quantum genetic algorithm is mainly through acting on the superposition state or entanglement state by the Quantum rotating gates to change the probability amplitude. Therefore, the construction of Quantum rotating gates is the key issue of quantum genetic algorithm [
Quantum rotating gates can be designed according to the practical problems and usually can be defined as
Adjustment strategy of rotating angle.












0  0  FALSE  0  0  0  0  0 
0  0  TRUE  0  0  0  0  0 
0  1  FALSE 

+1  −1  0 

0  1  TRUE 

−1  +1 

0 
1  0  FALSE 

−1  +1 

0 
1  0  TRUE 

+1  −1  0 

1  1  FALSE  0  0  0  0  0 
1  1  TRUE  0  0  0  0  0 
Quantum genetic algorithm is a more wonderful optimization process than the conventional genetic algorithm, and its encoding mode is more complex, and each generation of the evolution can cover a wider area [
(1) QGA is selforganizing, selfadaptive, and selflearning [
The flowchart of conventional quantum genetic algorithm is shown in Figure
Flowchart of conventional quantum genetic algorithm.
There are some shortages in conventional quantum genetic algorithm [
In the optimization process, the value and direction of the quantum rotating gates are determined firstly. The current method to determine the direction of the rotating angle is based on a lookup table. As the lookup table involves judgment of multiple conditions, the efficiency of the algorithm is affected [
Construct a determinant
The angles of the qubits
The conventional quantum genetic algorithm adopts a rotating strategy with fixed angle. In this paper, a rotating strategy with selfadaptive angle is adopted. It can dynamically adjust the value of the rotating angle of the Quantum rotating gates based on the evolutionary process [
The selfadaptive quantum genetic algorithm (AQGA) is proposed in this paper. AQGA adjusts the value of the rotating angle according to the situation of evolution of the population at any time.
Adjust the value of the rotating angle according to the number of generation; the regulator is as the following formula:
Add quantum mutation operation in conventional quantum genetic algorithm. Quantum mutation enables some individuals to deviate slightly from the current evolutionary direction and prevent the evolution of individual into a local optimal solution [
Quantum mutation is an assistant operation with the purpose to enhance the local searching ability of quantum genetic algorithm and avoid the loss of important information in the population. Quantum NOT gates is adopted to realize chromosomal variation. Quantum NOT gate is applied to transform the selected number of qubits according to mutation probability randomly to transform corresponding probability amplitude of the qubits. Quantum mutation operation helps to increase the diversity of the population and reduce the probability of premature convergence.
Pseudocode program of quantum mutation process is described as in Algorithm
Procedure Mutate (
Begin
If
Begin
When (
Generate Random Number rand in range (
If rand
Exchange
End
End
Add quantum disaster operation in the conventional quantum genetic algorithm. The algorithm may fall into local optimal solution, while the algorithm has performed several generations and the best individual is in a stable state. Thus, we need to take the quantum disaster operation to get out of the local optimal solution [
Quantum disaster process pseudocode program is described as in Algorithm
Begin
If (disastercondition)
Begin
If (The chromosome is not the best chromosome)
Initialize the chromosome;
End
End
It needs to be noted that the intercross operation is not added into the improved quantum genetic algorithm. The crossover operator is able to change the linear superposition state observation probability of the quantum chromosome. However, the quantum chromosome itself has the property of individual diversity resulted from quantum superposition. So, there is no need to perform the intercross operation. In contrast, if the intercross operation is used in some cases, the performance of QGA may decline [
The flowchart of improved quantum genetic algorithm is shown in Figure
Flowchart of improved quantum genetic algorithm.
The simulation test in this paper is based on the AMD CPU 1.8 GHz, 1.5 GB RAM; the algorithm is written and compiled in MATLAB.
Find the optimal solution in the complex binary function:
The figure of the function is shown in Figure
Function figure.
The parameters are set as follows. Both the conventional quantum genetic algorithm and improved quantum genetic algorithm are encoded by the binary; the evolution generation is 200; the size of population is 40; the length of each binary variable is 20; fitness function is the objective function. Take 10 times simulation test using conventional quantum genetic algorithm and its improved method, respectively.
The results of the conventional quantum genetic algorithm are shown in Table
The results of the conventional quantum genetic algorithm.
Index  Times  

1  2  3  4  5  6  7  8  9  10  

11.6255  11.6254  11.6281  11.6255  11.6256  11.6255  11.6256  11.6255  11.6255  11.6281 

5.72504  5.32505  5.72509  5.72505  5.72529  5.72504  5.72529  5.72496  5.72505  5.72504 
Optimal value  17.3503  16.9503  17.3441  17.3503  17.3496  17.3503  17.3496  17.3502  17.3503  17.3441 
Evolution generations  130  110  80  100  80  90  110  180  110  60 
Make a census of the data in Table
The statistical results of conventional quantum genetic algorithm.
Algorithm  The optimal result  The worst result  The biggest evolution generation  The smallest evolution generation  The average evolution generation  Times of convergence 

CQGA  (11.6255, 5.72504, 17.3503)  (11.6254, 5.32505, 16.9503)  180  60  105  5 
The result of 200 generations’ evolutionary process of a certain time of conventional quantum genetic algorithm is shown in Figure
Evolutionary process of conventional quantum genetic algorithm.
The rotating angle adaptively changes with the evolution generation based on the conventional quantum genetic algorithm. Four cases are tested in this paper; the maximum rotating angle and the minimum rotating angle of the four cases are, respectively, (
The result of selfadaptive quantum genetic algorithm with the rotating strategy selected (
Index  Times  

1  2  3  4  5  6  7  8  9  10  

11.6245  10.1024  11.6244  11.6255  11.6281  11.6255  11.6244  11.1256  11.6254  11.6255 

5.72505  5.72504  5.42813  5.72363  5.72504  5.42813  5.3252  5.72503  5.72504  5.72503 
Optimal value  17.3503  15.8483  16.9479  17.3278  17.3278  16.949  16.9489  16.8503  17.3503  17.3503 
Evolution generations  20  20  10  70  20  30  20  40  25  10 
The result of selfadaptive quantum genetic algorithm with the rotating strategy selected (
Index  Times  

1  2  3  4  5  6  7  8  9  10  

11.6255  11.6263  11.6255  11.6255  11.6255  11.6256  11.6254  10.1256  11.6255  11.6254 

5.72504  5.62735  5.72695  5.32499  4.92344  5.3252  5.32504  5.32505  5.72695  5.72509 
Optimal value  17.3503  17.1911  17.3091  16.9503  16.525  16.9501  16.9503  15.4503  17.3091  17.3503 
Evolution generations  20  10  18  20  20  20  45  30  30  70 
The result of selfadaptive quantum genetic algorithm with the rotating strategy selected (
Index  Times  

1  2  3  4  5  6  7  8  9  10  

10.1256  11.6255  11.6255  11.6255  11.6255  11.6255  11.6255  11.6255  11.6281  11.6281 

5.72509  5.52504  5.72504  5.72529  5.72509  5.32505  5.72509  5.12504  5.72504  5.52441 
Optimal value  15.8503  17.1503  17.3503  17.3496  17.3503  16.9503  17.3503  16.7503  17.3441  17.1398 
Evolution generations  30  40  30  30  30  20  30  30  30  20 
The result of selfadaptive quantum genetic algorithm with the rotating strategy selected (
Index  Times  

1  2  3  4  5  6  7  8  9  10  

11.6255  11.6281  11.6255  11.6255  11.6254  11.6255  11.6255  11.6281  11.6255  11.6255 

5.32504  5.72488  5.72503  4.92504  5.72504  5.72509  5.72504  5.3252  5.52441  5.72504 
Optimal value  16.9503  17.3438  17.3503  16.5503  17.3503  17.3503  17.3503  16.9439  17.1459  17.3503 
Evolution generations  40  40  70  30  45  30  50  20  50  50 
The statistical results of selfadaptive quantum genetic algorithm.
Rotating strategy  The optimal result  The worst result  The biggest evolution generation  The smallest evolution generation  The average evolution generation  Times of convergence 

( 
(11.6255, 5.72503, 17.3503)  (10.1024, 5.72504, 15.8483)  70  10  26.5  3 
( 
(11.6255, 5.72504, 17.3503)  (10.1256, 5.32505, 15.4503)  70  10  28.3  2 
( 
(11.6255, 5.72504, 17.3503)  (10.1256, 5.72509, 15.8503)  40  20  29  4 
( 
(11.6255, 5.72503, 17.3503)  (11.6255, 4.92504, 16.5503)  70  20  42.5  5 
Make a census of the experimental data in Tables
According to the data in Table
The mutation operation is added based on the selfadaptive quantum genetic algorithm, and the probability of mutation is 0.001. Table
The statistical results of adaptive mutation quantum genetic algorithm.
Rotating strategy  The optimal result  The worst result  The biggest evolution generation  The smallest evolution generation  The average evolution generation  Times of convergence 

( 
(11.6255, 5.72503, 17.3503)  (11.6288, 5.32489, 16.9405)  50  20  35  6 
One certain time of the evolution process is shown in Figure
The disaster operation is added based on the selfadaptive mutation quantum genetic algorithm. Table
The statistical results of adaptive mutation quantum genetic algorithm added disaster operation.
Rotating strategy  The optimal result  The worst result  The biggest evolution generation  The smallest evolution generation  The average evolution generation  Times of convergence 

( 
(11.6255, 5.72503, 17.3503)  (11.6254, 5.52525, 17.1498)  150  20  65  8 
An evolutionary process is shown in Figure
As mentioned previously, the improved quantum genetic algorithm cannot add the intercross operation [
Evolutionary process of selfadaptive quantum genetic algorithm.
Evolutionary process of selfadaptive quantum genetic algorithm in which mutation operation is added.
Evolutionary process of selfadaptive mutation quantum genetic algorithm added disaster operation.
Evolutionary process of selfadaptive quantum genetic algorithm adding the intercross operation.
Evolutionary process of selfadaptive quantum genetic algorithm adding the intercross and mutation operation.
Take 8 times of experiments separately using the conventional method and the method of this paper to determine the rotating angle direction; get rid of the largest and smallest group, respectively, and the time of the rest 6 groups is shown in Table
Comparison of the results of the two methods to determine rotating angle direction.
The first time(s)  The second time(s)  The third time(s)  The fourth time(s)  The fifth time(s)  The sixth time(s)  Maximal time value(s)  Minimal time value(s)  Average time value(s)  

Time of conventional method  12.6389  12.9520  11.7157  12.7594  11.9885  12.6437  12.9520  11.7157  12.4497 
Time of improved method  10.0858  10.2260  10.4878  12.3171  10.2552  10.3130  12.3171  10.0858  10.6142 
From Table
In this paper, six rounds of experiments were presented in this paper. We performed the experiments in each round for 10 tests. The experiments show that the conventional quantum genetic algorithm has been improved by adding many improvements. The simulation test shows that to improve the evolution efficiency of quantum genetic algorithm, some proper operations can be added in the evolutionary process; however, not all improvement strategies which can be applied to traditional genetic algorithms can be used to improve the conventional quantum genetic algorithm; it is because of the specificity of the conventional quantum genetic algorithm. The improvements made in this paper improve the algorithm structure, and efficiency of evolution of the conventional quantum genetic algorithm is also improved.