Mathematical Problems in Engineering
Volume 2018 (2018), Article ID 9127510, 12 pages
https://doi.org/10.1155/2018/9127510

Research Article

Quantum Genetic Algorithm on Multilevel Quantum Systems

Valerii Tkachuk

Vasyl Stefanyk Precarpathian National University, 57 Shevchenko Str., 76018, Ivano-Frankivsk, Ukraine

Correspondence should be addressed to Valerii Tkachuk; tkachukv0@gmail.com

Received 16 April 2018; Accepted 21 May 2018; Published 24 June 2018

Academic Editor: Francesco Riganti-Fulginei

Copyright © 2018 Valerii Tkachuk. 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.

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 [3–6].

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 [8–10].

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.

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).

Figure 1: Length of the quantum chromosome N as a function of dimension of quantum system n.

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).

Figure 2: Influence of the dimension of quantum system n on the size of the matrix, which is required for representing one population individual.

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

Algorithm 1: Qudit state measurement.

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.

Table 2

Measurement

0
7
3
…
1
…
…
…
0

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 .

Figure 3: Change of the probability amplitude of the quantum state in dependency of with .

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

Algorithm 2: Quantum gate operator.

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

Algorithm 3: Quantum disaster.

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.

Figure 4: Average fitness of the best population individual Favr as a function of parameter. Quantum disaster operation not applied.

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

Table 3: Optimal values of the parameter.

Function
QGA_n
QGA_n+Disaster

F₁
0.010
0.020

F₂
0.013
0.056

F₃
0.015
0.102

F₄
0.026
0.13

F₅
0.019
0.11

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 5: Average running time of the algorithm tavr in dependency of the dimension of quantum system n.

Figure 6: Average fitness of the best individual of the population Favr in dependency of the dimension of quantum system n.

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.

Figure 7: Average population evolution over time for function F₁ with n=6.

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.

Figure 8: Average fitness of the best individual of the population Favr in dependency of the dimension of quantum system n for function F₂.

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.

Table 4: Test functions F₃ optimization results.

QGA_n
QGA_n+Disaster

n

Best
Worst
n

Best
Worst

2
38.56
57.7
0.039
283.8
2
17.55
37.4

240.1

3
60.1
62.7
0.016
374.9
3
89.2
100.0

410.3

4
12.9
11.9
0.011
124.5
4
5.19
13.1

68.9

5
16.88
29.60

138.7
5
16.04
50.7

156.7

6
15.77
17.69
0.015
142.8
6
10.94
24.2

126.8

7
1.63
1.15
0.001
97.6
7
1.44
0.98

5.12

8
0.64
6.73

81.7
8
0.44
1.07

98.2

9
5.97
26.1

106.7
9
3.93
12.9

105.4

10
14.66
27.6

143.1
10
11.46
24.11

121.0

11
14.07
14.98

95.5
11
13.24
15.27

72.0

12
6.01
3.51
0.027
30.18
12
4.47
2.66

12.53

13
2.58
5.68

83.4
13
1.48
1.19

32.56

14
9.56
7.72

38.9
14
8.35
7.36

36.47

15
11.51
14.74

80.7
15
9.76
13.63

77.01

16
9.00
17.30
2
108.2
16
7.35
15.92

103.2

17
2.49
10.54
2
103.3
17
1.34
7.91

68.9

18
1.19
7.81

57.9
18
0.69
6.08

68.7

19
0.44
0.38

3.98
19
0.075
0.125

0.643

20
2.03
9.72

87.4
20
1.56
8.72

54.04

Table 5: Test functions F₄ optimization results.

QGA_n
QGA_n+Disaster

n

Best
Worst
n

Best
Worst

2
0.138
0.46

3.29
2
0.081
0.37

2.72

3
0.105
0.158

2.25
3
0.002
0.004

0.009

4
0.066
0.079

1.07
4
0.001

0.09

5
0.160
0.24

2.63
5
0.002
0.005

0.11

6
0.101
0.16

1.58
6
0.001

0.002

7
1.38
1.02

3.39
7
0.52
0.96

3.28

8
0.101
0.14

1.61
8
0.001

9
0.127
0.39

3.17
9
0.005
0.011

0.15

10
0.101
0.71

2.29
10
1.103
0.61

3.29

11
0.378
0.68

4.75
11
0.005
0.048

0.51

12
0.410
0.644

2.66
12
0.109
0.445

1.65

13
0.362
0.392

2.46
13
0.005
0.021

0.59

14
0.265
0.482

3.29
14
0.014
0.184

2.95

15
0.389
0.487

3.99
15
0.005
0.019

0.41

16
0.222
0.37

2.27
16

0.002

0.028

17
0.93
1.28

5.66
17
0.207
0.816

4.88

18
0.252
0.354

2.45
18

0.019

19
1.42
1.57

5.62
19
0.64
1.33

4.56

20
0.274
0.324

2.13
20

0.014

Table 6: Test functions F₅ optimization results.

QGA_n
QGA_n+Disaster

n

Best
Worst
n

Best
Worst

2
3.41
2.02

11.34
2
2.50
2.07

12.01

3
3.08
1.37
0.039
11.09
3
2.05
1.99

11.8

4
2.54
1.08

9.1
4
1.75
1.16

6.46

5
1.21
1.01

9.11
5
1.92
0.81

4.01

6
2.49
1.34
1
10.95
6
2.57
1.96

12.9

7
1.51
0.97

4.34
7
0.314
1.28

7.13

8
1.19
1.76

8.16
8
2.17
1.05

7.96

9
2.73
1.27

6.50
9
0.79
1.22

8.39

10
0.019
1.38

9.02
10
0.001

11
0.362
0.512

3.19
11

0.011

0.353

12
2.90
1.58

9.98
12
2.42
1.24

7.96

13
3.01
1.47

10.92
13
2.34
1.24

6.97

14
3.07
1.16

6.02
14
2.31
1.18

5.98

15
2.28
1.17

6.19
15
1.67
1.14

5.03

16
2.75
1.15

6.0
16
2.09
1.13

5.0

17
2.51
1.23

6.12
17
2.01
1.14

5.06

18
2.71
1.25

6.08
18
2.24
1.19

6.01

19
1.29
0.94

4.99
19
1.22
0.96

4.11

20
0.229
0.347

2.16
20

0.13

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

Figure 9: Time-averaged population evolution for function F₃ with n=6.

Figure 10: Time-averaged population evolution for function F₄ with n=6.

Figure 11: Time-averaged population evolution for function F₅ with n=6.

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.

References

K. H. Han and J. H. Kim, “Genetic quantum algorithm and its application to combinatorial optimization problem,” in Proceedings of the IEEE International Conference on Evolutionary Computation, vol. 2, pp. 1354–1360, La Jolla, Calif, USA, July 2000.

H. Wang, J. Liu, J. Zhi, and C. Fu, “The improvement of quantum genetic algorithm and its application on function optimization,” Mathematical Problems in Engineering, vol. 2013, Article ID 730749, 10 pages, 2013.

P. Jantos, D. Grzechca, and J. Rutkowski, “Evolutionary algorithms for global parametric fault diagnosis in analogue integrated circuits,” Bulletin of the Polish Academy of Sciences—Technical Sciences, vol. 60, no. 1, pp. 133–142, 2012.

H. Talbi, M. Batouche, and A. Draa, “A Quantum-Inspired Evolutionary Algorithm for Multiobjective Image Segmentation, International Journal of Mathematical,” International Journal of Mathematical, Physical and Engineering Sciences, vol. 1, pp. 109–114, 2007.

C. Qin, Y. Liu, and J. Zheng, “A real-coded quantum-inspired evolutionary algorithm for global numerical optimization,” in Proceedings of the 2008 IEEE Conference on Cybernetics and Intelligent Systems, pp. 1160–1164, 2008.

D.-Y. Lin and S. T. Waller, “A quantum-inspired genetic algorithm for dynamic continuous network design problem,” Transportation Letters, vol. 1, no. 1, pp. 81–93, 2009.

A. Narayanan and M. Moore, “Quantum-inspired genetic algorithms,” in Proceedings of the IEEE International Conference on Evolutionary Computation (ICEC’96), pp. 61–66, Nagoya, Japan, 1996.

E. O. Kiktenko, A. K. Fedorov, A. A. Strakhov, and V. I. Man'ko, “Single qudit realization of the Deutsch algorithm using superconducting many-level quantum circuits,” Physics Letters A, vol. 379, no. 22-23, pp. 1409–1413, 2015.

A. Popov, E. Kiktenko, A. Fedorov, and V. I. Man’ko, “Information Processing Using Three-Qubit and Qubit–Qutrit Encodings of Noncomposite Quantum Systems,” Journal of Russian Laser Research, vol. 37, no. 6, pp. 581–590, 2016.

Z. Gedik, I. A. Silva, B. Çakmak et al., “Computational speed-up with a single qudit,” Scientific Reports, vol. 5, Article ID 14671, 2015.

R. Nowotniak and J. Kucharski, “Higher-order quantum-inspired genetic algorithms,” in Proceedings of the 2014 Federated Conference on Computer Science and Information Systems, FedCSIS 2014, pp. 465–470, Poland, September 2014.

H. Miao, H. Wang, and Z. Deng, “Quantum genetic algorithm and its application in power system reactive power optimization,” in Proceedings of the 2009 International Conference on Computational Intelligence and Security, CIS 2009, pp. 107–111, Beijing, China, December 2009.

Y. Sun and H. Xiong, “Function optimization based on quantum genetic algorithm,” Research Journal of Applied Sciences, Engineering & Technology, vol. 7, no. 1, pp. 144–149, 2014.

G. Zhang, “Quantum-inspired evolutionary algorithms: a survey and empirical study,” Journal of Heuristics, vol. 17, pp. 303–351, 2011.