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 self-adaptive 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 spin-down state and spin-up 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 self-organizing, self-adaptive, and self-learning [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. Self-Adaptive Rotating Angle Strategy

The conventional quantum genetic algorithm adopts a rotating strategy with fixed angle. In this paper, a rotating strategy with self-adaptive 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 self-adaptive 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.

Procedure Mutate ( )
Begin
 If is not the current optimum chromosome then
 Begin
   ;
  When ( )
   ;
  Generate Random Number rand in range ( );
  If rand or rand
  Exchange and ;
 End
End

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.

Begin
 If (disaster-condition)
 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 [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 Self-Adaptive 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 Self-Adaptive Quantum Genetic Algorithm in which Mutation Operation Is Added

The mutation operation is added based on the self-adaptive 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 Self-Adaptive Mutation Quantum Genetic Algorithm Added Disaster Operation

The disaster operation is added based on the self-adaptive 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 self-adaptive 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 Self-Adaptive 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 self-adaptive 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.