Research Article  Open Access
The Improvement of Quantum Genetic Algorithm and Its Application on Function Optimization
Abstract
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.
1. Introduction
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 [1]. In 1996, quantum genetic algorithm is first proposed by Narayanan and Moore, and it is successfully used to solve the TSP problem [2]. QGA is essentially a kind of genetic algorithm and can be applied in the field that the conventional genetic algorithm can be applied. The efficiency of QGA is significantly better than the conventional genetic algorithm. The QGA is with a small value of the population, a fast speed of convergence, a great capability of global optimization, and a good robustness. The quantum state vector is introduced in the Genetic Algorithm to express genetic code, and quantum logic gates are used to realize the chromosome evolution. By these means, better results are achieved. However, there are still some problems in conventional QGA [3, 4]. For example, determining the direction of the rotating angle relies on a lookup table. It leads to a program with multiple judgment conditions. Moreover, the fixed rotating angle has a negative impact on the quickly searching and the lately convergence [5]. Aiming to resolve the above problem, the QGA is improved with an adaptive evolution process in this paper. Quantum mutation and quantum disaster operations are also introduced to make the algorithm with a better performance.
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 [6]. Quantum computation is the product of quantum mechanics applying in the field of algorithm. The ability of parallelism is the essential difference between quantum computation and classical computation. In the probability calculation, the system is not in an invariable state. Conversely, it has a certain probability, and the state probability vector is corresponding to different possible states. Quantum computation is similar to it, the probability amplitudes of quantum states is used in quantum computation, and probability amplitudes of quantum states are squared normalized, so the speed of calculation of quantum computation is times faster than the speed of classic calculation. Quantum transformation is realized by quantum rotating gates. There are some special properties of quantum computation relative to classical computation [7]. Some mechanisms of these properties can be introduced to the optimization algorithms for improving traditional optimization algorithm.
(1) Superposition of quantum computation: the basic unit for information storage is qubit in the quantum computer [8]. An bits quantum register can be in the state which is the coherent superposition state of ground states. An act on an bits quantum register is equal to the act on numbers. The relationship between superposition state and ground states is where represents the probability amplitude of the state ; represents the probability to collapse to the ground state when the state is measured; should satisfy the condition [9]:
(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 and . After the role of some quantum gate, the values of and change correspondingly, and the new and still satisfy . So the probability amplitude of the ground state will be reduced if the probability amplitude of the ground state increases. When the quantum system is measured, coherence will disappear and collapse to some ground state, while the probability is determined by .
(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 [10]. Both the operated state of the qubit and the state of the other qubit entangled are changed once operating on one or more specific qubits.
(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 circuit can calculate multiple values of .
2. Conventional Quantum Genetic Algorithm
Quantum genetic algorithm is proposed based on the concept of quantum bits and quantum superposition state [11]. In a quantum computer, a double quanta system called qubit acts as the physical media to store the information units. Qubit is the smallest unit of information in quantum computers. A qubit can be in any state , , and superposition state between and [12]. A state of a qubit is described as where and are the complex numbers which are called the probability amplitude of corresponding state of qubit and satisfy the condition that . The states and , respectively, denote the spindown state and spinup state [13]. A qubit can contain the information of both the state and the state .
2.1. Qubit Encoding
Binary code is used to encode qubit on the polymorphic problem. A qubit can be defined by its probability amplitude as , and the multiqubits encoding which has parameters is defined as follows:where represents the th individual chromosome of the th generation; represents the number of qubit encoding of each gene; represents the number of genes in the chromosome [14].
Initialize the quantum encoding of each individual in the population with , which indicates that when , the possibility of each state expressed by a chromosomal is equal [15].
2.2. Quantum Rotating Gates
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 [16], and it directly affects the performance of the algorithm.
Quantum rotating gates can be designed according to the practical problems and usually can be defined as The updated process is where and are the probability amplitudes of the th qubit in chromosome before and after the quantum rotating gates updating, respectively; is the rotating angle; the value and the sign of are determined by the adjustment strategy [17], which are shown in Table 1. Moreover, is the th bit of the current chromosome; is the th bit of the current optimal chromosome; is the fitness function; is the direction of the rotating angle; is the value of the rotating angle. The value of is determined by certain adjustment strategy, in conventional quantum genetic algorithm and the value of is generally a constant value is around . The adjustment strategy is, comparing the fitness of the currently measured value of the individual with the fitness of the current optimal individual , if , then adjust the corresponding qubits of , making the probability amplitude evolves toward the direction that is propitious to the emergence of . Conversely, if , then adjust the corresponding qubits of , making the probability amplitude evolves toward the direction that is propitious to the emergence of best.

2.3. Analysis on the Characteristic of Quantum Genetic Algorithm
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 [18]. Quantum genetic algorithm combines some characteristics of quantum computation with the genetic algorithm whose individuals are chosen by the natural selection. The fine species better adapt to environment of quantum genetic algorithm are produced by the operation of quantum rotating gates with the goal of the best individual of current generation [19]. The main features of quantum genetic algorithm are as follows.
(1) QGA is selforganizing, selfadaptive, and selflearning [20]. (2) The object handling by QGA is not the parameter, but the chromosome strings encoded according to parameter variable [21]. The encoding operation enables the quantum genetic algorithm to operate directly on the structure of the object. (3) QGA searches a group of points rather than a single point in the solution space at the same time. QGA samples in different areas of space simultaneously [22]. (4) In QGA, the knowledge of the searching space or other ancillary information is not needed. Only the fitness function is used to evaluate the individuals [23].
The flowchart of conventional quantum genetic algorithm is shown in Figure 1.
3. Improvements of Quantum Genetic Algorithm
There are some shortages in conventional quantum genetic algorithm [24]. (1) The premature convergence problem: conventional quantum genetic algorithm simply uses fitness to evaluate the solution, causing the genes of some individuals whose fitness is large to spread rapidly in the population, making the population loses diversity prematurely. The solution often falls into the local optimal solution; (2) local search ability: conventional quantum genetic algorithm is good at global search performance, but its local search performance is inadequate, resulting in slower convergence in the later stage of evolution and cannot converge to the global optimal solution.
3.1. Determination on Rotating Direction
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 [25]. Therefore, a new method is introduced to simplify the determination of the direction of the rotating angle in this paper.
Theorem 1. Construct a determinant , where, is the probability amplitude of some qubit of the optimal solution which has been searched. is the probability amplitude of corresponding state of qubit in the current solution. When , if , then the direction of the rotating angle is—. If , the direction of the rotating angle can be either positive or negative.
Proof. The angles of the qubits and in the unit circle are separately and ; then, If , when , and when , . If , then or . Positive and negative rotating effect is the same at this time, so the direction of the rotating angle can be either positive or negative (proof is over).
3.2. SelfAdaptive Rotating Angle Strategy
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 [26]. A large rotating angle is set early in the evolutionary process to quickly facilitate the entire interval and find the region with the optimal values. To accurately find the optimal value, we reduce the value of rotating angle, while the evolution increases. Measure the individual and compare its fitness with the fitness of the best individual. Adjust the corresponding qubit in based on the result of the above comparison and make evolve to the direction of the optimal solution.
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: where is the value of the rotating angle of the th generation, is the maximal rotating angle, is the minimal rotating angle, is the maximal generation, and iter is the current generation. From the formula (8), it can be concluded that the value of the rotating angle is gradually reduced with the increase of the generation.
3.3. Add Quantum Mutation Operation
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 [27]. Quantum mutation can completely reverse the individual’s evolutionary direction by swapping the value of probability amplitude of qubits .
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 1.

3.4. Add Quantum Disaster Operation
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 [28]. The method is to apply a large disturbance to some individuals in the population and regenerate some other new random individuals.
Quantum disaster process pseudocode program is described as in Algorithm 2.

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 [29].
The flowchart of improved quantum genetic algorithm is shown in Figure 2.
4. Simulation Test
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.
4.1. Problem Description
Find the optimal solution in the complex binary function:
The figure of the function is shown in Figure 3.
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.
4.2. The Results of Conventional Quantum Genetic Algorithm
The results of the conventional quantum genetic algorithm are shown in Table 2.

Make a census of the data in Table 2, the statistical results are shown in Table 3.

The result of 200 generations’ evolutionary process of a certain time of conventional quantum genetic algorithm is shown in Figure 4. The conventional quantum genetic algorithm obtains the optimal solution around 130 generation. Evolutionary process is slower between 50 and 110 generations. The axis represents the evolutionary generations; axis represents the best fitness of every generation. (The meaning of the axis and the axis of the following figure is the same as Figure 4).
4.3. Result of SelfAdaptive 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, (, ), (, ), (, ), and (, ). Take 10 rounds of the experiments for the four cases; the experimental results were shown in Tables 4, 5, 6, 7, and 8, respectively.





Make a census of the experimental data in Tables 4, 5, 6, and 7, the statistical results are shown in Table 8.
According to the data in Table 8, the rotating strategy is selected (, ) in this paper.
4.4. The Result of SelfAdaptive Quantum Genetic Algorithm in which Mutation Operation Is Added
The mutation operation is added based on the selfadaptive quantum genetic algorithm, and the probability of mutation is 0.001. Table 9 shows the statistical results of the experiment by performing the algorithm 10 times. We can get the conclusion that the speed of evolution is improved again.

One certain time of the evolution process is shown in Figure 6. Through the evolutionary process in Figure 6, we can get that the optimal solution is obtained around the 30th generation. The speed of evolution is improved again, and times of convergence are also increased.
4.5. The Result of SelfAdaptive Mutation Quantum Genetic Algorithm Added Disaster Operation
The disaster operation is added based on the selfadaptive mutation quantum genetic algorithm. Table 10 shows the statistical results of the experiment by performing the algorithm 10 times. We can get the conclusion that the times of convergence of selfadaptive mutation quantum genetic algorithm adding disaster operation have been improved, and the biggest evolution generation is largely more than the algorithm without disaster operation; the reason is that usually the disaster operation happens late in the evolution. The disaster operation makes the times of convergence improved, but the biggest evolution generation unavoidably becomes more.

An evolutionary process is shown in Figure 7.
4.6. Analysis on Evolutionary Process of SelfAdaptive Quantum Genetic Algorithm Added Intercross Operation
As mentioned previously, the improved quantum genetic algorithm cannot add the intercross operation [30]. Adding the intercross operation will decline the efficiency of the algorithm. The evolution process of selfadaptive quantum genetic algorithm with the adding intercross operation is shown in Figures 8 and 9. Compare Figure 5 with Figure 8, the optimal solution is obtained from 50 generation to 120 generation, and the evolutionary generation becomes more. Compare Figure 6 with Figure 9, the optimal solution is obtained from the 30th generation to the 120th generation, and the evolutionary generation becomes more too. Adding intercross operation makes the evolution faster in early generation and becomes unstable late in the evolutional process. So, it cannot add intercross operation into the improved quantum genetic algorithm.
4.7. Comparison of Time between the Two Methods to Determine Rotating Angle Direction
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 11.

From Table 11, it can be concluded that the average running time of the improved method to determine the rotating angle direction is significantly shorter than the time of conventional method. The efficiency of algorithm is improved.
5. Conclusions
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.
References
 F. Shi, H. Wang, L. Yu, and F. Hu, Analyze of 30 Cases of MATLAB Intelligent Algorithms, Beihang University Press, Beijing, China, 2010.
 A. Narayanan and M. Moore, “Quantuminspired genetic algorithms,” in Proceedings of the IEEE International Conference on Evolutionary Computation (ICEC '96), pp. 61–66, Nagoya, Japan, May 1996. View at: Google Scholar
 R. van Meter, K. Nemoto, and W. J. Munro, “Communication links for distributed quantum computation,” IEEE Transactions on Computers, vol. 56, no. 12, pp. 1643–1653, 2007. View at: Publisher Site  Google Scholar
 S. Zhou, W. Pan, B. Luo, W. L. Zhang, and Y. Ding, “A novel quantum genetic algorithm based on particle swarm optimization method and its application,” Acta Electronica Sinica, vol. 34, no. 5, pp. 897–901, 2006. View at: Google Scholar
 J. Huang, R. A. Berry, and M. L. Honig, “Auctionbased spectrum sharing,” Mobile Networks and Applications, vol. 11, no. 3, pp. 405–418, 2006. View at: Publisher Site  Google Scholar
 S. Y. Yang, F. Liu, and L. C. Jiao, “Novel genetic algorithm based on the quantum chromosome,” Journal of Xidian University, vol. 31, no. 1, pp. 76–81, 2004. View at: Google Scholar
 J. G. Proakis, Digital Communications, Mc GrawHill, New York, NY, USA, 4th edition, 2000.
 Y. Xiong, H. H. Chen, F. Y. Miao, and X. F. Wang, “Quantum genetic algorithm to solve combinatorial optimization problem,” Acta Electronica Sinica, vol. 32, no. 11, pp. 1855–1858, 2004. View at: Google Scholar
 K. H. Han and J. H. Kim, “Genetic quantum algorithm and its application to combinatorial optimization problem,” in Proceedings of the Congress on Evolutionary Computation, pp. 1354–1360, July 2000. View at: Google Scholar
 C. J. Rieser, Biologically Inspired Cognitive Radio Engine Model Utilizing Distributed Genetic Algorithms for Secure and Robust Wireless Communications and Networking, Virginia Tech, Blacksburg, Va, USA, 2004.
 S. Lou, Y. Li, Y. Wu, and X. Xiong, “Multiobjective reactive power optimization using quantum genetic algorithm,” High Voltage Engineering, vol. 31, no. 9, pp. 69–83, 2005. View at: Google Scholar
 G. X. Zhang, N. Li, and W. D. Jin, “A novel quantum genetic algorithm and it’s application,” Acta Electronica Sinica, vol. 32, no. 3, pp. 476–479, 2004. View at: Google Scholar
 H. Zheng and C. Peng, “Collaboration and fairness in opportunistic spectrum access,” in Proceedings of the 40th Annual IEEE International Conference on Communications (ICC '05), vol. 5, pp. 3132–3136, Seoul, Korea, 2005. View at: Google Scholar
 G. Zhang and H. Rong, “Quantuminspired genetic algorithm based timefrequency atom decomposition,” in Proceedings of the 7th International Conference on Computational (ICCS '07), pp. 243–250, 2007. View at: Google Scholar
 J.A. Yang and Z.Q. Zhuang, “Actuality of research on quantum genetic algorithm,” Journal of Computer Science & Technology, vol. 30, no. 11, pp. 13–15, 2003. View at: Google Scholar
 N. H. Abbasy and H. M. Ismail, “A unified approach for the optimal PMU location for power system state estimation,” IEEE Transactions on Power Systems, vol. 24, no. 2, pp. 806–813, 2009. View at: Publisher Site  Google Scholar
 W. Shu and B. He, “A quantum genetic simulated annealing algorithm for task scheduling,” in Advances in Computation and Intelligence, vol. 4683 of Lecture Notes in Computer Science, pp. 169–176, 2007. View at: Google Scholar
 F. Aminifar, C. Lucas, A. Khodaei, and M. FotuhiFiruzabad, “Optimal placement of phasor measurement units using immunity genetic algorithm,” IEEE Transactions on Power Delivery, vol. 24, no. 3, pp. 1014–1020, 2009. View at: Publisher Site  Google Scholar
 Z. J. Zhao, S. L. Zheng, J. N. Shang, and X. Z. Kong, “Study of cognitive radio decision engine based on quantum genetic algorithm,” Acta Physica Sinica, vol. 56, no. 11, pp. 6760–6766, 2007 (Chinese). View at: Google Scholar
 J. Neel, Analysis and Design of Cognitive Radio Networks and Distributed Radio Resource Management Algorithms, Virginia Tech, Blacksburg, Va, USA, 2006.
 C. Peng, H. Zheng, and B. Y. Zhao, “Utilization and fairness in spectrum assignment for opportunistic spectrum access,” Mobile Networks and Applications, vol. 11, no. 4, pp. 555–576, 2006. View at: Publisher Site  Google Scholar
 C. L. Liao, J. Cheng, Y. X. Tang, and S. Q. Li, “Improved quantum genetic algorithm and its application,” Electronic and Information Technology, vol. 29, p. 1608, 2007. View at: Google Scholar
 A. Narayanan and M. Moore, “Quantuminspired genetic algorithms,” in Proceedings of the IEEE International Conference on Evolutionary Computation (ICEC '96), pp. 61–66, May 1996. View at: Google Scholar
 D. Aharonov, W. van Dam, J. Kempe, Z. Landau, S. Lloyd, and O. Regev, “Adiabatic quantum computation is equivalent to standard quantum computation,” in Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science (FOCS '04), pp. 42–51, October 2004. View at: Google Scholar
 S. H. W. van der Ploeg, A. Izmalkov, M. Grajcar et al., “Adiabatic quantum computation with flux qubits, first experimental results,” IEEE Transactions on Applied Superconductivity, vol. 17, no. 2, pp. 113–119, 2007. View at: Google Scholar
 Y. Li, Y. Zhang, Y. Cheng, and X. Jiang, “A novel immune quantuminspired genetic algorithm,” in Advances in Natural Computation, vol. 3612 of Lecture Notes in Computer Science, pp. 215–218, Springer, Berlin, Germany, 2005. View at: Google Scholar
 K. H. Han and J. H. Kim, “Genetic quantum algorithm and its application to combinatorial optimization problem,” in Proceedings of the IEEE Congress on Evolutionary Computation, pp. 1354–1360, San Diego, Calif, USA, July 2000. View at: Google Scholar
 H. Miao, H. Wang, and Z. Deng, “Quantum genetic algorithm and its application in power system reactive power optimization,” in Proceedings of International Conference on Computational Intelligence and Security, pp. 107–111, Beijing, China, 2009. View at: Google Scholar
 H. Talbi, M. Batouche, and A. Draa, “A quantuminspired genetic algorithm for multisource affine image registration,” in Image Analysis and Recognition, vol. 3211 of Lecture Notes in Computer Science, pp. 147–154, Springer, Berlin, Germany, 2004. View at: Publisher Site  Google Scholar
 R. Zhou and J. Cao, “Quantum novel genetic algorithm based on parallel subpopulation computing and its application,” in Artificial Intelligence Review, Springer, Berlin, Germany, 2012. View at: Google Scholar
Copyright
Copyright © 2013 Huaixiao Wang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.