Quantum-Inspired Evolutionary Algorithm for Continuous Space Optimization Based on Multiple Chains Encoding Method of Quantum Bits

This study proposes a novel quantum evolutionary algorithm called four-chain quantum-inspired evolutionary algorithm (FCQIEA) based on the four gene chains encoding method. In FCQIEA, a chromosome comprises four gene chains to expand the search space effectively and promote the evolutionary rate. Different parameters, including rotational angle and mutation probability, have been analyzed for better optimization. Performance comparison with other quantum-inspired evolutionary algorithms (QIEAs), evolutionary algorithms, and different chains of QIEA demonstrates the effectiveness and efficiency of FCQIEA.

However, several studies have demonstrated that bQIEA is not suitable for numerical optimization problems [16,71], such as function extremum optimization.Several problems have caused bQIEA to have slow converging speed and prematurity.For instance, frequent binary encoding and quantum chromosome decoding cause randomness and blindness.The magnitude and the direction of the rotational angle of quantum rotation gates cannot be determined during optimization.To solve global numerical optimization problems with continuous variables, studies have proposed a realobservation QIEA (rQIEA) [72,73], which is characterized by the modified Q-bit representation to represent a Q-bit individual, the use of real observation to generate real-valued solutions from Q-bit individuals, and the modified Q-gate to guide the individuals toward better solutions.S. Li and P. Li [74] further proposed a convenient method to determine the direction of the rotational angle; in particular, a real qubits encoding method can be used to avoid binary coding and the double-chains quantum evolutionary algorithm, which is characterized by each qubit that is regarded as two coordinate genes.Each chromosome contains two gene chains, and each gene chain represents an optimization result.P. Li and S. Li [75] studied the appropriate rotational angle size between two rotational angles to obtain the best optimization effects and proposed the three-chain quantum evolutionary algorithm, which is characterized by bloch coordinates as the gene chains, such that each chromosome has three gene chains.The optimized effects of three-chain quantum evolutionary algorithm is more efficient than the double-chains quantum evolutionary algorithm in solving continuous space optimization problems because the three-chain quantum evolutionary algorithm can accelerate the evolution speed and expand the search space of QIEA by increasing the number of gene chains.The current study presents a novel QIEA called four-chain quantum-inspired evolutionary algorithm (FCQIEA) based on expanded chains encoding to improve the QIEA performance further.FCQIEA integrates the characteristics of the double-chains encoding method and the three-chain encoding method to describe each qubit as four paratactic genes.Our results demonstrate that FCQIEA is more effective and feasible based on the optimization experiments that involve typical function extremum.We also compared our results with common quantum-inspired evolutionary algorithm (CQIEA), double-chains quantuminspired evolutionary algorithm (DCQIEA), and three-chain quantum-inspired evolutionary algorithm (TCQIEA).In addition, we compared the performance of the proposed FCQIEA with other QIEAs and other EAs.

The Principle of FCQIEA
In (1), -dimensional continuous space optimization solutions are regarded as points or vectors.  and   are the lower and the upper bounds for the design variable   , respectively.Hence, restrained conditions are bounded as closed set Ω in -dimension continuous space, and all points in Ω are regarded as approximate solutions.

Expanded Encoding Method for Quantum Chromosome.
In quantum computation, the basic unit of information is described by a qubit, which can be expressed as follows: where  and  satisfy the following normalization condition: A pair of complex numbers  and  in ( 2) and ( 3) is called qubit probability amplitude.Therefore, the qubit can also be described by using the probability amplitude as [, ]  .According to the nature of the probability amplitude, a qubit can be expressed as in Figure 1.
Thus,  = cos  and  = sin ; then, qubit |⟩ can be expressed as follows: Qubits are directly regarded as genes on a chromosome; thus, we can use (4) as the encoding method.The principle of the double-chains encoding method [43] is applied and described as follows: where   = 2 × rand, rand ∈ [0, 1], and rand is a random number from 0 to 1;  = 1, 2, 3, . . .,  and  = 1, 2, . . ., ;  describes the population size;  is the number of qubits.We can consider points [0, 0.5] and [0, −0.05] as the center of two semicircles, such as in the Chinese Taiji (Figure 2).
Figure 2 shows that the vector of qubit |⟩ intersects the semicircle at point , which can be connected to point .We can draw the vertical line segment  from point  to line segment .We can infer that angle ∠ = /2 forms a semicircle and angle ∠ = .Thus, the length of the line segment  =  × sin  = sin .Similarly,  =  × cos  = cos .Thus, we can obtain the following equations: Similarly, we obtain the following: Equations ( 6) and (7) show that each vector in a qubit can be a hypotenuse in a right triangle so that it can be separated into two vectors, in which the sum of squares is equal to the square of the vector.Hence, we can determine vector  as follows: Equation ( 8) is consistent with the following normalization condition and thus is equivalent to We can also substitute (4) in (10) as follows: ⟩ = [cos , sin ]  = [cos , cos  sin , sin  sin ]  .(10) To describe the quantum dynamics behavior objectively, comprehensively, and unambiguously, we can use a new angle  (0 <  < ), which is called "supporting role, " to replace  and obtain vector sin  as follows: Equation ( 11) also satisfies the normalization condition; hence, (11) is correct.In fact, (11) also corresponds to the three-chain encoding method [75]: We can obtain four optimal solutions, which are expressed below: We define  1 ,  2 ,  3 , and  4 as solutions 1, 2, 3, and 4, respectively.The encoded chromosomal structure is shown in Figure 3. Figure 3 shows that each chromosome can be separated into four gene chains, and each gene chain can have infinite sets of qubits that greatly expand the number of the global optimal solution and significantly increase the probability to obtain the global optimal solution.

Solution Space Transformation.
In the quantum evolution progress, all qubits have limited values within −1 to 1. Thus, we need to transform all qubit values from unit space   = [−1,1]  to space Ω of the continuous optimization problem (1) by using linear transformation.Each gene value corresponds to an optimization variable in the solution space.If the th qubit on chromosome   is [ 4   ,      =  0 , and |Δ| =  0 , respectively.Set   as the mutation and   as the maximum generation.
Step 2. Transform the solution space.Four approximate solutions in each chromosome are transformed from the unit space   = [−1, 1]  to the solution space Ω of the continuous optimization problem (1); thus, the set of approximate solution () can be obtained.
Step 3. Compute the fitness.By computing the fitness of 4 approximate solutions, obtain the best solution  in the current solution and the best chromosome  in the current chromosome.Store  as the global optimum solution  and store  as the global optimum chromosome .
Step 5. Transform the solution space again and obtain a set of approximate solution ().
Step 6.By computing the fitness of (), determine the current optimum solution  and the current optimum.chromosome  If () < (), then update the current optimum solution  = ; at the same time, update the current optimum chromosome  =  to avoid population degradation.Otherwise, let  =  and  =  so that the algorithm approaches the global optimum solution.
Step 7. If the algorithm does not converge and if  <  , then go back to Step 4 until the algorithm becomes convergent or until  >  .Pseudocode 3 corresponding variables in the solution space are computed as follows: where  = 1, 2, 3, . . .,  and  = 1, 2, . . ., .Thus, each chromosome maps out four approximate solutions of the optimization problem.

Quantum Chromosome Update.
Considering that  quantum chromosomes are present in the colony and we can obtain 4 approximate solutions by solution space transformation, we can then compute the fitness of these approximate solutions and define the solution with the maximum fitness as the current optimum solution in the quantum evolution progress.The chromosome corresponds to the current optimum solution called the optimum chromosome.By computing the fitness, we can obtain both optimum solution and optimum chromosome and subsequently update the colony by using the quantum rotation gate to obtain the optimal solution.In this updated process, the new optimum chromosome can be produced such that the colony can likely evolve.
These equations show that we can obtain the phase rotation of Δ, Δ, and Δ from .Δ, Δ, and Δ are important factors that directly influence the convergence speed and the efficiency of quantum evolution algorithm.In general, a query table is constructed [4] to determine the size and the direction of Δ, Δ, and Δ.In this way, all of the possible instances are considered when making a decision, but it is very complicated to lower the algorithm efficiency.To determine the rule that considers the size and the direction of the rotational angle by using a simple method, we can deduce the following conclusions.
(1) The direction of Δ is determined by the following rules.If  ̸ = 0, then sgn(Δ) = − sgn(); if  = 0, then the direction of  may be positive or negative at random.
(2) The direction of Δ is determined by the following rules.If  ̸ = 0, then sgn(Δ) = − sgn(); if  = 0, then the direction of  may be positive or negative at random.
(3) The direction of Δ is determined by the following rules.If  ̸ = 0, then sgn(Δ) = − sgn(); if  = 0, then the direction of  may be positive or negative at random.
Proof.Consider the following equations: To determine the direction of Δ,  is expressed in the form of a trigonometric function as follows:
If sin  sin  sin  0 sin  0 = 0, then at least one angle is zero;  and  0 can have arbitrary values.Therefore, the direction of sgn(Δ) is arbitrary.If sin(− 0 ) = 0, then  =  0 or | −  0 | = ; therefore, both positive and negative directions have the same result.Thus, the direction of sgn(Δ) is arbitrary when  = 0. ( If  = 0, then  0 =  or |− 0 | = ; both positive and negative directions have the same result.Therefore, the direction of sgn(Δ) is arbitrary. ( If  = 0, then  0 =  or | −  0 | = ; both positive and negative directions have the same result.Therefore, the direction of sgn(Δ) is arbitrary.
The magnitudes of Δ, Δ, and Δ have an important effect on the convergence speed.A decreased efficiency is observed in the optimization process when the magnitudes of Δ, Δ, and Δ are very small.By contrast, a premature convergence likely occurs in the optimization process when the magnitudes of Δ, Δ, and Δ are very high.
The values from 0.005 to 0.05 are recommended for the magnitudes of Δ, Δ, and Δ, although they depend on the problems [75].
Based on our analysis, a simplified query table (Table 1) is constructed to determine the direction of Δ, Δ, and Δ.

Mutation Operation.
Quantum nongate is applied to exchange the probability amplitudes to avoid local optimal solution in a certain qubit as follows: Such influence as expressed in ( 18) can be considered as the phase mutation of a qubit, in which  is mutated to /2−.In this case, a quantum nongate  is proposed to mutate the quantum as follows: The quantum nongate rotation can enhance population diversity.The mutation operation does not compare with the current optimum chromosome.The rotation magnitudes are usually great, which are /2 − 2, /2 − 2, and /2 − 2.
Let the qubits in the chromosome   be   , where  = 1, 2, 3, . . .,  and  = 1, 2, . . ., ;   is the mutation probability.Based on our analysis, the mutation progress   is described by another pseudocode as shown in Pseudocode 2.

Algorithm Description
The structure of FCQIEA is shown by the pseudocode under the section of the procedure for FCQIEA (see Pseudocode 3).Proof.Given that the value of () is continuous, the state space of the population is theoretically infinite, but   is finite in accuracy in the progress of computation.Considering that the value of   is V and V  represents the magnitude of the state space, the population becomes finite.The chromosome is then updated and mutated to show the relationship between  +1 and   ; thus, the iteration sequence of {  ,  ≥ 0} is a finite Markov chain (end).
Proof.By the retention strategy of storing the best chromosome in FCQIEA, the population is not degenerated in each population generation.The population is expressed as fit( +1 ) ≥ fit(  ) when  ≥ 0.

Lemma 4. FCQIEA is converged with probability 1.
Proof.Assume that  qubits are present in each chromosome in a population with  chromosomes, which can be described as point [−1, 1]  in state space.The state space of the population is defined as V  when the accuracy of   is finite and the value is V. Considering that   () is the probability with the  state in   population and   = ∑ ∈   , the probability of  +1 with the state of  ∈  can be derived using the Markov chain as follows: The probability of  +1 can be further derived as follows:

Experimental Result
We tested the FCQIEA performance by using different parameters to achieve the best performance for FCQIEA.Afterward, the performance of FCQIEA was compared with CQIEA, DCQIEA, and TCQIEA, as well as with bQIEA and rQIEA.The FCQIEA performance was also compared with the standard genetic algorithm (GA), particle swarm optimization (PSO), and artificial bee colony (ABC).

Parameter Analysis.
In this section, different parameters, which include rotational angle and mutation probability, were analyzed by conducting a simulation test with two application examples of extremum optimizing complex functions (Goldstein-Price function and Shubert function) to achieve the best performance of FCQIEA.
(2) The Shubert function is expressed as follows: where ,  ∈ (−5.12, 5.12).This function is a typical multipeak function, in which the maximum extremum value   point is (0, 0) that corresponds to the global optimum value of 10.When the optimum results reach 9.995, the algorithm is considered as convergent.Shubert function is shown in Figure 5.
The range of |Δ|, |Δ|, and |Δ| was studied by applying Goldstein-Price and Shubert functions.The population size, the maximum number of epochs, and the mutation probability are set at 10, 100, and 0, respectively.
The relationship between |Δ|, |Δ|, and |Δ| was also investigated.The population size, the maximum number of epochs, and the mutation probability are set at 10, 100, and 0, respectively.
The magnitude of the rotational angle Δ and the mutation probability  is set as follows: Δ = {0.005,0.01, 0.015, 0.02, 0.025, 0.03, 0.035, 0.04, 0.045, 0.05} ,   = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1} .(35) To determine the relationship between mutation probability and rotational angle as well as to avoid the influence of random factors, we performed the calculation 10 times by using different mutation probabilities in each rotational angle from 0.005 to 0.05 and obtained the average value as the optimization result.The optimization result is shown in Figures 10 and 11.
Figures 10 and 11 show that the mutation operator can accelerate the optimization process when 0.05 <   < 0.70.The optimal optimization effect can be obtained when   = 0.05.In general, the range of  can be selected from 0.01 to 0.5.

Comparison of the Different Chains of QIEA.
In this section, we tested the performance of the proposed FCQIEA by using two application examples of the extremum optimizing complex functions (the Goldstein-Price and the Shubert functions).We also compared FCQIEA with CQIEA, DCQIEA, and TCQIEA in the experiments.
In the following section, we evaluated the optimization performance of FCQIEA and compared it with that of CQIEA, DCQIEA, and TCQIEA.In these three algorithms, the number of chromosomes, the mutation probability, and the maximum number of epochs are set at 20, 0.04, and 100, respectively.In FCQIEA, |Δ|, |Δ|, and |Δ| are 0.015.In TCQIEA, |Δ| and |Δ| are 0.01 [50].In DCQIEA, |Δ| is 0.01.In CQIEA, each variable of the Shubert function is described by 25 binary digits, where the first bit represents the sign, the second to fifth bits represent the integral part of the variable, and the sixth to twenty-fifth bits represent the fraction part of the variable.In this case, each chromosome consists of 50 qubits.For the Goldstein-Price function, each variable is described by 18 binary digits, where the first bit represents the sign, the second and third bits represent the integral part of the variable, and the fourth to eighteenth bits represent the fraction part of the variable [50].Therefore, each chromosome consists of 36 qubits.Two functions are optimized 10 times by FCQIEA, TCQIEA, DCQIEA, and CQIEA.The optimization results are shown in Figures 12 and  13 as well as in Table 2.
Table 2 and Figures 12 and 13 show that FCQIEA is the most efficient algorithm and the optimized result is considered optimal.TCQIEA and DCQIEA are also considered efficient algorithms.By contrast, our results revealed that CQIEA is the most inefficient of the three algorithms.
Table 2 and Figures 12 and 13 also show that FCQIEA is the most efficient and the optimized result is optimal.TCQIEA and DCQIEA are also considered efficient algorithms.By contrast, our results revealed that CQIEA is the most inefficient of the three algorithms.In FCQIEA, four-chain encoding method enhances the search capability compared with TCQIEA and DCQIEA.The application of mutation operator avoids running into the local minimum.The TCQIEA efficiency is lower than FCQIEA because FCQIEA have four gene chains, but TCQIEA and DCQIEA have less than three gene chains.For the same reason, the efficiency of DCQIEA is lower than that of TCQIEA.The running time of CQIEA is the greatest because of frequently encoding and decoding the binary number.Given that the optimization solution is obtained by probability, CQIEA is not the best choice to solve continuous optimization problems.Thus, we can improve the QEA efficiency by adding gene chains.
The multimodal functions include Ackley, Griewank, Rastrigin, and Schwefel.The Ackley function has a surface with numerous local optima because of its exponential term.The variables of Griewank function exhibit interdependence because the function has a product term.Similarly, Rastrigin function has numerous local minima.The surface of Schwefel function is composed of numerous peaks and valleys.The    best minimum among the functions is located far from the global minimum, which is found near the boundaries of the search domain [48,76].Rosenbrock is a continuous, convex, and unimodal function.Given that the global optimum is inside a long, narrow, parabolic-shaped flat valley and the variables are dependent, the gradients generally do not point toward the optimum and these gradients are difficult to converge at the global optimum.The functions are used to compare the different QIEA performances, including bQIEA and rQIEA, by using 30 dimensions.The population size is set at 50 for FCQIEA.The stopping criterion is the number of function evaluations.Each test function is performed with 50 independent runs.The mean best values and the standard deviations are recorded for each test function.Table 3 lists the simulation test results, in which FCQIEA provides better results than the two other versions of QIEA, which are used to search for optimal solutions and maintain robustness.The number of runs is 50.Mean, Std., and NoFE represent the best mean, the standard deviation, and the number of function evaluations, respectively.The bold style highlights the best result for each function (Table 4).

Comparison with Other EAs.
In this paper, we tested the set of five widely used benchmark continuous functions (Table 3) with high complexity to compare the performance of the FCQIEA with other EAs.The FCQIEA algorithms are also compared with the standard GA, PSO, and ABC to search for the global minima in the solution space.
In the experiments, the population size of ABC, PSO, GA, and FCQIEA is set at 50 and the maximum number of function evaluations is set at 30,000; the other parameters used were in accordance with the parameter settings in a previous study [77].More than 100 independent experiments were conducted for each function and performance indexes, such as the success ratio and the average minimum function value.The results were subsequently recorded.Table 5 shows the results of five test functions, in which the standard GA, PSO, ABC, and FCQIEA were used.
The Ackley function (F1) contains many peaks and valleys.Considering the five-dimensional Ackley function optimization, the global minimum was obtained by using all of the algorithms, but FCQIEA had the best performance among the four algorithms.FCQIEA can be used to find the global minimum with approximately 100% success rate in several hundredths of a second.We increased the dimension of the function to 30 and found that the global optimum was still obtained at a success rate of approximately 100% based on FCQIEA.By contrast, the other three algorithms failed to converge.Similar results were obtained after we tested the performance of the Rastrigin function (F3; Figure 14).
The Griewank function is a multimodal function (F2) with numerous regularly distributed local minima.The global minimum was satisfactorily obtained based on the four algorithms when the dimension was set at 20 and 30.Throughout the experiment, FCQIEA exhibited the best performance among the four algorithms.The performances of the four algorithms for the Schwefel function (F4) are similar to those in the Ackley function.The Rosenbrock function (F5) is a unimodal optimization problem, but it is very difficult to solve.Convergence is also difficult to achieve at the global optimum.Table 5 shows that both GA and PSO fail to find the global optimum.At the function dimension of 20, the optimum can be obtained via ABC but with a very low success ratio.However, the results of FCQIEA are very good, in which the global minimum can be rapidly determined with 100% success rate for dimension equal to 20.However, if the dimension was increased to 40, the success ratio decreased to 70% with an increased run time.

Conclusion
This paper presents the expanded encoding method for QIEA by determining the qubit vector to improve the stability and the global search ability for high-dimensional continuous space optimization.Based on the expanded encoding method, this paper presents the four-chain encoding method.Moreover, the optimum parameter, which considers the rotational angle and the mutation probability, is studied experimentally for FCQIEA.FCQIEA is shown as a robust algorithm that can be used to solve high-dimensional continuous space optimization problems compared with CQIEA, DCQIEA, and TCQIEA with extremum optimizing complex functions (the Goldstein-Price and the Shubert functions) as well as with the standard bQIEA, rQIEA, GA, PSO, and ABC for five widely used benchmark examples.The experimental results indicate that the expanded encoding method can improve the optimization efficiency of QIEA.

Figure 9 :
Figure 9: Effect of the proportion factors  and  on the Shubert function optimization.

Figure 10 :Figure 11 :
Figure 10: Effect of the mutation probability   on the Goldstein-Price function optimization.

Figure 12 :
Figure 12: Comparison of the optimization results on the Goldstein-Price function (10 optimizations).

Figure 13 :
Figure 13: Comparison of the optimization results on the Shubert function (10 optimizations).

Figure 14 :
Figure 14: Comparison of the optimization results on the Rastrigin function.

Table 2 :
Comparison of the optimization results on function extremum (10 optimizations).