Introduction

More often than not, the kind of problems found in the real physical world, social policy, and artificial worlds are complex. The term complex has a dual meaning: it is related to two or more things that are closed interlaced forming a system, and it is used to qualify something difficult to understand and solve. Complexity theory is an important field of theoretical computer science that includes the study of complex adaptive systems1,2, wicked problems3, computational complexity, and others. To deal with these systems, different techniques have been applied such as the theory of chaos2, cellular automata2, and evolutionary computing4.

Due to their characteristics and mechanisms, natural systems are a plentiful source of research to solve complex problems. Insects, birds, chemical reactions, and physical systems have been used as a catalyst for nature-inspired solutions that have been successfully applied. In recent work, the interaction between the Namib desert beetles, cacti and pitcher plants, has been used for the design of surfaces to control dropwise condensation, outperforming other synthetic surfaces5. In a similar sense, the architecture of barbules in birds of paradise has been studied for developing black pigments that absorb most of the incident light6. Nature-inspired chemical engineering is a novel concept that presents innovative solutions to challenging problems of biomedicine, manufacturing, computation, and robotics. Its focus is the creation of novel technologies using mechanistic features of natural systems, this approach is different from those based on biomimetic (nature-imitating), and nature-integrated (bio-incorporated) design7. Physical systems such as the light and the behaviour of subatomic particles are important sources of contemporary research. A promising optical nature-inspired research is deep learning with photonic neural networks. While its classical computer counterpart might use some hundreds of watts to solve a problem, the photonic implementation could reduce the power consumption dramatically8.

In search and optimisation algorithms, running times and computational complexity are very important. The factors mentioned above can be the turning points to decide which algorithm to implement in a certain problem. With the purpose of lowering running times and finding solutions to problems that are impractical to solve because of their complexity, quantum computing has gained lots of interest from the scientific community. Quantum computing is an emerging technology based on the interaction and behaviour of subatomic particles. It takes advantage of quantum-physics phenomena, such as entanglement and superposition, to perform computations up to ≈108 times faster than a computer with a single processor core9.

An efficient software implementation of quantum algorithms requires quantum computers capable of satisfying the Deutsch-Church-Turing principle, which states that “every finitely realizable physical system can be perfectly simulated by a universal model computing machine operating by finite means10. Currently, several companies are working in the development of quantum computers, some of these companies are D-Wave systems11, IBM12, Google13, the QuTech14, Intel15, and Rigetti16. Most of these companies are offering cloud services, however, none of them satisfies the Deutsch-Church-Turing principle yet.

A comparison of three conventional software tools when solving three instances in the NP-hard problem domain, demonstrated that a quantum annealing based system, which carries out quantum adiabatic computation, outperformed conventional software like the CPLEX, METSlib tabu search, and the branch-and-bound solver named Akmaxsat. In one of the tests, the quantum annealing system was 3600 times faster than the CPLEX software17.

Adiabatic quantum computers, such as the developed by D-Wave systems11, have solved successfully NP-hard quadratic unconstrained binary optimisation (QUBO) problems18 on a graph G. The idea is to obtain a minor-embedding of G to map it in the hardware graph U. In particular, the D-Wave system architecture can be seen as an indirect graph U with its vertices and edges weighted. Using the QUBO representation it is possible to solve problems that require more qubits than those provided by the quantum computer, nevertheless, as the size of the problem to be solved increases, the difficulty of representing it can increase exponentially, which is a definite limitation.

Recent research in evolutionary computing has focused on exploiting the benefits of quantum computing19,20. The interaction between quantum computing and evolutionary computation can be divided into three kinds of algorithms21. The first type is evolutionary-designed quantum algorithms (EDQA), where the main idea is to use genetic programming to generate new quantum algorithms; the second type is quantum evolutionary algorithms (QEA), which focus on developing algorithms for quantum computers; and, the third type is quantum-inspired evolutionary algorithms (QIEA), which use concepts of quantum mechanics to develop evolutionary methods for a classical computer22.

This quantum-inspired Acromyrmex evolutionary algorithm (QIAEA) proposal falls within the rapidly growing emergent field of QIEAs that have shown to outperform traditional evolutionary algorithms in some cases23,24,25. Similar than a quantum mechanical system, a QIEA can be considered as a probabilistic system where the probabilities related to each state describe the behaviour of the system. Since Narayanan and Moore introduced the QIEA in 199622 several variants have been proposed, most of them can be found in the surveys21,26. The QIAEA is inspired in the colony evolution of the leaf-cutters and weaver ant species. This idea is different to the ant colony optimisation (ACO) metaheuristics that were first proposed by Marco Dorigo27,28, where the central idea is to use swarm intelligence based on food catering to solve complex optimisation problems.

This paper contributes to the state-of-the-art in quantum-inspired evolutionary algorithms with the QIAEA to solve complex optimisation problems. The QIAEA, based on the statistical results of hundreds of tests performed on benchmark functions, has proven to outperform existing outstanding quantum-inspired evolutionary algorithms.

Methods

Existing ant-inspired algorithms, such as the ACO, use the foraging behaviour of ants to find the optimal solutions for a variety of optimisation problems28. In ACO, scouting ants search the area for food leaving pheromones. At each generation, the routes are updated by a decision made by the ant using a probability density function. The best trails have a higher amount of pheromones, enabling the ants to find the shortest routes between the nest and their food source. Our ant-inspired method model is different from the current ant-inspired proposals and has a higher similarity to genetic algorithms, where the fittest individuals in a population survive and pass their genes to the next generation.

The proposed model, called quantum-inspired Acromyrmex evolutionary algorithm (QIAEA), is inspired in the Acromyrmex ant species, also known as leaf-cutter ants. Another minor inspiration for the model were the Atta, and the Oecophylla smaragdina also known as weaver ant. The life cycle of this species consists of four stages: eggs, larva, pupa, and adult. Typically, these advanced social insects live in nests, and they have well-organized colonies formed by the queen, males, workers, soldiers, and sometimes virgin queens. Queens are the only female ants with reproductive capabilities. Fertilized eggs produce female ants which eventually become queens, workers or soldiers, while unfertilized eggs produce male ants. Each member of the ant population has a set of chromosomes that represent a solution in an optimisation problem. The aptitude of each colony member is evaluated using a fitness function. The fittest individuals of the population are the queen and the males, and their matting produces new offspring (eggs) at every generation that replace the least fit colony members. The queen mates with each male, producing the same quantity of eggs for each matting. If any of the offspring has higher fitness than the existing queen or male, they replace them in the next generation.

In QIAEA, we used ci to denote the chromosome representing a colony member, and \({p}_{i}={c}_{i}\cup {f}_{i}\) to represent a conventional individual containing its fitness value f. A population of individuals \({{\mathscr{P}}}_{\downarrow }\) is defined by Equation (1) and it consists of the set of all the N individuals pi sorted in descending order (the fittest individuals are first). A general function \({\mathscr{F}}\), called the fitness function, assigns the corresponding fitness value f to each element of \({\mathscr{P}}\), described as \({\mathscr{F}}={\bigcup }_{i\in N}{f}_{i}\), and \({\mathscr{F}}:{{\mathscr{P}}}_{\downarrow }\to {{\mathscr{F}}}_{\downarrow }\). The QIAEA can be formally defined by the 5-tuple \(\{{\mathscr{Q}},{\mathscr{V}},{\mathscr{M}},{\mathscr{R}},{\mathscr{F}}\}\), where \({\mathscr{Q}}\) stands for queens, \({\mathscr{V}}\) for virgin queens, \({\mathscr{M}}\) for males, \({\mathscr{R}}\) for the rest of the ant population (workers and soldiers), and \({\mathscr{F}}\) for the fitness of the individuals. The QIAEA is an elitist algorithm, hence Equation (1) defines a population \({{\mathscr{P}}}_{\downarrow }\) consisting in the set of all the N individuals pi sorted in descending order. Equation (2) shows the ranked population accordingly to their function in the colony; the shorthand notation is depicted in Equation (3).

$${{\mathscr{P}}}_{\downarrow }=\{{p}_{i}:i\in N,{p}_{i}\ge {p}_{i+1}\}=\bigcup _{{\scriptstyle \begin{array}{c}i\in N,\\ {p}_{i}\ge {p}_{i+1}\end{array}}}{p}_{i}$$
(1)
$${{\mathscr{P}}}_{\downarrow }={\textstyle \{}\mathop{\bigcup }\limits_{{\scriptstyle \begin{array}{c}h=1,\\ {q}_{h}\ge {q}_{h+1}\end{array}}}^{J}{q}_{h},\mathop{\bigcup }\limits_{{\scriptstyle \begin{array}{c}j=j+1,\\ {v}_{j}\ge {v}_{j+1}\end{array}}}^{K}{v}_{j},\mathop{\bigcup }\limits_{{\scriptstyle \begin{array}{c}k=k+1,\\ {m}_{k}\ge {m}_{k+1}\end{array}}}^{L}{m}_{k},\mathop{\bigcup }\limits_{{\scriptstyle \begin{array}{c}l=l+1,\\ {r}_{l}\ge {r}_{l+1}\end{array}}}^{N}{r}_{l},\mathop{\bigcup }\limits_{{\scriptstyle \begin{array}{c}i=1,\\ {f}_{l}\ge {f}_{l+1}\end{array}}}^{N}{f}_{i}{\textstyle \}}$$
(2)
$${{\mathscr{P}}}_{\downarrow }=\{{{\mathscr{Q}}}_{h}^{j},{{\mathscr{V}}}_{j}^{k},{{\mathscr{M}}}_{k}^{l},{{\mathscr{R}}}_{l}^{N},{{\mathscr{F}}}_{i}^{N}\}$$
(3)

As it was described in Equation (2), the general proposal can have several queens and virgin queens, nevertheless, in our particular implementation the population set is represented by \({{\mathscr{P}}}_{\downarrow }=\{{{\mathscr{Q}}}_{1},{{\mathscr{M}}}_{k=2}^{l},{{\mathscr{R}}}_{l=l+1}^{N},{{\mathscr{F}}}_{i}^{N}\}\) where only one queen exists. The decision of simplifying Equation (2) comes from the necessity of reducing computational hardware requirements since quantum computer emulators grow exponentially based on their number of qubits.

To evolve the population, the QIAEA model uses a quantum representation for every colony member and applies quantum operations over them. Each ant in the population is interpreted by a set of qubits |ψι〉 defined by Equation (4). A set of qubits is called a quantum register, and it can be described as |Ψ〉 = |ψ1〉  |ψ2〉  …  |ψn〉, where the symbol represents the tensorial product in the Hilbert space and n is the number of qubits; therefore, the quantum register |Ψ〉 is a general state vector that lives in the 2n complex dimensional space \({{\mathbb{C}}}^{2}\). In the framework of our model, the qubits are quantum alleles in the quantum chromosome |Ψ〉, and the genes are subsets of |Ψ〉 that serve to codify the decision variables of an optimisation problem.

$$|{\psi }_{\iota }\rangle ={\alpha }_{\iota }|0\rangle +{\beta }_{\iota }|1\rangle \,{\rm{w}}{\rm{i}}{\rm{t}}{\rm{h}}\,{\alpha }_{\iota },\,{\beta }_{\iota }\in {\mathbb{C}},\,|{\alpha }_{\iota }{|}^{2}+|{\beta }_{\iota }{|}^{2}=1$$
(4)

When nature evolves a closed quantum system of qubits, it is impossible to know with precision its state, however, real-world problems need solutions in known states; therefore, it is necessary to observe the quantum chromosomes using a measurement operator. Quantum measurements can be characterised by a set of linear operators \(\{{{\mathscr{O}}}_{\mu }\}\), where 1 ≤ μ ≤ o, and o is the number of possible outcomes. Once the system is measured, the quantum information is destroyed. In general, the probability of obtaining the outcome μ of a qubit in the state |ψ〉 using the measurement operator \({{\mathscr{O}}}_{\mu }\) is given by:

$$Pr(\mu )=\langle \psi |{{\mathscr{O}}}_{\mu }^{\dagger }{{\mathscr{O}}}_{\mu }|\psi \rangle $$
(5)

where the symbol † named the dagger operation represents the combined transpose and conjugate operations of a matrix. If the output is μ then the state collapses to:

$$|\mu \rangle =\frac{{{\mathscr{O}}}_{\mu }|\psi \rangle }{\sqrt{Pr(\mu )}}$$
(6)

For a single qubit, in our case in the computational basis {|0〉, |1〉}, we used the measurement operators \({{\mathscr{O}}}_{0}=|0\rangle \langle 0|\) and \({{\mathscr{O}}}_{1}=|1\rangle \langle 1|\)– i.e., when a qubit is measured, it only ever gives ‘0’ or ‘1’ as the measurement result.

The expression (7) illustrates a quantum chromosome |Ψi〉 and one of its possible values after collapsing to a classical state after measurement. Since this chromosome can simultaneously represent all possible bit strings of length 2n, it is possible to modify standard evolutionary algorithms to work with few or even a single quantum chromosome instead of having a large population of non-quantum chromosomes encoding solutions. The capacity of the chromosome to represent multiple states simultaneously helps to maintain diversity during the search process of the quantum evolutionary algorithm.

$$|{{\rm{\Psi }}}_{i}\rangle ={\textstyle [}\begin{array}{cccc}\begin{array}{c}{\alpha }_{i,1}^{t}\\ {\beta }_{i,1}^{t}\end{array}{\textstyle |} & \begin{array}{c}{\alpha }_{i,2}^{t}\\ {\beta }_{i,2}^{t}\end{array}{\textstyle |} & \begin{array}{c}\cdots \\ \cdots \end{array} & {\textstyle |}\begin{array}{c}{\alpha }_{i,n}^{t}\\ {\beta }_{i,n}^{t}\end{array}\end{array}{\textstyle ]}\,\mathop{\longrightarrow }\limits^{{{\mathscr{O}}}_{\mu }}\,[1|0|\cdots |1]$$
(7)

The pseudocode to implement the QIAEA is described in Algorithm 1, with one queen and three sub-processes. Algorithm 2 shows the first sub-process that performs single qubit measurements (SQM), where \({\mathscr{N}}[{\rm{left}},{\rm{right}}]\) is a uniform random number generator in the range [0, 1]. Algorithm 3 describes the second sub-process which performs a full measurement (FM) of an n-qubit quantum chromosome, this is done by repeating one-qubit measurement n times. Algorithm 4 contains the third sub-process that carries out the crossover operation of the queen considering the male to produce an offspring cnew.

In the proposed QIAEA, see Algorithm 1, the first step (lines 3–8) is to initialize the ant colony \({\mathscr{C}}\) of size N. In the for-loop, a colony-member ci is obtained performing a full-measurement of the quantum register QH previously set in the superposition state through the Hadamard operator H. The algorithms use the symbol \({\mathscr{O}}\) to indicate quantum measurements. Hence, to achieve a single qubit measurement we wrote \({{\mathscr{O}}}_{SQM}\) – i.e., we are observing using the SQM process, and for achieving a full-measurement we used \({{\mathscr{O}}}_{FM}\) to say that we are invoking the process FM to measurement the whole chromosome. In the second step, we proceed to form the five-tuple according to (3). We evaluate and assign their fitness values to all the colony members (lines 9–11), then the whole population is sorted in descending order \({\mathscr{P}}\downarrow \), the subsets \({{\mathscr{Q}}}_{1}\) and \({{\mathscr{M}}}_{k=2}^{l}\) are created. The best individuals are saved into \({{\mathscr{B}}}_{1}^{j}\), where j is the number of individuals to be preserved.

Algorithm 1
figure a

The Quantum Inspired Acromyrmex Evolutionary Algorithm.

The third step is a repeat-until-loop (lines 16–27), where the ant colony is bred to search for the optimal colony member. The general idea is to compare substrings of the queen and a random male, bit by bit. When the corresponding bit of both colony members are equal we conduct a Hadamard quantum operation to the corresponding qubit of Q0, otherwise, we apply the X-gate to the quantum-allele. The start position for the comparisons and the quantum operations is determined by a random number r, and the end point is r + a. The result is a new quantum chromosome Q0, the quantum offspring. This process is repeated until the population replaces all the colony members in \({\mathscr{R}}\). Then, similarly, in the second step, we proceed to evaluate and assign the fitness value to all ci. Finally, the population is sorted in descending order to choose the new \({\mathscr{Q}}\), males \({\mathscr{M}}\) and best members \({\mathscr{B}}\). The stooping-criteria of the repeat-until loop can vary; we used the maximal number of iterations to find the optimal values of benchmark functions.

Algorithm 2
figure b

Single qubit measurement (SQM).

Algorithm 3
figure c

Full measurement of a quantum chromosome (FM).

Results

The proposed QIAEA was compared with a classic genetic algorithm (GA), the ACO implementations for continuous domains28, the particle swarm optimisation (PSO) algorithm, the quantum GA (QGA) using a combination of the rotations strategies proposed by Nicolau et al.29 and by Wang et al.30, and the improved QGA developed by Wang et al.30 tagged as AQGA. The general programming implementation characteristics of the GA, ACO, PSO, QGA, and AQGA are described in the next paragraphs.

The GA is an elitist algorithm; at each generation, the best individuals are chosen for the next generation. New individuals are generated with the best individuals using tournament selection and the two-point crossover method. The rest of the population are randomly generated, and a mutation operator is used to enhance diversity. The ACO is an ant population-based metaheuristics where the ants search for the best paths for finding food, which is interpreted as finding the best solutions to a given optimisation problem. For testing, we used the ACO for continuous domains proposed by Socha28. The PSO is inspired by the social behaviour of bird flocks and is different from the GA since the solution-space is explored based on individual and neighbourhood-based best-known particle positions. The particular implementation of the PSO for this work is the SPSO-2011 developed by Zambrano-Bigiarini and Clerc31.

In the QGA and the AQGA each individual is coded using two quantum registers, one register for each decision variable. To implement these two algorithms is necessary to clone the main population before taking measurements to preserve the amplitudes and probabilities before collapsing the registers to specific values. At each generation, the best solution is kept and is used to obtain the new population by evolving it according to the rotation strategy proposed in30. Thus, these algorithms use the quantum rotation gate as the main operator to evolve the population. The rotation angle, θt is 0.05π for the QGA, whereas the AQGA auto-adjust30 the rotation angle θt using θt = θmax − (θmax − θmin)*t/tmax. In AQGA, the value of θt {θmin, θmax} depends on the current generation t {1, tmax}, initializing in θmax and decreasing over time to θmin. The quantum alleles are updated using the quantum rotation gate, see Equation (8).

Algorithm 4
figure d

Crossover algorithm.

$${\textstyle [}\begin{array}{c}{{\alpha }^{{\rm{^{\prime} }}}}_{i}\\ {{\beta }^{{\rm{^{\prime} }}}}_{i}\end{array}{\textstyle ]}={\textstyle [}\begin{array}{cc}\cos ({\rm{\Delta }}{\theta }_{t}) & -\sin ({\rm{\Delta }}{\theta }_{t})\\ \sin ({\rm{\Delta }}{\theta }_{t}) & \cos ({\rm{\Delta }}{\theta }_{t})\end{array}{\textstyle ]}{\textstyle [}\begin{array}{c}{\alpha }_{i}\\ {\beta }_{i}\end{array}{\textstyle ]}$$
(8)

Additionally, the AQGA includes mutation and disaster operations. The general idea of the mutation operator is to slightly deviate the selected individual from the current evolutionary direction to avoid local minima32, which is done by swapping the value αi and βi. If after several generations, the population is stuck, then a disaster condition occurs. The disaster operation applies a disturbance to the population by generating new individuals to substitute randomly selected members of the population (excluding the best individual). Particularly, in this implementation, we performed the disaster operation after five generations without improvements in the best solution.

Experimental setup

Quantum-inspired algorithms require a massive amount of computational resources that are very expensive regarding computational time. For these reasons, we took advantage of the quantum computing mathematical properties to parallelize all the quantum-based methods using CUDA/C++ and a Graphical Processing unit (GPU), particularly the GeForce GTX 1080 Ti GPU.

To test the performance of the optimisation methods, we designed three experiments based on 15 benchmark optimisation functions. The description of each function, the global minimum, and the range for the variables are described in Table 1. All of these functions are two-dimensional minimization problems. Functions 1, 5, and 7 are unimodal, and the rest are multimodal functions.

Table 1 Benchmark functions.

The common characteristics for all the experiments are as follows. For the ACO, the ξ parameter was set to 1 and the diversification factor to 0.5. The parameter settings for PSO were those specified in31. For the GA, QGA, AQGA, and QIAEA each individual was coded using two variables with a resolution of 16 bits for the GA, and 16 qubits for the QIEAs. All the algorithms were executed 40 times for computing statics to compare the methods.

Experiment 1

This experiment has two objectives: the first one is to statistically evaluate the performance of the different GA based methods (GA, QGA, AQGA and QIAEA), and the second is to calculate the accuracy of each optimisation algorithm using every function in Table 1. For this experiment, the population size was set to 40 and the number of iterations was fixed to 50. To compare the performance of the proposed method, the mean and the standard deviation of the optimal values in every run, and for each function, were calculated. The results are presented in Table 2 and the best results are indicated in bold with the standard deviation serving as the deciding factor for those cases with the same mean value. Overall, the proposed QIAEA had the best performance in terms of precision and accuracy, with the smallest mean in 10 functions and the lowest standard deviation in 8 functions. The second best algorithm was the classic GA, followed by the AQGA, with the worst being the QGA.

Table 2 Mean and standard deviation. Best results in bold.

The second objective is to compare the above mentioned algorithms against the ACO and PSO. To achieve this objective, we used an accuracy factor, in which we considered the percentage of hits reached by the algorithm. We defined a hit as a solution within a range of 10−3 from the true global minimum. The results of the hit accuracy are shown in Table 3. The QIAEA obtained the best results, with an average accuracy of 76.6% over all the functions and the best performance in 11 functions. Out of those, it achieved an accuracy higher than 90% in 8 occasions, reaching 100% in 5 of them. The second best algorithm was the ACO with 54.33% on average, and the worst algorithm was the PSO with an average of 31.88%.

Table 3 Hit accuracy. Population size 40, 50 generations, 40 runs. Best results in bold.

Experiment 2

For this experiment, we chose all the functions from Table 1 that reached an accuracy lower than 60% in the QIAEA (functions 4, 7, 8, 9, and 13). The population and the number of generations were incremented on the QIAEA until it reached a hit accuracy near 100%. The new values of population size and generations were also used in QGA and AQGA to compare their new performance. As illustrated in Table 4, the highest hit accuracy was obtained by the QIAEA, followed by the AQGA. The accuracy of QIAEA for the most challenging functions was almost 100%, except for function 13 (Trigonometric function), in which the accuracy was 70%. The AQGA was superior only in function 8 with an accuracy of 100%, where the QIAEA obtained 92.5%. For function 13, both QIAEA and AQGA reached 100%, however, the QIAEA had a smaller standard deviation.

Table 4 Most difficult functions of the set. Best results in bold.

Experiment 3

The aim of this experiment is to analyse the time complexity of our proposal and compare it against the other QIEA. To achieve a fair comparison, we calculated the average time of execution of the 15 benchmark functions for each algorithm. As Table 2 indicates, the QIAEA was faster than any other QIEA implemented, with an average of 4.37 s, being six times faster than the QGA and AQGA, both with an approximate average of 26.7 s. The QGA is slightly faster than the AQGA because the latter implements the mutation and disaster operators.

Additionally, we evaluated the speed of convergence of each QIEA. To do this, we took every run in which a hit was obtained, and we calculated the number of generations that took that specific run to get a hit. This was done for every function and for each QIEA. Figure 1 shows the distribution in box plots of the convergence rate for each of the quantum-inspired methodologies. The QIAEA has a lower median than the other QIEAs, requiring 11 generations, compared with the 18 generations of the AQGA and 24 generations of the QGA. Although the interquartile space is higher for the QIAEA, Q1 and Q3 are lower for the QIAEA than for the other two methods.

Figure 1
figure 1

Boxplots of the number of generations to achieve the optimal value for the QIEA.

Figure 2 illustrates an example of the convergence speed for function 1 of Table 1 using all the evolutionary algorithms. In this figure, the QIAEA reached the objective value goal of 10−3 in 8 iterations whereas the AQGA and the ACO needed 10 iterations, and the QGA, GA and the PSO needed 20, 25 and 37 iterations, respectively.

Figure 2
figure 2

Minimum convergence rate.

Discussion

Classical and quantum computation are intrinsically different. In classical computation, the information is stored in bits, if storing a number needs a 64-bit register, then storing all the possible numbers that this register can hold will require 264 ≈ 1.85 × 1019 number of bits. On the other hand, quantum computing stores information using qubits, every time that we add a qubit the capacity to store information is doubled. Therefore, one quantum register of 64 qubits can store the same information that approximately 1.85 × 1019 classical bits. This means that to simulate a quantum computer, the amount of memory required by a classical computer to store n qubits is 2n bits. The aforementioned is an essential issue when working with quantum evolutionary algorithms making the simulation of quantum systems by classical computers viable yet inefficient. Nevertheless, the interest in quantum computing has incremented and it will be in its plateau of productivity in the next ten years33, opening the door to the development of new and more efficient quantum evolutionary algorithms.

In this paper, we compared our nature-inspired QIAEA proposal with two quantum evolutionary algorithms, the QGA and the AQGA, and three classical evolutionary algorithms, the GA, the PSO, and the ACO. We implemented three experiments to measure the accuracy and the time complexity of each method. The experiments were performed in 15 well-known benchmark functions broadly used in similar works. We found that in all the proposed experiments, the QIAEA outperformed all the other algorithms in terms of accuracy, precision, and iterations needed to find the optimal value.

The results displayed in Tables 2 and 3, indicate that the QIAEA has higher average accuracy and lower standard deviation than any of algorithm used for the comparison, making the QIAEA a more accurate and precise algorithm for solving the type of problems used in the test.

Table 2 shows that the QIAEA outperforms the execution time of the other QIEAs, approximately 611% faster. This speedup lies in the algorithmic structure of the QIAEA, since it only uses one quantum register for any population size, whereas the other quantum genetic algorithms use one quantum register for each individual. Therefore, in the experiments of this paper, the QIAEA used one quantum register while the other quantum algorithms used 40 quantum registers. On top of that, the QIAEA needed a lower amount of iterations to find the optimal value than any other algorithm, see Fig. 2. We considered these two results very important since they show that the QIAEA is more viable to be used in real-world applications than the other QIEAs.

Future work includes the test of the algorithm with multiple objective optimisation problems and combinatorial optimisation, the implementation on engineering and other applied problems, and to test the algorithm on a quantum computer such as IBM12.