References
I Introduction
Current quantum hardware belongs to the class of Noisy Intermediatescale Quantum (NISQ) computers [Preskill2018]. These devices are primarily limited by 2qubitgate fidelity and qubitcoherence times. Consequently, many quantum algorithms necessitating deep circuits with many 2qubit operations are not feasible for execution on the hardware of the foreseeable future. Motivated by finding commercial applications for NISQ hardware, hybrid quantum/classical algorithms, which potentially offer solutions to classically intractable problems, are being widely explored. Such quantum algorithms could have significant commercial applications in numerous fields, including quantum chemistry, logistics, healthcare and finance [Peruzzo2014, Farhi2014, Mohseni2017, Dash2019]. Moreover, by creating economic demand for extant quantum devices, such algorithms could enable sustained corporate investment in quantumcomputing technology, creating a virtuous cycle resulting in rapid progress mirroring that of the semiconductor industry [National2019VirtuousCycle].
In 2004, Peruzzo et al. proposed a quantum/classical hybrid algorithm called the Variational Quantum Eigensolver (VQE), which, compared to previous quantum algorithms, substantially reduced circuit depth at the cost of increasing the required number of circuit executions [Peruzzo2014]. Through application of the variational method of quantum mechanics, the algorithm bounds the groundstate energy, , of a system described by a Hamiltonian . The variational principle states that the expectation value of over an arbitrary normalized wave function cannot be lower than the system’s groundstate energy, or, more formally:
VQE uses a fixed circuit containing parameterized gates, whose parameters are represented with , to generate an ansatz , over which the expectation value of is taken. Through iterative classical optimization of the parameters, the algorithm bounds as follows:
with the hope that the resulting expectation value closely approximates the groundstate energy of the Hamiltonian. Moreover, the applicability of VQE can be generalized through the creation of an Ising Hamiltonian to represent a wide range of optimization problems.
Unfortunately, the accuracy of solutions generated by VQE are limited by its use of fixed variational forms. The number of degrees of freedom in a quantum system is exponential in the number of qubits. Thus, to generate a mapping to any state in the Hilbert space, a fixed parameterized circuit must have a number of parameters that is exponential to the number of qubits. However, to allow tractable classical optimization, the number of parameters in variational forms are kept polynomial in the number of qubits. Therefore, VQE can only generate transformations to an exponentially small subspace of an
qubit Hilbert space.To circumvent this limitation, VQE is often used in tandem with specially crafted domainspecific variational forms, utilizing prior knowledge about the target Hamiltonian’s possible ground states. This is, for example, the case of the Unitary Coupled Cluster for Single and Double excitations (UCCSD) variational form, commonly used in quantumchemistry computations [Barkoutsos2018]. The creation of such variational forms is challenging, and often does not produce optimal circuits for the task in terms of accuracy, depth, and number of 2qubit gates. Furthermore, these circuits are often crafted independently of the hardware on which they are to be executed. Together, these limitations severely hinder the practicality of VQE as a generalpurpose, quantumenabled, optimization system in the NISQ era.
In this paper, we propose the Evolutionary Variational Quantum Eigensolver (EVQE) algorithm, which addresses the same problems as VQE while compensating for some of its wellknown drawbacks. We do so by utilizing evolutionary programming techniques to adaptively and concurrently search the space of circuit forms and their parameterizations. This enables EVQE to develop efficient structures automatically customized to the given problem instance. In summary, EVQE has the following novel characteristics:

EVQE operates in a domainagnostic fashion, making it equally applicable to problems in diverse fields, such as chemistry, optimization, finance and artificial intelligence, thereby alleviating the need for domainspecific variational forms, whose construction requires specialized knowledge.

The circuits automatically generated by EVQE are significantly shallower, and use substantially fewer 2qubit gates, while achieving comparable if not better results than those produced by alternative domainspecific algorithms.

EVQE is quantumhardware adaptive; it automatically favors the construction of circuits that are more resilient to the noise characteristics and connectivity constraints of the specific quantum computer on which the algorithm is executed.
More specifically, EVQE ranges from having to shallower circuits, using to
fewer CX gates, than the VQE/UCCSD configuration when estimating the groundstate energy of LiH. In the estimation of the groundstate energy of BeH
, EVQE obtains shallower circuits, using fewer CX gates than VQE/UCCSD. In the maximumcut and vehiclerouting problems, EVQE obtains efficient and optimal results more consistently than VQE. In the noisy simulation of LiH, EVQE obtains results with at least less error than the best VQE results. Finally, EVQE is successfully demonstrated on a real 5qubit IBMQ quantum processor.Ii Background
VQE employs the variational method of quantum mechanics to bound the groundstate energy of a Hamiltonian. As already discussed, VQE is limited by its selection of a variational form—a parameterized trial function—in that an efficiently parameterized fixed variational form is unable to produce a mapping to the ground state of an arbitrary Hamiltonian.
Consequently, a method to vary the form of a variational circuit is required to capture every possible mapping with an efficient number of parameters. This reduces the problem of finding the ground state of an arbitrary Hamiltonian to selecting an efficient set of 1 and 2qubit parameterized gates that map to that ground state. Assuming that an optimal parameterization of such a circuit could be obtained, the ground state energy of an arbitrary Ising Hamiltonian could be found, and so either this problem is NPHard or it is not possible to efficiently optimize a fixed variational circuit. Thus, heuristic methods may be required in practice. For example, the algorithm ADAPTVQE utilizes knowledge from coupledcluster theory to adaptively construct and optimize variational circuits for molecular simulations [Grimsley2019]. However, ADAPTVQE has several limitations—such as a likely sensitivity to noise—which may hinder its applicability on NISQ devices. In 2019, Ostaszewski et al. presented two greedy variational algorithms, one of which adaptively grows the variational circuits it uses [Ostaszewski2019]. However, that algorithm only adaptively adds singlequbit gates, leaving the 2qubit gates fixed, and thus has similar limitations as VQE.
A variational algorithm that efficiently grows and optimizes its parameterized forms would also have applications in machine learning. For example, there is a natural similarity between the approximation of functions in classical machine learning—such as with neural networks or kernel methods—and the variational minimization of quantum circuits. Consequently, various hybrid quantum/classical machinelearning algorithms have been proposed that utilize fixed variational forms to implement their functionapproximation systems
[Mitarai2018, Schuld2018, Havlivcek2019, Havlivcek2019]. The classical counterparts to each of these algorithms have fixed parameter sets, and so a correspondence to the parameters in a fixed variational circuit is natural. By contrast, in 2002, Stanley and Miikkulainen proposed an algorithm titled NeuroEvolution of Augmenting Topologies (NEAT), which employs a genetic algorithm to concurrently grow and optimize neural networks
[Stanley2002]. As the form of its neural networks vary, its parameterizations change, and so it is not analogous to utilizing a fixed variational form. Nevertheless, some of the techniques described by Stanley and Miikkulainen transition to the quantum setting, and mirror some of those used by EVQE.While various genetic algorithms have been proposed to evolve a quantum circuit corresponding to a target matrix, to the best of our knowledge, none are directly applicable to variational minimization and none explicitly focus on concurrently evolving and optimizing parameterized circuits [Williams1998, Rubinstein2001, Lukac2003, Ding2008, Wang2014]. Moreover, these algorithms primarily use the crossover genetic operator to explore their respective search spaces, categorizing them as sexual genetic algorithms. Crossover fuses the genomes of two parents to produce an offspring, for example, by concatenating a portion of each parent’s corresponding quantum circuit. However, because of entanglement between qubits and the superposition of quantum states, merging the circuits of two parent genomes to produce an offspring does not necessarily produce a circuit whose mapping is similar to that of either parent, even if the parents are closely related. Thus, although the resulting circuit form may be preferable, its parameters would still need to be reoptimized, wasting the optimization iterations performed on all of its ancestors. Furthermore, these algorithms primarily grow circuits using nonparameterized gates. Therefore, when nonidentity gates are added to an existing circuit, because of superposition and entanglement, the energy evaluation of the overall circuit changes nonsmoothly. This substantially increases the challenge of minimizing the expectation value of a Hamiltonian. In contrast, EVQE explores its solution space utilizing evolutionary programming techniques, meaning that each member of the population has only one parent, and offspring are differentiated primarily through random mutations. This enables EVQE to circumvent the issues associated with fusing two disparate circuits, and more significantly, to smoothly and efficiently explore the Hilbert space, as explained in the next section. Moreover, combined with some of EVQE’s other characteristics, this identityinitialized growth mechanism likely enables EVQE to circumvent a significant problem associated with variational quantum algorithms that utilize random circuits.
First identified by Peruzzo et al. in 2018, the barrenplateau problem
states that random quantum circuits with sufficient depths experience an exponentially small probability of having nonzero parameter gradient readings, in terms of the number of qubits
[Mcclean2018]. Thus, there is no clear way to optimize the parameters in such variational circuits, which prevents them from efficiently scaling. However, EVQE has a number of mechanisms that help it avoid the barrenplateau problem. First, its circuits are initialized with a single random layer. As mentioned by Peruzzo, the barrenplateau problem only appears in random circuits with much greater depths. However, should this still be not desirable, it would be easy to specify EVQE’s starting population of circuits such that the starting population is outside of a barren region. Either way, subsequent circuit growth occurs with identityinitialized parameters, which allows EVQE to avoid entering regions in which the gradient is imperceptible. This is similar to the strategy proposed by Grant et al. in 2019, which also addresses this problem [Grant2019].Iii Evolutionary Variational Quantum Eigensolver (EVQE)
EVQE is a speciated, asexual, evolutionary algorithm for generalpurpose multimodal optimization. By mirroring the processes of natural selection, the algorithm effectively explores a search space of quantumcircuit forms and parameterizations. This section provides a brief overview of EVQE, and summarizes the characteristics that enable its novel properties.
Iiia Genetic Representation of Quantum Circuits
At a high level, the algorithm maintains a population of genomes that represent quantum circuits. A genome is a list of genes, where each gene fully describes a layer of a quantum circuit. A gene is represented by , where is a unique identifier of that gene. A gene instance, , describes an instance of found in a genome, . For example, a genome with genes may be represented as . This is illustrated in Figure 1.
A gene, , characterizes a layer of a quantum circuit, such that each qubit in that layer is assigned a gate from the following set:
Here, is the identity gate, U3 is a universal singlequbit gate with 3 parameters, and represents a controlledU3 gate, often indicated as CU3 as well [Barenco1995]. Furthermore, a gene instance contains all of the parameters required for any parameterized gates it describes.
IiiB Asexual Reproduction and Speciation Through Genetic Ancestry
Since EVQE uses an asexual reproduction scheme, its primary method of exploring the solution space is mutation, in contrast to typical sexual genetic algorithms where crossover is the preferred exploration operation, as mentioned in the background section. The asexual reproduction scheme enables EVQE to optimize clearlydefined gradients, efficiently identify niches for speciation, and circumvent the permutation problem. Asexual reproduction also contributes to the algorithm’s noise resistance.
As shown by Goldberg in 1989, and demonstrated in the domain of neural networks by Angeline, et al. in 1994, crossover is most effective in genetic algorithms when the performance of a genome is related to that of its constituent components [Angeline1994, Goldberg1989]. However, because of the entanglement and superposition of qubits, the cost evaluation of a subset of a quantum circuit is not clearly related to the cost evaluation of the overall circuit. We are going to elaborate on this next.
Unlike previous work using genetic algorithms to grow quantum circuits (given a known target matrix), when EVQE adds a gate to a quantum circuit, that gate’s parameters are initialized such that the gate performs the identity transformation [Williams1998, Rubinstein2001, Lukac2003, Ding2008, Wang2014]. Thus, when a new gate is added to a circuit, that circuit’s expectation value is unchanged. The parameters of new gates are altered through optimization, so the addition can only reduce the circuit’s expectation value. In contrast, a system using crossover between two genomes would be unable to preserve the expectation value of either circuit, hindering the algorithm’s ability to consistently improve, and thus converge, and would require all of the parameters in the new circuit to be reoptimized, thereby wasting all previous optimization progress.
Moreover, asexual reproduction enables an effective speciation scheme. Speciation, also known as niching, enables genetic algorithms to maintain a diverse set of candidate solutions in the population. This greatly improves the ability of those algorithms to optimize multimodal functions as the species in the population concentrate in various optima throughout the search space [Mahfoud1995].
Speciation requires a metric to determine the genetic distance, or similarity, of any two genomes, thereby enabling similar genomes to be grouped into the same species. Genetic distance should be defined such that any genes competing in the same niche are in the same species. EVQE takes inspiration from the historical innovation system proposed by Stanley and Miikkulainen in 2002, where each new gene is assigned a globally unique identifier [Stanley2002]. Whereas Stanley and Miikkulainen essentially calculate the genetic distance between two genomes as the ratio between matching and nonmatching genes, EVQE uses a calculation enabled by its asexual reproduction system. In EVQE, every genome has exactly one parent. Consequently, using only the genomes in the population, an abstract genetic tree may be constructed that represents each genome’s genetic ancestry. For example, the tree shown in Figure 2 represents a population with 3 genomes, , , and .
Thus, we define the genetic distance between and to be the total number of genes in both genomes, subtracted by the number of genes shared in common. This gives the number of genes to their most recent common ancestor, and may be calculated as follows:
Here, gives the number of nonnull genes in and gives the gene in , while evaluates to if the gene in both genomes are the same, or otherwise.
Moreover, as detailed later, the parents for the genomes in each new generation are selected (with replacement) from the existing population, with probabilities proportional to their fitness. In expectation, asexual reproduction ensures that fit genomes in any generation have multiple offspring in the subsequent generation. As all of the immediate offspring of a genome are usually similar to each other (and produce similar energy evaluations), for noise to extinguish a promising genetic line, it must nontrivially harm the fitness evaluations of all of the genomes in that line simultaneously. That is, noise must wipe out all of the members of a genetic line concurrently or the speciation mechanism will repopulate that genetic line in subsequent generations. Assuming a simple stochastic additive noise model, the probability of this happening is exponentially small in terms of the number of members in the genetic line.
IiiC Fitness Evaluation
The fitness of genome is a measure of how well optimizes the objective function. We define to include both the energy evaluation of ’s corresponding circuit, , and two penalty terms. The depth of ’s circuit is simply the number of genes it contains (since each gene corresponds to a single circuit layer) and is therefore given by . Furthermore, allow to represent the number of gates in the circuit . Then, the fitness of is defined as follows:
where and are nonnegative, userspecified parameters. The coefficients and should be set to small values such that the magnitude of corresponds to the desired precision of a solution. The net effect of the penalty terms is to encourage the population to develop the shallowest circuits with the fewest gates (and, transitively, CX gates) possible, which still optimizes the expectation value to the desired level of precision. The fitness penalties have two primary benefits: encouraging the exploration of resourceefficient circuits, and mitigating the effects of noise in circuit evaluation. It is clear how the penalties enable the first benefit. Noise resistance is enabled by the penalties working similarly to regularization in machinelearning algorithms that learn from data. By adding some additional penalty, those algorithms have reduced abilities to overfit noise in their training data, leading to better generalization. Similarly, by penalizing circuit depth and CX count, EVQE implicitly penalizes circuits that are more susceptible to the noise characteristics of NISQ hardware. Thus, EVQE reduces the likelihood of its genomes tending towards circuits that experience increased noise and potentially yield deceptively low energy evaluations. However, by setting and to small values, EVQE also does not prevent circuits from being developed that naturally lower the calculated expectation value.
EVQE utilizes explicit fitness sharing, popularized by Goldberg and Richardson in 1987, where each genome in the population shares its fitness with the other genomes in its species [Goldberg1987]. Thus, no species dominates the population, and multiple species are concurrently maintained that explore various optima in the search space. The specific mechanism used by EVQE was described by Spears in 1995 and is compatible with our formulation of genetic distance [Spears1995]. For each genome, , the fitness score is modified to yield an adjusted fitness score defined as follows:
where is the size of the species of which is a member.
IiiD Mutation Operators
The mutation operators used by EVQE are topological search, parameter search, and removal.
The topologicalsearch operator creates a new gene, corresponding to a random assignment of gates from to each qubit in a circuit layer subject to the pruning optimizations detailed in the Appendix, subsequently appending a corresponding gene instance to the target genome. For a genome , the formal definition of the topologicalsearch operator is as follows:
When each gene instance is first added to a genome, its parameters are all initialized to 0 such that the action of any U3 and gates are that of the identity gate. As shown in the Appendix, this optimization yields significant reductions in the number of generations required for the algorithm to converge to a solution with fixed precision.
The parametersearch operator optimizes each layer of the genome’s circuit, one at a time, according to a randomlyselected ordering. Whereas the topologicalsearch operator explores the space of circuit forms, the parametersearch operator explores the space of parameterizations for a fixed circuit form. The parametersearch operator is formally defined as follows:
where optimizes each in a random order. Throughout this paper, we refer to an iteration optimization count; this refers to the maximum number of iterations the optimization subroutine may perform each time it is called on a circuit layer.
The removal operator eliminates a random number of contiguous gene instances, starting from the last gene instance in the genome. Formally, it performs the following mutation, which allows EVQE to repopulate shallower search spaces:
where is selected uniformly at random.
IiiE Algorithm Summary
The following is a basic outline of EVQE:

Create a population of genomes, and apply to each genome once.

Randomly select one genome, , from each species and add it to the species representative set, . Note that the cardinality of corresponds to the number of species active in the population.

Run the optimization subroutine on the last gene of each , .

Calculate (a) the fitness for each and (b) the speciesadjusted fitness .

Randomly select parent genomes from the population (with replacement) according to probabilities proportional to their adjusted fitness.

Mutate each parent genome, by applying each mutation operator with some probability, to create the next generation.

Assign each to a specie. Specifically, this is done by mapping to the first specie for which is less than a predefined genetic distance threshold, for each . If no such exists, add to , thereby defining a new specie.

If generations have passed, where is a given budget, return the expectation value associated with the fittest genome encountered so far. Otherwise, return to Step 2.
Iv Experimental Evaluation
All circuit depths and CX counts reported herein are obtained after optimizing each circuit with the Qiskit Terra transpiler, configured to optimization level 3. All VQE circuits have barriers removed. Moreover, in figures where error bars are shown, the error bars represent one standard deviation from the mean.
Chemistry Application: Statevector Implementation for 6qubit LiH.
EVQE is compared against VQE/UCCSD in the estimation of the groundstate energy of LiH at various interatomic distances. EVQE is configured with a population size of 150, an optimization count of 200, an of , a of , and the Constrained Optimization BY Linear Approximation (COBYLA) optimizer. VQE/UCCSD demonstrates the best performance when using the SLSQP optimizer. It is allowed to perform an unbounded number of optimization iterations, terminating only upon convergence. The depth setting used for VQE/UCCSD is the minimum possible. On the average of 5 trials, all algorithms obtain chemical accuracy at all interatomic distances.Iva Statevector Simulation
The purpose of the experiments conducted on the statevector simulator is to compare the performance and convergence properties of EVQE and VQE under theoreticallyoptimal conditions. Statevector simulation performs the matrix multiplication corresponding to a given quantum circuit, yielding the resulting quantumstatevector. The expectation value of the matrix representing the target Hamiltonian is then taken with respect to the output statevector. Therefore, statevector simulation is equivalent to noiseless simulation with infinite shots.
The experiments conducted for this study fall into two categories: molecular simulation and general optimization.
In the two molecular simulations presented, the task is to find the groundstate energy of the given molecules, LiH and BeH, respectively. For each molecule, the corresponding Hamiltonian is obtained as follows. First, the one and twobody integrals in molecularorbital basis are computed using the PySCF classical computationalchemistry software package, configured to use the STO3G basis. Next, these integrals are used to construct a qubit operator. The qubit mapping chosen for this procedure is JordanWigner. Following the process outlined by Setia et al. in 2019, the number of qubits is tapered proportionally to the spatial symmetries present in the molecule under study [Setia2019]. Such qubittapering procedure is precisionpreserving; it reduces the required qubits to simulate BeH from 14 to 7, and LiH from 12 to 6, without performing any approximation. More details can be found in Appendix IXD. Figure 3 compares the performance of EVQE and VQE/UCCSD at various interatomic distances. Figure 4 compares the performance of EVQE and VQE/UCCSD at one specific interatomic distance. While beyond the scope of the comparison to VQE/UCCSD, for the sake of completeness, the appendix explores the performance of the VQE heuristic variational forms RyRz and Ry in the estimation of the groundstate energies of LiH and BeH.
Noise Setting  Depth  CX Count  Error 
0  5.120.85  2.020.30  0.003570.00754 
1  2.361.91  0.660.96  0.056170.04143 
2  2.281.92  0.600.98  0.058870.04897 
3  1.901.61  0.521.09  0.060130.04796 
4  2.101.67  0.550.85  0.060670.05332 
Optimal Separable State Average Error:  0.06681  
Ranges reported represent one standard deviation from the mean. 
In the two optimization problems presented, the task is to find the optimal solution of a small, randomly generated, NPHard problem instance. In these applications, the problems are encoded as Ising Hamiltonians using procedures similar to those outlined by Lucas in 2014 [Lucas2014].
IvB Hardware Simulation
The purpose of the hardwaresimulation experiments is to understand the noiseresistance characteristics of EVQE, and to compare EVQE and VQE under realistic noisy conditions. As these experiments are designed to understand the algorithms’ intrinsic noiseresistance properties, we do not use error mitigation techniques, such as those presented by Temme et al. in 2017 and Kandala et al. in 2019 [Temme2017, Kandala2019]. All experiments are conducted using the Qiskit Aer QASM Simulator, configured with the noise profile and qubit connectivity of two IBMQ devices: 20qubit Tokyo and 5qubit Vigo.
The purpose of the experiments shown in Table I is to understand how the behavior of EVQE changes when various levels of noise are present. The noise characteristics are varied by scaling the hardware’s T1 and T2 times, representing the longitudinalcoherence and transversecoherence times, respectively, in simulation. As the coherence times increase, the effective noise decreases. The experiments are conducted on 10 randomly generated 2qubit Hamiltonians, which are created using the random_hermitian method in Qiskit Aqua [Qiskit]. These experiments are conducted on 2 qubits as a matter of practicality as noisy simulation is computationally expensive. The noise profile and qubit connectivity correspond to the IBMQ Tokyo device. The characteristics of this device, such as the singlequbit and CXgate fidelity, are discussed by Cross et al. in 2019 [Cross2019]. As IBMQ Tokyo has 20 qubits, and the experiments only require 2 qubits, the algorithm is pinned to the 2 connected qubits with the lowest CXgate error. The noise characteristics of this quantum computer require the use of a noiseresistant optimization subroutine, so the Simultaneous Perturbation Stochastic Approximation (SPSA) optimizer is used for these experiments.
The purpose of the experiment shown in Figure 7 is to demonstrate EVQE’s noise resistance relative to VQE in a practical application: the estimation of the groundstate energy of LiH. To allow the use of Vigo—one of IBM’s latest 5qubit quantum devices, with substantially improved singlequbit and CXgate fidelity—the simulation of LiH is configured by removing unoccupied spin orbitals, thereby reducing the number of required qubits from the 6 used in statevector simulation down to just 4. Excluding unoccupied spin orbitals from the computation of the groundstate energy of LiH leads to negligible imprecision, which does not prevent chemical accuracy from being attained. In fact, this procedure has been used in various experiments [Kandala2017, Kandala2019]. Furthermore, by running on IBMQ Vigo, EVQE is able to use the noisesensitive optimizer COBYLA as its optimization subroutine. The device’s noise profile also enables the use of COBYLA with VQE. However, in this experiment, VQE demonstrates the best performance when using SPSA. Finally, the configurations for EVQE and VQE are such that the total number of circuit executions performed by both algorithms are comparable. By controlling the total number of circuit evaluations, each algorithm’s obtained error is a function of its noise resistance rather than the performance of the optimizer. This is in contrast to the statevector simulations, where ideal parallelism is assumed, and thus EVQE is configured so that the total number of sequential circuit evaluations is comparable to the total number of circuit evaluations performed by VQE. Additionally, the decoherence constraints of hardware simulation prevent VQE/UCCSD from obtaining good results. Specifically, in this experiment, VQE/UCCSD obtains an error of Hartree. Thus, for the purpose of examining the impacts of noise, EVQE is compared against VQE using the best heuristic variational form found.
IvC Execution on Quantum Hardware
The purpose of this experiment is to demonstrate the efficacy of EVQE when executed on real quantum hardware. We observe that for variational optimization to succeed, contiguous and relatively uninterrupted access to quantum hardware is likely necessary, as the natural drift in qubit calibration over time can change the mapping performed by a given circuit parameterization. Consequently, the experiment presented here—a random instance of MaxCut with 5 vertices—is performed after having obtained exclusive access on 5qubit IBMQ Vigo.
For this experiment, EVQE is configured with a population size of 8, an optimization iteration limit of 50, a generation cap of 2, an of , a of , and the COBYLA optimizer. Such a conservative configuration is necessary to enable the algorithm to run during hardware exclusive allocation time. VQE is configured with the layouts RyRz/linear and Ry/linear as they demonstrate the best results in noisy simulation. Both VQE configurations use the COBYLA optimizer, set with a maximum of 500 optimization iterations. VQE is tested with depth settings ranging from 0 to 2. Both EVQE and VQE are executed with 1300 shots.
V Discussion
When comparing the performance of variational algorithms, four important metrics are the following: error, circuit depth, CXgate count, and total number of circuit evaluations. These metrics vary in significance depending on the type of experiment being conducted.
In statevector simulation, circuit depth and CX counts are important indicators of performance on actual hardware. CX gates typically have errors that are one order of magnitude larger than singlequbit gates. Therefore, their quantity is representative of the cumulative gatefidelity error that will be incurred. This metric has been used as a gauge for circuit cost in various papers [Hu2019, Nam2019]. Additionally, the depth of a circuit is related to the required execution time. Thus, it is an indirect measure of the decoherence error that would be incurred when the algorithm is executed on real quantum hardware. In realhardware execution, as well as in hardware simulation, the impacts of CXgate count and circuit depth are implicitly taken into account in the execution of a circuit. As a circuit’s depth and CXgate count increase, gatefidelity and decoherance errors accumulate. Consequently, circuit executions yield results with less fidelity, increasing the error of the solution. Therefore, in noisy execution or simulation, total error is the primary metric of interest. In both statevector simulation and realhardware execution, the total number of circuit evaluations is an important consideration. However, as discussed in Section IV, the total number of circuit evaluations is not directly comparable between EVQE and VQE.
Va Statevector Simulation
It is worth emphasizing that for the results shown in Figures 3, 4, 5 and 6, when nearideal parallelism is assumed, EVQE’s gradual circuit growth and parameter optimization result in the number of sequential circuit evaluations (circuit evaluations that cannot be performed in parallel) being comparable to the total number of circuit evaluations performed by VQE when using variational forms that obtain similar levels of error. Practically, this means that when both algorithms are executed on a 64core processor, EVQE generally has similar, if not faster, running times than VQE in the aforementioned experiments.
The chemistry statevector simulations demonstrate significant resource reductions for EVQE compared to VQE/UCCSD. Figure 3 shows the circuit depths and CX counts required for EVQE and VQE/UCCSD to obtain chemical accuracy in the estimation of the groundstate energy of LiH at 10 different interatomic distances. The same configuration is used for each algorithm at all interatomic distances. On average, EVQE ranges from having to shallower circuits than VQE/UCCSD, while using to fewer CX gates. It is important to notice that this result in EVQE is obtained without using any domainspecific variational form. As expected from an algorithm that dynamically grows its circuits, EVQE develops deeper circuits with more CX gates at interatomic distances for which the estimation of the ground state is more challenging, as opposed to VQE/UCCSD, which has constant resource usage at all interatomic distances. Similarly, Figure 4 shows the circuit depths and CX counts required for EVQE and VQE/UCCSD to obtain chemical accuracy in the estimation of the ground state energy of BeH at an interatomic distance of . Relative to the LiH experiment, EVQE is configured with a larger population size as well as a larger optimizationsubroutine iteration limit. Consequently, an even larger reduction in resources is observed relative to VQE/UCCSD, with EVQE obtaining an shallower circuit, using fewer CX gates. The results obtained in both of the chemistry statevector experiments are consistent with the hypothesized properties of EVQE.
Figures 5 and 6 compare EVQE and VQE in the calculation of optimal solutions to two NPHard optimization problems. In both experiments, EVQE’s circuits are always shallower than the shallowest possible solutions for VQE (when two body operators are used). Additionally, EVQE’s CX counts are comparable to the minimum required by any of the VQE configurations. In these experiments, EVQE always obtains the optimal solution while a significant number of VQE’s solutions, up to 90% for some configurations, obtain suboptimal results.
EVQE’s consistency is likely a result of three of its properties. First, its optimization scheme only optimizes one circuit layer at a time, according to a random order. Therefore, EVQE’s optimization subroutine only has parameters to concurrently optimize. This is in contrast to VQE, which simultaneously optimizes all of the parameters in its circuits, and so for a variational circuit with depth , has
parameters to concurrently optimize. EVQE’s second beneficial property is its population of circuits. If some circuits in the population are more susceptible to premature convergence than others, over a number of generations the population will tend towards the circuits that can be optimized more effectively. Additionally, if the probability of prematurely converging is modelled as a random variable, since the population contains multiple species of similar circuits, the probability of all of the circuits in a species converging prematurely is exponentially small in terms of the size of the specie. EVQE’s third advantageous property is also enabled by speciation. VQE’s premature convergence can occur when the algorithm arrives at a parameterization corresponding to a local, but not global, optimum in the search space. In contrast, EVQE’s speciation ensures that the circuits in its population are distributed among various peaks in the search space, reducing the likelihood that all the circuits in the population converge to local, nonglobal, optimum. It is worth noting that VQE was tested with a variety of optimizers, including SLSQP, COBYLA, and SPSA, and premature convergence was still observed. Moreover, in Figure
5, EVQE generally obtains higher error than the VQE results falling in the correct solution region. This is by design of the experiment. In fact, EVQE was configured by setting the depth and penalties to obtain solutions with error of magnitude . In contrast, to prevent premature convergence, all VQE configurations were configured to converge with a tolerance of , well explaining the results. If a solution with greater accuracy is desired for EVQE, it may be obtained by reducing the magnitude of the depth and penalties.VB Hardware Simulation
Table I examines the noiseresistance properties of EVQE. As the noise setting increases, the effective noise experienced by the algorithm also increases. At around noise setting 2, corresponding to transverse and longitudinal coherence times greater than in the actual device profile, the algorithm’s error and resource usage begin to plateau. As the error increases, the algorithm tends towards using fewer CX gates, which is as expected given that CX gates have lower fidelity and longer execution times than U3 gates. Additionally, as the average number of CX gates decreases, the algorithm’s average error approaches the average error of the optimal separable state energy. This energy represents the minimum energy of the Hamiltonian without taking into account correlation energy, and so this behavior is consistent with the fact that, as the number of CX gates in a circuit tends to zero, the circuit’s energy evaluation approaches this limit. As singlequbit gates have relatively fast execution times and relatively high fidelity, it follows that circuits with only a single layer of U3 gates would very closely approximate the ideal separable energy. EVQE experiences a sharp increase in error when increasing the noise setting from 0 to 1. At noise setting 0, only shot noise is present. However, at noise setting 1, both decoherence and gatefidelity error are present, the latter of which is constant at noise settings 1, 2, and 3. Had the gate fidelity error been varied as well, a more gradual increase in error would likely have been observed. This experiment demonstrates that the algorithm will automatically tend towards the circuits that obtain the minimum energy evaluation possible given the constraints imposed upon the forms of plausible circuits by the noise characteristics of the device being used. Possible extensions of this experiment could repeat it with higher qubit counts, or by decreasing the T1 and T2 times substantially past their actual values, thereby emulating conditions that are noisier than real hardware.
Figure 7 compares EVQE and VQE in hardware simulation in the practical application of computing the groundstate energy of LiH. EVQE obtains errors that range from being to smaller than that obtained by VQE using the best variational form. Moreover, no VQE configuration obtains an energy smaller than the HartreeFock energy, while all trials with EVQE do. In the presence of noise, only EVQE obtains results accounting for some of the correlation energy of the molecule. VQE’s performance tends to get worse as the depth setting increases. As the transpiled depth and CX count increase, the effective noise experienced by VQE also increases, resulting in noisier energy evaluations.
It is somewhat surprising that VQE’s results do not improve from depth setting 0 to depth setting 1, as depth setting 1 introduces three CX gates, granting VQE the ability to recover correlation energy. It is possible that VQE/RyRz/linear requires multiple layers of its variational circuit pattern to be repeated in order to capture the entanglement present in the molecule. In contrast, EVQE does not repeat a certain circuit pattern to increase its depth. Rather, it automatically evolves and adapts its circuits. Thus, EVQE can find circuits with sufficient depth, containing CX gates capturing the necessary entanglement, which minimize its energy evaluations despite the presence of noise.
Originally, VQE was executed using the COBYLA optimizer. However, COBYLA consistently converged to average errors ranging from 0.11 to 0.26 Hartree after approximately 250 circuit evaluations, and so the SPSA optimizer was used instead as it obtained better results, as SPSA fully executes the userspecified number of optimization iterations. In an attempt to prevent this problem, COBYLA was configured with various termination tolerances, up to in magnitude. While this termination threshold more than tripled the average number of circuit evaluations performed, no meaningful improvements to the calculated error were observed. Other optimizers such as SLSQP and NelderMead were also tested. All configurations of SLSQP failed to obtain errors below Hartree for VQE/RyRz with a depth setting of 0, and so it was not tested with other circuit depths. NelderMead obtained comparable results to COBYLA, while conducting substantially more circuit evaluations. While it is hard to rule out that the difference in performance between EVQE and VQE is not entirely the product of the optimizers, we can certainly conclude that it is very difficult to find an optimizer configuration for VQE that yields results similar to those obtained by EVQE.
EVQE’s bottom four data points in the figure (noting that two data points overlap) behave as expected: they describe relatively shallow circuits, with a reasonable number of CX gates, and yield good energy evaluations. Surprisingly, however, EVQE finds a circuit with a depth of 16 and with 14 CX gates, which also obtains a low error of 0.0308 Hartree. Given the results from all the VQE trials, we would not have expected a circuit with this number of CX gates and this circuit depth to obtain such a result. To confirm that random noise was not responsible for such a low energy evaluation, and that the output circuit indeed corresponds to a good solution, a new experiment is conducted where the circuit is tested in noiseless statevector simulation; in this case, the error is 0.0391 Hartree.
VC Execution on Real Quantum Hardware
Finally, the results of the hardware execution are presented. Given the requirement of exclusive hardware access, each algorithm configuration is only tested once, and so these results are illustrative rather than demonstrative. After the second generation, EVQE’s fittest genome had an error of and a circuit depth of 5, and used 2 CX gates. It obtained the optimal solution in of the 1300 shots taken. Out of the VQE configurations tested, only RyRz/linear with depth 0 obtained the optimal solution as the state with highest probability, obtaining it in of shots. The error in the energy evaluation associated with this solution is . Given the size of the problem instance, it follows that a VQE variational form with no CX gates, and with a transpiled depth of 1, could obtain the optimal solution. However, the poor performance of the other variational form configurations remains unclear.
Vi Conclusion
In this paper, we presented the Evolutionary Variational Quantum Eigensolver (EVQE), a novel variational algorithm that uses evolutionary programming techniques to minimize the expectation value of a given Hamiltonian by dynamically generating and optimizing an ansatz. EVQE has important new characteristics compared to other variational quantum algorithms, such as VQE:

EVQE performs accurate energy evaluations with hardwareefficient ansatzes. The circuits generated by EVQE in molecular simulations are up to shallower and use up to fewer CX gates than those generated by VQE coupled with domainspecific variational forms.

Due to its evolutionary nature, EVQE operates in a domainagnostic fashion, making it equally applicable to problems in diverse fields, such as chemistry, optimization, finance and artificial intelligence, thereby eliminating the need for domainspecific variational forms (whose construction requires specialized knowledge) or heuristic variational forms (which severely constrain the exploration of the Hilbert space and consequently are often inefficient and imprecise).

EVQE is quantumhardware adaptive; it automatically favors the construction of circuits that are more resilient to the noise characteristics and connectivity constraints of the specific quantum computer on which the algorithm is executed, obtaining results in noisy simulation with at least less error than VQE using any tested ansatz configuration.
EVQE demonstrates the potential of such an adaptive approach, motivating further study into the topic. Possible extensions of this work include comprehensive analyses of the noiseresistance properties of the algorithm, studies confirming that the seeding of the initial population coupled with identityinitialized growth circumvent the barrenplateau problem, and the exploration of custom optimization subroutines tailored to the dynamic growth patterns specific to EVQE. Additionally, exploring novel adaptive algorithms that use fewer total circuit evaluations may prove important while exclusive access to quantum hardware remains a rare resource.
Vii Author Contributions
AGR conceived the project. AGR, SH and MP designed and tested the algorithm. All the authors contributed both to the writing of the article and the development of the software used to test and demonstrate the algorithm. RC and SW contributed to the integration of EVQE into Qiskit Aqua.
Viii Acknowledgements
We would like to thank Sergey Bravyi, Jay Gambetta, Abhinav Kandala, Julia Rice, Rahul Sarkar, Kanav Setia and Andrew Wack for the various discussions and suggestions.
Ix Appendix
Ixa Identityinitialized Growth
To illustrate the importance of identity initialized growth, we present the results from an experiment finding the ground state energy of a randomly generated 4 qubit Hermitian matrix. In EVQEStandard, EVQE is configured as described in the paper: when new gates are added to the circuit, be it U3 or gates, their parameters are set such that they perform the identity transformation. In EVQECX the algorithm is unchanged, except instead of adding identity initialized gates, CX gates are added instead. All other parameters are held constant. However, this experiment does not control for the difference in parameter count, given that each gate in EVQEStandard has three parameters (as opposed to the nonparameterized CX gate used by EVQECX).
By using the CX gate, the energy evaluations of the circuits produced by EVQECX can change nonsmoothly, and according to our claim, should be of detriment to the algorithm’s rate of convergence. The rate of convergence is analysed by comparing the most fit genome in each population after each generation. The algorithm which obtains lower error with fewer generations is considered to converge more quickly.
The experiment shown in Figure 8 supports our claim, demonstrating that identity initialized circuit growth results in error that is on average half an order of magnitude less than that obtained by nongradient preserving circuit growth. Furthermore, we predict that this advantage becomes greater as qubit count increases. While it is difficult to see in the figure, individual trials for EVQECX can get stuck at given error rates for a number of consecutive generations (in some cases, exceeding 10 generations), before they suddenly improve by chance and the process repeats. By contrast, EVQEStandard tends to constantly decrease its error without getting stuck at any specific error level for a significant number of generations. Identity initialized growth enables the algorithm to consistently improve its fitness evaluation with the addition of every circuit layer. However, as already mentioned, since EVQEStandard utilizes parameterized gates, and EVQECX utilizes nonparameterized CX gates, EVQEStandard’s genomes tend to have more parameters than the genomes in EVQECX. Consequently, when all other variables are fixed, EVQEStandard tends to perform more circuit evaluations per generation than EVQECX.
IxB Statevector Simulation of BeH and LiH Using Heuristic Ansatzes
In Figures 3 and 4 of Section IV, EVQE is compared against a variational form, UCCSD, explicitly designed for molecular simulation. By using UCCSD, there is some intuition ensuring that results obtained are close approximations of the true ground state energies. Thus, VQE/UCCSD is a good standard against which to compare variational algorithms, and has been used as such a benchmark in other papers such as ADAPTVQE [Grimsley2019]. However, just as with the NPHard problems presented in Section IV, it is also possible to perform molecular simulations utilizing fixed heuristic variational forms, with no intuition or guarantees that they are even able to capture the required transformations. Given the problems with fixed variational forms outlined in Section I, we do not expect such approaches to effectively or efficiently scale to higher qubit counts, where the volume of states captured by a fixed variational form is exponentially small in relation to the total space. However, for completeness, here we include the results from the best heuristic variational forms tested, and compare them against the results presented in Figures 3 and 4.
In Figure 9, the results from VQE with the RyRz variational form and linear entanglement (VQE/RyRz/linear), VQE with the Ry variational form and full entanglement (VQE/Ry/full), and VQE with RyRz and full entanglement (VQE/RyRz/full) using the minimum depth and CX counts that obtain chemical accuracy at all tested interatomic distances (on the average of 5 trials) are shown. (Here, we should clarify that the entanglement policy is said to be linear if each qubit is only entangled with its neighbor, and full if each qubit is entangled with every other qubit.) To determine these values, each algorithm was tested at each depth setting, in increasing order, until chemical accuracy was obtained on average. Moreover, each of these configurations were tested with a number of optimizers (such as COBYLA and SLSQP) to determine which yielded the best performance. The variational form configuration Ry/linear was also tested, but none of its tested configurations were able to obtain chemical accuracy at all interatomic distances. This configuration process was manually intensive and required a large number of circuit evaluations. Even so, EVQE obtained chemical accuracy with shallower circuits and fewer CX gates than all heuristic configurations of VQE, apart from VQE/RyRz/linear at the interatomic distances of and where the heuristic variational form had marginally shallower circuits with marginally fewer CX gates. It is likely that increasing EVQE’s population size or the iteration count would result in EVQE outperforming all conceivable configurations of the aforementioned heuristic ansatzes.
The results shown in Figure 10 were obtained by configuring the heuristic variational forms in much the same way as just discussed for LiH. Again, the Ry/linear variational form configuration was unable to obtain chemical accuracy. One significant difference for these experiments is that no heuristic configuration of VQE that obtained chemical accuracy on average used fewer resources than EVQE. That is, in the calculation of the groundstate energy of BeH, EVQE obtained chemical accuracy while using fewer resources than any configuration of VQE that was tested. The relative favorable performance of EVQE in the BeH experiments is likely a result of one of, or a combination of, two factors. First, the population size used in the experiment shown in Figure 4 was larger than that used in Figure 3. Second, as predicted, heuristic variational forms may struggle as the number of qubits increase.
IxC Pruning the Space of Circuit Forms
One additional technique that we utilize to optimize our proposed evolutionary strategy is the careful pruning of the search space, as guided by the following set of rules when constructing genomes during EVQE’s evolutionary process. Specifically, these rules are applied when creating a new random gene to add to a given genome.

No qubit will have two U3 gates applied to it in succession. The reason should be quite obvious as two consecutive U3s may be contracted and represented as a single U3. Having them as two separate U3s increases the challenge to the classical optimizer as six “free” parameters (for the two U3s) would have to be tuned to find the optimum as opposed to three (for the single U3).

Similarly, we also do not allow any pairs of qubits to have two consecutive CU3s applied to them, unless the control and target are reversed between the two gates. Again this follows from observing that two consecutive CU3 gates with the same target and controls may be contracted into a single CU3 gate with a different parameterization.

One additional rule has to do with how the identity gate, , is used in genome constructions—they are only added if neither a U3 nor a CU3 gate can be added, in order to reduce the dimension of the parameter space. This implies that no gate can immediately follow a CU3 gate, or directly precede a U3 gate.
Our prototype implementation of EVQE was constructed with all of the above pruning rules, helping to reduce the complexity of the search space, thereby making the evolutionary process more efficient.
IxD Qubit Hamiltonian Preparation
Here we describe how the Hamiltonians are generated for the experiments, including precision preserving 6qubit LiH, precision preserving 7qubit BeH, and approximated 4qubit LiH. First, the atoms are aligned in the xaxis for both molecules, so all major interactions happen in xaxis only. This represents an unexploited optimization, as the algorithm could have been implemented with controlled gates instead of gates. Moreover, for BeH, interatomic distance refers to the distance between the Be and H atoms. The molecular Hamiltonians are computed with STO3G basis set, widely used in quantum chemistry, with the PySCF chemistry driver. For those three molecular Hamiltonians, we also freeze the orbitals of Li and Be since they do not strongly interact with other orbitals. Furthermore, we either explore the molecular symmetries present or remove unoccupied orbitals to further reduce the number of qubits. Subsequently, we apply the JordanWigner (JW) transformation to convert molecular Hamiltonians to qubit Hamiltonians. Note that, the JW transformation maps one fermionic mode onto one qubit.
Precisionpreserving 6qubit LiH. Under the above setting, LiH has 10 fermionic modes, and thus requires 10 qubits. We subsequently explore the symmetries in the molecule to further taper qubits based on the works of Bravyi et al. and Setia et al. [bravyi2017tapering, Setia2019]. For LiH, this approach can find four symmetries, resulting in a 6qubit LiH. Bravyi’s symmetry finding package is available in Qiskit Aqua [Qiskit].
Precisionpreserving 7qubit BeH. Under the above setting, BeH has 12 fermionic modes, and thus requires 12 qubits. Following the same procedure detailed for precisionpreserving 6qubit LiH, five symmetries are found, resulting in a 7qubit BeH.
Approximated 4qubit LiH Under the above setting, LiH has 10 fermionic modes. Furthermore, we remove the weakly interacting orbitals ( and ) since the atoms are aligned in the xaxis. Thus, 4 ferminonic modes are removed, resulting in a molecular Hamiltonian with 6 modes. Subsequently, we further explore the symmetries in the molecule, now finding 2 additional symmetries. Finally, only 4 qubits are required to approximate LiH.
Comments
There are no comments yet.