Abstract

We present a new evolutionary algorithm on the basis of quantum computations technology for solving optimization problems. The algorithm is built using many-valued quantum logic concept, which is more prospective from the computing power’s point of view. We compare the suggested algorithm to the traditional quantum genetic algorithm to demonstrate its high effectiveness on the example of test function global optimization problems. The advantages can be observed in the running time, the convergence speed, and the solution precision. The proposed implementation for the algorithm of quantum gate operator has an adaptive nature and does not require a lookup table. The role and the influence mechanism of the quantum disaster operator on the proposed algorithm effectiveness are also analyzed.

1. Introduction

Quantum genetic algorithm (QGA) is a relatively new evolutionary algorithm, which combines the ideas of the quantum computations with the classical quantum genetic algorithms technology [1, 2]. The probabilistic mechanism of the quantum computations in conjunction with the evolutionary algorithm provides a global search for the solution with fast convergence and small population size. This algorithm is successfully applied to different science and engineering problems, which require approximate, close to the optimum, solutions after a minimum computation time [36].

The main QGA concepts were proposed by Narayanan and Moore [7]. The basic unit of information in the quantum computations is a qubit, a quantum system, which may be in the basis state or the basis state. Quantum nature of the qubit lies in the superposition principle, under which the qubit generally is in a state, which is a linear combination of basis states:with a normalization condition:

A measurement can be applied to the quantum bit, as well as to the classical bit, and the outcome of such measurement is a qubit in a single basis state.

An ordered set of qubits constitutes a quantum chromosome. A state vector of such chromosome is a superposition of basis states of the register , :

All information about the system of qubits is determined by the state vector . The key issue in the QGA is the transformation of the initial state vector to a certain new state using a quantum gate operator. The information about the problem solution lies solely in the final state vector of the system .

Taking into consideration the small size of the population, in order to expand the search area QGA should be additionally complemented with operations, inherent in the classical genetic algorithm, such as quantum mutation operation or disaster operation [2].

2. Quantum Genetic Algorithm Based on Qudits (QGA_n)

In general case number of states of a quantum system is equal to n, the number of level in the multilevel quantum system. Recently much attention has been devoted to studies of possibility of using of the quantum systems for realization of quantum algorithms [810].

In contradiction to qubit, qudit is a quantum unit of information, which may be in any of basis states , , , or in any superposition of those. The state of the qudit can be generally represented as follows:with a normalization constraint:

Let us use the matrix representation for QGA_n implementation:

Taking into consideration (6), the state of the qudit can be presented in the following way:

2.1. Qudit Encoding

To realize QGA_n quantum chromosome is considered as a set of independent qudits. For N=16, it can be represented as follows:

The state of the i-th qudit is determined by the amplitudes of probabilities :

For practical realization of QGA_n with the help of classical computer it is convenient to represent the quantum chromosome which is composed by N qudits as shown in Table 1.

The initial state of the qudit holds no information about the problem or its solution, so the easiest way to initialize it is to set all probability state amplitudes to be equal to one another [1]. This means that as a result of the initialization each qudit is in the state:

The length of the quantum chromosome is determined by precision , search area , and number of quantum system basis states :

For example, for , precision , and search area , the length of the quantum chromosome has to be at least 21 qubits, for - 14 qutrits, and for only 11 qudits are enough (Figure 1).

It should be noted that as the size of the quantum chromosome decreases along with the value growth, we also observe an increase in the size of the matrix, which is needed to represent a single individual or the whole population (Figure 2).

2.2. Observation of Genes

The solution of the problem is determined by the final state vector and can be obtained using the quantum measurement. The outcome of such measurement is a qudit in one of the basis states. This is the classical representation of the quantum chromosome in the numeral system of base .

The following pseudocode for the chromosome state measurement can be suggested based on [11] (Algorithm 1). The result of applying the algorithm is the basis state of the population individuals with probability , , …, .

(1) for do
(2)  r random number in the area
(3)  
(4)  for do
(5)   
(6)   if then
(7)    
(8)   end if
(9)  end for
(10) end for

The algorithm’s concept can be illustrated using Table 2. As a result of the measurement each qudit of the chromosome is transformed into its classical representation in the corresponding numeral system, which is later used for calculating the fitness function.

2.3. Quantum Rotating Gates

All the information about the problem and the algorithm for solving it lies in the quantum gate, so its algorithm is the key issue of any quantum genetic algorithm construction. It manipulates the probability amplitudes of the quantum states , while ensuring the normalization constraint satisfaction.

The operator’s conduct of work can be divided into two stages. The increase of the quantum state probability amplitude, which is selected in accordance with the quantum gate algorithm, takes place during the first stage:

Here is an algorithm parameter, and its value lies in the area and needs to be refined in the result of the previous research. The state is determined by the - value of the classical representation of the best population individual, obtained during the previous iteration of the population evolution.

Expression (12) also ensures that cannot be greater than 1 and implements its adaptive behavior. This is illustrated by Figure 3, which shows the dependency of the value .

On the second stage, all the other state probability amplitudes need to be adjusted to satisfy the normalization constraint (5). In general, the application of the operator to one of the population individuals can be implemented in way shown in Algorithm 2.

(1) for do
(2)  bestamp th value of the gene of best population individual
(3)  
(4)  
(5)  
(6)  for do
(7)   if amp bestamp then
(8)    
(9)   end if
(10)  end for
(11) end for

Therefore, each new generation ensures the increase of the probability of generating individuals which are most similar to the best.

The algorithm’s concept can be illustrated by the image given below. The vertical lines set the state probability amplitudes , , , …  , of -th qudit of the population individual. If the classical representation of the population best individual has, for example, a value on the corresponding position, this is the only amplitude which is increased according to (11). So, only the probability amplitudes , which correspond to the population best individual on the previous evolution stage, will increase. At the same time, probability amplitudes of the other states will decrease to satisfy the normalization constraint.

It is important that the described logic behind the quantum gate operator allows avoiding the need for the lookup table, which is one of the fundamental disadvantages of QGA. Therefore, quantum gate operator provides efficient local convergence of the algorithm to the optimal value with the smaller number of evaluations.

Transition to quantum system of higher dimension leads to short in time transition from one state of quantum chromosome to another during the evolution. For instance, for transition from chromosome state corresponding to classical state representing 7 to classical state representing 8 it is necessary to change the amplitudes of probabilities for 4 qubits:

For the reorientation of quantum states is going in frame of one qudits and as a result of the superposition principle is very effective:

2.4. Quantum Disaster Operation

If the search space is considerably large, the small size of the population can cause its premature convergence and high probability of falling into one of the local minimums. This issue is especially relevant during the optimization of functions with a complex topology and a big number of local minimums.

The easiest mechanism for maintaining the population diversity is the quantum disaster operation [12]. It can be summarized as initialization of some of the population individuals, except for the best one, with initial state (10). The operation “virtually” increases the size of the population but influences the local convergence speed of the algorithm, which will be demonstrated later.

In the simplest case, the quantum disaster operation can be implemented by the way shown in Algorithm 3.

(1) for do
(2)  if the chromosome is not the best then
(3)   if disaster condition then
(4)    for do
(5)     
(6)    end for
(8)   end if
(9)  end if
(11) end for

Quantum chromosome is considered as a set of independent qudits (entanglement of quantum states is not considered). Namely, the result of the quantum disaster operation is transition of the state of quantum chromosome to the initial state (t=0) in which the probability amplitudes are equal to each other.

3. Simulation Test

QGA_n based on qudits system is implemented using C++ programming language, and the simulations are performed on the Intel Celeron CPU G1840 2.80GHz, 4.0 GB RAM.

The set of functions used for QGA testing in the paper is conventional for the analyzed class of algorithms [12, 13]. The paper only includes the optimization results of functions, which are considered difficult for the algorithm and allow estimating the influence of the dimension of quantum system on the algorithm efficiency, which is the main subject of the paper.

If we utilize test functions of smaller number of variables (less than 3), we obtain almost exact results. It does not give the possibility of estimating the influence of the dimension of quantum system on the QGA efficiency (that is the reason for such results not being included in the paper).

A number of numerical optimization problems with a fundamentally different topology in the optimum area were analyzed to illustrate the algorithm design. The following test functions, taken from virtual library of Simulation Experiments in Simon Fraser University, were used.

Trid Function

The function has no local minimums except for the global one

at

Levy Function

where

The function has several local minimums and one global minimum

at

Schwefel Function

The function is complex and has many local minimums and one global minimum

at

Ackley Function

The function is complex and has many local minimums surrounding the global minimum

at

Rastrigin Function

The function is complex and has many periodically located minimums, which are proportional to the single global minimum

at

The choice of the listed functions is prompted by the following considerations:(i) is monotonic and has a single global minimum, so it makes it possible to assess the efficiency of the local convergence of the algorithm and the influence of the quantum disaster operation(ii) has a global minimum within a context of several local minimums, which makes it possible to assess the efficiency of the local convergence of the algorithm combined with the quantum disaster operation(iii), , and have many local minimums surrounding the single global minimum, so they make it possible to assess the capacity of the algorithm’s global search. The differences in the functions topology and the local minimums distribution make it possible to assess the influence of the dimension of quantum system on the abilities of the population getting out of the local minimums, because the population inevitably falls into the local optimal solution during the evolutionary process.

4. Optimization and Results

The following simulation parameters were used for QGA_n practical implementation: number of variables in the test functions ; size of the population ; number of iterations over time ; precision . For and the standard population size the global optimum values are close to the exact solution, and in the context of statistical distribution of the obtained results because of the quantum disaster operation it is not possible to evaluate the search capacity of QGA_n.

4.1. The Choice of Parameter

The value of parameter determines the evolution of the quantum system and has a key role in the algorithm. It also determines the balance between the global (quantum observation operation) and local (quantum gate) search for the solution specification.

To choose the optimal value we need to estimate its influence on the average fitness of the best population individual. The evaluation of the parameters is listed as the average result over 1000 QGA_n runs, if not specified otherwise. Its characteristic behavior in dependency of parameter is presented in Figure 4 for the example of function optimization. It is typical, and the position of the minimum depends on the function topology. It is important that the dimension of quantum system has practically no influence on the optimal value.

Optimal values of the parameter, obtained for the test functions, are listed in Table 3.

It can be observed that without the quantum disaster operation the optimal value of parameter for all the test functions lies in a quite narrow range of values. Taking into account the weak dependency of on , value can be considered completely acceptable for all functions. In case of applying the quantum disaster operation a single optimal value cannot be offered, and the parameter has to be chosen separately for each of the functions.

4.2. QGA_n Effectiveness Evaluation

The majority of the quantum algorithms use similar primary ideas and approaches, which are based on the qubit representation of the population [14]. Therefore the proposed algorithm is compared to the traditional quantum genetic algorithm: it corresponds to the case with the dimension of quantum system .

The effectiveness evaluation of the proposed algorithm is performed by two main criteria. The first is running time for a standard set of input parameters. For illustrative purposes, we will limit the quantum systems with inclusive. There are no principal restrictions for the transition to many-valued quantum logic with . The results of such research on the example of function are given in Figures 5 and 6. In general, the average running time is essentially independent of the test function and the existence or absence of the quantum disaster operation and is determined by the size of the search area with all the other parameters remaining unchanged.

Figure 7 illustrates the convergence speed of QGA_n for function with and without the quantum disaster operation. Here and throughout the probability of the quantum disaster is assumed to be equal to 1 for the whole population except for the best individual. Taking into account the considerable range of the outcomes in different algorithm runs, in this case the fitness of the best individual is listed as the average result over 100 QGA_n runs.

As can be seen from Figure 7, on the early stages of the evolution, up to the 200-th generation, quantum disaster operation accelerates the evolution of the population to the optimal value. However, on the final stages, it has a negative impact. Simulation studies show that a simple removal of one individual from the evolutionary process through the quantum disaster operation cannot explain the deterioration of the local convergence of the algorithm. For example, population size reduction of one individual, to , causes a change in the obtained results, which is not bigger than 5-10 percent. The rest 90 percent of the deterioration are caused by the influence of the quantum disaster operation during the whole previous development history of the population in general.

The presence of local minimums significantly changes the overall picture of the dimension of quantum system influence on the search efficiency. This is proven by the results of function optimization results, listed on Figure 8. The positive role of the quantum disaster operation should be acknowledged in this case. Periodical peaks can be observed in the functional dependency. They are most likely caused by “interference” of the periodical typology of the reviewed function and the discreet nature of the dimension of quantum system. This issue is not a subject of this paper and will be studies separately.

Statistical results, including the best result Best, the average result , the worst result Worst, and the standard deviation , retrieved during test functions optimization, are listed in Tables 4-6. All dates are obtained averaging over 100 QGA_n runs.

Figures 911 illustrate the characteristic dynamics of the evolutionary process of the population over time for functions with a complex topology.

As we consider the presented results, two points can be observed:(i)the chosen maximum time of the evolution is not always enough for the population to finish the relaxation to the optimal value;(ii)utilization of the quantum disaster operation in case of a test function with complex topology causes a significant acceleration of the evolutionary process on the early stages of the evolution, approximately within the first 200 iterations over time.

5. Conclusions

In this paper, we proposed a new genetic algorithm based on many-valued quantum logic QGA_n. The quantum operators suggested in the paper allow performing an effective search for the optimum of multivariable functions operating with a small population size. In cases when the function topology is complex, quantum disaster operation is used to avoid the population falling into the local optimums.

The concept of the algorithm is illustrated by the example of the optimization problem for a set of test functions. The obtained results lead to the following conclusions:(i)representation of quantum chromosome by a system of qudits with n>10 decreases time of performing the algorithm approximately in three times with a significant increasing of convergence on the early stages of the evolution (t<150). Increasing of algorithm efficiency is in the frame of the statistical error of the results;(ii)the suggested quantum gate operator does not require a lookup table, and its adaptive nature provides a much better local search efficiency compared to QGA;(iii)it is advisable to use the quantum disaster operation for providing the population diversity in small quantum populations. If the studied function is monotonous, the utilization of the quantum disaster operation may cause a slight accuracy loss in the obtained results;(iv)suggested QGA_n is especially effective in cases of optimization of multivalued functions with a complex topology in the area of local minimum and sufficiently large search area;(v)the dynamics of the evolutionary process is determined by parameter, which has a key role in the algorithm. Its value should be adapted individually for the specific function, with the application or nonapplication of the quantum disaster operation taken into consideration.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The author declares that there are no conflicts of interest regarding the publication of this paper.