A Domain-agnostic, Noise-resistant Evolutionary Variational Quantum Eigensolver for Hardware-efficient Optimization in the Hilbert Space

10/21/2019 ∙ by Arthur G. Rattew, et al. ∙ 0

Variational quantum algorithms have shown promise in numerous fields due to their versatility in solving problems of scientific and commercial interest. However, leading algorithms for Hamiltonian simulation, such as the Variational Quantum Eigensolver (VQE), use fixed preconstructed ansatzes, limiting their general applicability and accuracy. Thus, variational forms—the quantum circuits that implement ansatzes —are either crafted heuristically or by encoding domain-specific knowledge. In this paper, we present an 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. The algorithm is equally applicable to optimization problems in all domains, obtaining accurate energy evaluations with hardware-efficient ansatzes that are up to 18.6× shallower and use up to 12× fewer CX gates than results obtained with a unitary coupled cluster ansatz. EVQE demonstrates significant noise-resistant properties, obtaining results in noisy simulation with at least 3.6× less error than VQE using any tested ansatz configuration. We successfully evaluated EVQE on a real 5-qubit IBMQ quantum computer. The experimental results, which we obtained both via simulation and on real quantum hardware, demonstrate the effectiveness of EVQE for general-purpose optimization on the quantum computers of the present and near future.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 13

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

References

I Introduction

Current quantum hardware belongs to the class of Noisy Intermediate-scale Quantum (NISQ) computers  [Preskill2018]. These devices are primarily limited by 2-qubit-gate fidelity and qubit-coherence times. Consequently, many quantum algorithms necessitating deep circuits with many 2-qubit 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 quantum-computing 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 ground-state 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 ground-state energy, or, more formally:

(1)

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:

(2)

with the hope that the resulting expectation value closely approximates the ground-state 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 is 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. In other words, 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 the variational forms is kept polynomial in the number of qubits. Since a polynomial number of parameters cannot fully capture all of the states in an

-qubit Hilbert space, VQE can only generate transformations to a subset of all the possible states that is exponentially smaller than the entire Hilbert space.

To circumvent this limitation, VQE is often used in tandem with specially crafted domain-specific 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 quantum-chemistry computations [UCCSD]. 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 2-qubit 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 general-purpose, quantum-enabled, 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 well-known 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:

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

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

  3. EVQE is quantum-hardware 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 VQE/UCCSD when estimating the ground-state energy of LiH. In the estimation of the ground-state energy of BeH

, EVQE obtains shallower circuits, using fewer CX gates than VQE/UCCSD. In the maximum-cut and vehicle-routing 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 5-qubit IBMQ quantum processor.

Ii Background

VQE employs the variational method of quantum mechanics to bound the ground-state 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 2-qubit 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 this problem is NP-Hard. Thus, heuristic methods may be required in practice. For example, the algorithm ADAPT-VQE utilizes knowledge from coupled-cluster theory to adaptively construct and optimize a variational circuit for molecular simulations [Grimsley2019]. However, ADAPT-VQE has several limitations—such as a likely sensitivity to noise—which 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 single-qubit gates, leaving the 2-qubit 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 machine-learning algorithms have been proposed that utilize fixed variational forms to implement their function-approximation 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 is preferable, its parameters would still need to be re-optimized, wasting the optimization iterations performed on all of its ancestors. Furthermore, these algorithms primarily grow circuits using non-parameterized gates. Therefore, when non-identity gates are added to an existing circuit, because of superposition and entanglement, the energy evaluation of the overall circuit changes non-smoothly. 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, enables it to smoothly and efficiently explore regions of the Hilbert space as explained in the next section.

Iii Evolutionary Variational Quantum Eigensolver (EVQE)

EVQE is a speciated, asexual, evolutionary algorithm for general-purpose multimodal optimization. By mirroring the processes of natural selection, the algorithm effectively explores a search space of quantum-circuit forms and parameterizations. This section provides a brief overview of EVQE, and summarizes the characteristics that enable its novel properties.

Iii-a 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 .

A gene, , characterizes a layer of a quantum circuit, such that each qubit in that layer is assigned a gate from the set:

Here, is the identity gate, U3 is a universal single-qubit gate with 3 parameters, and represents a controlled-U3 gate [Barenco1995], often indicated as CU3 as well. Furthermore, a gene instance contains all of the parameters required for any parameterized gates it describes.

Iii-B 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 explained above. The asexual reproduction scheme enables EVQE to optimize clearly-defined gradients, efficiently identify niches for speciation, and circumvent the permutation problem. It also contributes to the algorithm’s noise-resistance properties.

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 the performance 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 utilizing genetic algorithms to grow quantum circuits (given a known target matrix), when EVQE adds an additional gate to an existing quantum circuit, the 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 re-optimized, 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 multi-modal 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 non-matching 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.

Fig. 1: Genetic Representation of a Population of Quantum Circuits. A genetic tree corresponding to a population with 3 genomes is shown as an example. Each of the genomes in the population contains part of the information required to construct this tree. Moreover, this tree also illustrates the set of circuit forms which have been explored by the algorithm.

For example, the tree shown in Figure 1 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 which must be removed from both genomes to obtain their most recent common ancestor, as follows:

Here, gives the number of non-null genes in and gives the gene in , while evaluates to if the gene in both genomes are the same, or otherwise.

Moreover, as explained later in more detail, 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 non-trivially harm the fitness evaluations of all of the genomes in that line at the same time. That is, noise must wipe out all of the members of a genetic line concurrently. Otherwise 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.

(a) Depth vs Interatomic Distance
(b) CX Count vs Interatomic Distance
Fig. 2:

Chemistry Aapplication: State-vector Implementation for 6-qubit LiH.

EVQE is compared against VQE/UCCSD in the estimation of the ground-state 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 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.

Iii-C 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 non-negative, user-specified 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 resource-efficient circuits, and mitigating the effects of noise in circuit evaluation. It is clear how the penalties enable the first benefit. The resistance to noise is enabled by the penalties working similarly to a regularization penalty in machine-learning 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 so lead to 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 so 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:

where is the size of the species of which is a member.

Iii-D Mutation Operators

The mutation operators used by EVQE are topological search, parameter search, and removal.

The topological-search operator creates a new gene, corresponding to a random assignment of gates from to each qubit in a circuit layer, subsequently appending a corresponding gene instance to the target genome. For a genome , the formal definition of the topological search operator is given by the following:

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 parameter-search operator optimizes each layer of the genome’s circuit, one layer at a time, according to a randomly-selected ordering. Whereas the topological search operator explores the space of circuit forms, the parameter search operator explores the space of parameterizations for a fixed circuit form. The parameter search operator is defined as:

where optimizes each in a random order.

The removal operator eliminates a random number of contiguous gene instances, starting from the last gene instance in the genome. Formally, the removal operator performs the following mapping:

where is selected uniformly at random from . This mutation allows the algorithm to repopulate shallower search spaces.

Iii-E Algorithm Summary

A basic outline of EVQE is given as follows:

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

  2. Randomly select one genome from each species as the representative genome for that species.

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

  4. Calculate the fitness for each and then calculate the species-adjusted fitness .

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

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

  7. Assign each new genome to a specie by comparing its genetic distance to each specie representative, assigning it to the first species for which its genetic distance is within the genetic distance threshold. If there is no such specie, create a new species for which this genome is the representative genome.

  8. If generations have passed, 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 are obtained from optimization of each circuit with the Qiskit Terra transpiler, configured to optimization level 3. All VQE circuits had barriers removed. Moreover, in figures where error bars are shown, the error bars represent one standard deviation from the mean.

Iv-a State Vector Simulation

The purpose of the state vector experiments are to compare the performance of EVQE to VQE under theoretically optimal conditions, allowing the convergence properties of the algorithms to be explored. State vector simulation performs the matrix multiplication corresponding to a given quantum circuit, yielding an output quantum state vector. The expectation value of the matrix representing the target Hamiltonian is then taken with respect to the output state vector and so, for the purpose of these experiments, state vector simulation is equivalent to noiseless simulation with infinite shots.

Fig. 3: Chemistry Application: State-vector Implementation for 7-qubit BeH. EVQE is compared against VQE in the estimation of the ground-state energy of BeH with an interatomic distance of 1.3Å. EVQE is configured with a population size of 300, an optimization count of 300, an of , a of and the COBYLA optimizer. VQE demonstrates the best performance when using the SLSQP optimizer with an unbounded number of optimization iterations, terminating only upon convergence. The depth setting used for VQE UCCSD is the minimum possible. Both algorithms obtain results within chemical accuracy over the average of 10 trials.
Fig. 4: Randomized testing: variable noise experiment for 10 random 2 qubit Hamiltonians. EVQE is tested in noisy simulation using the device profile of IBMQ Tokyo in the estimation of the ground state energy of 10 randomly generated Hamiltonians with varying levels of noise present. As the noise settings decrease from 3 to 2 to 1, the device’s longitudinal coherence time and transverse coherence time are increased by a multiplicative factor of 1, 5, and 100 respectively. At noise setting 0, only shot noise is present. The circuit executions for all algorithm are conducted using 1300 shots. The reported statistics come from the average of 10 trials for each of the 10 random Hamiltonians. EVQE is configured with a population size of 50, an optimization count of 150, an of , a of , and the SPSA optimizer. The horizontal line marked “Optimal Separable State Energy Average Error” corresponds to the average error associated with a circuit containing only U3 gates (no entanglement) whose parameters where optimized in ideal state vector simulation utilizing an unbounded number of optimization iterations. Thus, it represents the maximum recoverable energy without entanglement.

The state vector experiments can be divided into two broad categories: molecular simulation and general optimization. In both of the chemistry applications, the task is to find the ground state energy of the given molecule. The Hamiltonian for both molecules is created using the PySCF chemistry framework, configured with the Jordan-Wigner Qubit Mapping and using the STO-3G basis. Following the process outline by Setia et al. in 2019, each molecule’s Hamiltonian is tapered using the symmetries present [Setia2019]. This qubit tapering procedure is precision preserving and reduces the required qubits to simulate BeH from 14 to 7, and reduces the required qubits to simulate LiH from 12 to 6. More details can be found in Appendix VII-C. Figure 2 compares the performance of EVQE and VQE UCCSD at various interatomic distances. Figure 3 compares the performance of EVQE and VQE UCCSD at one 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 ground state energy of LiH and BeH. In both of the optimization problems, the task is to find the optimal solution of a small, randomly generated, NP-Hard problem instance. In these applications, the problems are encoded as Ising Hamiltonians using procedures similar to those outlined by Andrew Lucas in 2014 [Lucas2014].

Iv-B Hardware Simulation

The purpose of the hardware simulation experiments are to understand the noise resistant characteristics of EVQE, and to compare EVQE and VQE under realistic noisy conditions. As these experiments are designed to understand the algorithms’ intrinsic noise resistance 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: 20 qubit Tokyo and 5 qubit Vigo.

The purpose of the experiments shown in Figure 4 are to understand how EVQE’s behavior changes when various levels of noise are present. The noise characteristics are varied by scaling the hardware’s T1 and T2 times, representing the longitudinal coherence time and the transverse coherence time respectively, in simulation. As the coherence times increase, the effective noise decreases. The experiments are conducted on 10 randomly generated two qubit Hamiltonians which are created using the random_hermitian method in Qiskit Aqua [Qiskit]. These experiments are conducted on two qubits as a matter of practicality as noisy simulation is computationally expensive. These experiments are conducted using the noise profile and qubit connectivity of the IBMQ Tokyo device. The characteristics of this device, such as the single qubit gate fidelity and CX gate fidelity, are discussed by Cross et al. in a 2019 [Cross2019]. As IBMQ Tokyo has 20 qubits, and the experiments only require 2 qubits, the algorithm is pinned to the two connected qubits with the lowest CX gate error. The noise characteristics of this quantum computer require the use of a noise-resistant optimization subroutine, so the optimizer Simultaneous Perturbation Stochastic Approximation (SPSA) is used.

(a) CX Count vs Interatomic Distance
(b) Depth vs Interatomic Distance
Fig. 5: Optimization application: state vector implementation for 10 qubit maxcut. EVQE is compared against VQE in the calculation of the maximum cut of a random graph with 10 nodes. Each algorithm is tested 10 times, with all results shown above. Solutions that fall within the green shaded region correspond to optimal solutions of the random maxcut instance. Solutions with green outlines outside of the shaded region also correspond to optimal solutions. EVQE is configured with a population size of 250, an optimization count of 140, an of , a of and the COBYLA optimizer. For all variational forms, VQE demonstrates the best performance when using the SLSQP optimizer. EVQE is configured to yield solutions with approximately error, while VQE’s optimizer is configured with a tolerance of to prevent premature convergence.

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 ground state energy of LiH. To allow the use of one of IBM’s latest 5 qubit devices, with substantially improved single qubit gate and CX gate fidelity, a non-precision preserving qubit reduction operation was performed on LiH by removing unoccupied spin orbitals. This procedure reduces LiH’s qubit requirements from the 6 used in state vector simulation to 4 qubits. Moreover, the removal of unoccupied orbitals does not prevent chemical accuracy from being attained in the calculation of LiH’s ground state energy, and so this procedure has been used in various papers [Kandala2017, Kandala2019]. Furthermore, by using IBMQ Vigo EVQE is able to use the noise-sensitive optimizer Constrained Optimization by Linear Approximation (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 algorithms’ obtained error is a function of its noise resistance rather than a function of the performance of each optimizer. This is in contrast to the state vector 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.

(a) CX Count vs Interatomic Distance
(b) Depth vs Interatomic Distance
Fig. 6: Logistics application: state vector implementation for 12 qubit vehicle routing. EVQE is compared against VQE in the calculation of an optimal set of routes for a fleet of 32 vehicles to deliver goods to 4 distinct destinations. Each algorithm is tested 10 times, with all results shown above. Solutions that fall within the green shaded region correspond to optimal solutions of the random vehicle routing instance. Solutions with green outlines outside of the shaded region also correspond to optimal solutions. EVQE is configured with a population size of 300, an optimization count of 300, an of , a of and the COBYLA optimizer. For all variational forms, VQE demonstrates the best performance when using the SLSQP optimizer. EVQE is configured to yield solutions with approximately error, while VQE’s optimizer is configured with a tolerance of to prevent premature convergence.

Iv-C Quantum Hardware Execution

The purpose of this experiment is to experimentally demonstrate the efficacy of the algorithm when executed on real quantum hardware. We found 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, as exclusive access was obtained on 5 qubit IBMQ Vigo, a random instance of maxcut with 5 vertices was tested.

EVQE was 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 was necessary to enable the algorithm to run during the time the hardware was allocated. VQE was configured with the variational forms RyRz Linear and Ry Linear as they demonstrated the best results in noisy simulation. Both VQE configurations used the COBYLA optimizer, set with a maximum of 500 optimization iterations. VQE was tested with depth settings ranging from 0 to 2. Both EVQE and VQE were executed with 1300 shots.

V Discussion

Four important metrics when comparing the performance of variational algorithms are: error, circuit depth, CX gate count, and total number of circuit evaluations. These metrics vary in significance depending on the type of experiment being conducted.

In state vector simulation, circuit depth and CX counts are important indicators of performance on actual hardware. CX gates typically have errors that are an order of magnitude larger than single qubit gates and so their quantity is representative of the cumulative gate fidelity 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 required execution time and thus is an indirect measure for the decoherence error that would be incurred in actual hardware execution. In real hardware execution (or in full hardware simulation) the impacts of CX gate count and circuit depth are implicitly taken into account in the execution of a circuit. As a circuit’s depth and CX gate count increase, gate fidelity error and decoherance error 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 state vector simulation and real hardware execution the total number of circuit evaluations is an important consideration. However, as discussed in the results section, the total number of circuit evaluations is not directly comparable between EVQE and VQE.

It is worth emphasizing that for the results shown in Figures 2, 3, 5 and 6, when near-ideal parallelism was assumed, EVQE’s gradual circuit growth and parameter optimization resulted in the number of sequential circuit evaluations (circuit evaluations which cannot be performed in parallel) being comparable to the total number of circuit evaluations performed by VQE when using variational forms which obtained similar levels of error. Practically, this meant that when both algorithms were tested on a 32 core processor, EVQE generally had similar, if not faster, running times than VQE in the aforementioned experiments.

(a) Error vs CX Count
(b) Error vs Depth
Fig. 7: Chemistry Application: full simulation of IBMQ Vigo for 4 qubit LiH. EVQE is compared against VQE in the calculation of the ground state energy of LiH with an interatomic distance of , and unoccupied orbitals removed. The Qiskit Aer QASM simulator is configured with the noise profile and device connectivity of the IBMQ Vigo quantum computer. EVQE is configured with a population size of 8, an optimization iteration count of 55, the COBYLA optimizer, an of and a of . VQE is tested with the variational forms: RyRz Linear with depths 0-4, RyRz Full with depths 0-4, Ry Linear with depths 0-4, Ry Full with depths 0-4, and UCCSD with depth 1. VQE RyRz Linear gives the best results for VQE, and so is shown in the figures above. VQE performs best when configured with the SPSA optimizer. An optimization iteration limit corresponding to 2040 circuit evaluations is set. The circuit executions for all algorithm are conducted using 1800 shots. All algorithms, apart from VQE UCCSD, use the vacuum state as the starting state. VQE UCCSD uses the Hartree-Fock state as its initial state.

The chemistry state vector simulations demonstrate significant resource reductions for EVQE relative to VQE UCCSD. Figure 2 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 LiH at 10 interatomic distances. The same configuration was used for each algorithm at all interatomic distances. On average, EVQE ranges from having to shallower circuits than VQE UCCSD, using to fewer CX gates. As expected from an algorithm which 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 3 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 was configured with a larger population size and with a larger optimization subroutine 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 state vector 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 NP-Hard optimization problems. In both experiments, EVQE’s solutions 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 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 sub-optimal 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 which 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, non-global, 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, 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.

Figure 4 examines the noise resistant 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 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 it is consistent that as the number of CX gates in a circuit approach zero, the circuit’s energy evaluation approaches this limit. As single qubit 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, decoherence and gate fidelity error are present, the later of which is constant at noise settings 1, 2, and 3. Had the gate fidelity error been varied as well, a smoother and more gradual increase in error would likely have been observed. This experiment demonstrates that the algorithm will automatically tend towards the circuits which 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 full hardware simulation in the practical application of computing the ground state 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 the Hartree-Fock energy, while all trials with EVQE do. EVQE is the only algorithm which in the presence of noise 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 the algorithm 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 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, it 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, the optimizer 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 user specified number of optimization iterations). In an attempt to prevent this convergence, 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 Nelder-Mead were also tested. All configurations of SLSQP failed to obtain errors bellow Hartree for VQE RyRz with a depth setting of 0, and so it was not tested with other circuit depths. Nelder-Mead obtained comparable results to COBYLA, while performing substantially more circuit evaluations. While it is difficult to rule out that the difference in performance between EVQE and VQE is not entirely the product of the optimizers, we can conclude that it is very difficult to find an optimizer configuration for VQE which 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 found a circuit with a depth of 16 and with 14 CX gates which also obtained 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, the circuit was tested in noiseless state vector simulation and an error of 0.0391 Hartree was observed.

Finally, the results of the hardware execution are presented. Given the requirement of exclusive hardware access, each algorithm configuration was only tested once, and so these results are illustrative rather than demonstrative. After the second generation, EVQE’s most fit genome had an error of , a circuit depth of 5, and used 2 CX gates. It obtained the optimal solution in 97.4% of the shots taken. Out of the VQE configurations tested, only RyRz Linear 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 was . Given the size of the problem instance, it follows that a VQE variational form with no CX gates, and with transpiled depth 1, could obtain the optimal solution. However, the poor performance of the other variational form configurations remains unclear.

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

Vii Appendix

Vii-a Identity Initialized 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 EVQE-Standard, 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 EVQE-CX 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 EVQE-Standard has three parameters (as opposed to the non-parameterized CX gate used by EVQE-CX).

By using the CX gate, the energy evaluations of the circuits produced by EVQE-CX can change non-smoothly, 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 non-gradient 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 EVQE-CX 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, EVQE-Standard 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 EVQE-Standard utilizes parameterized gates, and EVQE-CX utilizes non-parameterized CX gates, EVQE-Standard’s genomes tend to have more parameters than the genomes in EVQE-CX. Consequently, when all other variables are fixed, EVQE-Standard tends to perform more circuit evaluations per generation than EVQE-CX.

Fig. 8: Performance Analysis: state vector evaluation of identity initialized circuit growth. A random 4 qubit Hermitian matrix is generated using the random_hermitian method in Qiskit Aqua [Qiskit]. Its ground state energy is then calculated utilizing EVQE-Standard, which is the algorithm described in the paper, and EVQE-CX, which does not use identity initialized growth and grows circuits by adding CX gates rather than identity initialized gates. Apart from the method of circuit growth, both algorithms have identical configurations: a population size of , an optimization iteration count of , the COBYLA optimizer, an of , and to ensure a fair comparison, a of .

Vii-B State Vector Simulation of BeH and LiH Using Heuristic Ansatz

In Figures 2 and 3 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 ADAPT-VQE [Grimsley2019]. However, just as with the NP-Hard 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 2 and 3.

Fig. 9: Chemistry application: state vector implementation for 6 qubit LiH utilizing heuristic ansatz. This figure represents the same experiment, with the same configurations, as that shown in Figure 2. The depths and CX count shown correspond to the minimum for each variational form configuration which, on the average of five trials, obtain chemical accuracy in the estimation of the ground state energy of LiH with the 10 interatomic distances shown in Figure 2. Each of these VQE heuristic variational forms demonstrate the best performance when using the SLSQP optimizer with an unbounded number of optimization iterations, terminating only upon convergence.

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 by increasing the population size or the iteration count for EVQE will 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 ground-state 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 3 was larger than that used in Figure 2. Second, as predicted, heuristic variational forms may struggle as the number of qubits increase.

Fig. 10: Chemistry application: state vector implementation for 7 qubit BeH utilizing heuristic ansatz. This figure represents the same experiment, with the same configurations, as that shown in Figure 3. Each of these VQE heuristic variational forms demonstrate the best performance when using the SLSQP optimizer with an unbounded number of optimization iterations, terminating only upon convergence. The depth setting used for each heuristic form was the minimum obtaining chemical accuracy over the average of 10 trials.

Vii-C Qubit Hamiltonian Preparation

Here we describe how the Hamiltonian generated for the experiments, including precision preserved 6-qubit LiH and 7-qubit BeH, and approximated 4-qubit LiH. First, we align the atoms in the x-axis for both molecule, which means all major interactions are happened in x-axis only for both molecule. Furthermore, the inter-atomic distance for BeH means the distance between Be and H atoms. The molecular Hamiltonians are computed with STO-3G basis set with the PySCF chemistry driver, and the selected basis set and widely used in quantum chemistry. For those three molecular Hamiltonians, we also freeze the orbitals of Li or Be since it does not strongly interact with others. Afterward, we either explore the molecule symmetries or remove unoccupied orbitals to further reduce the number of qubits. After that, we apply Jordan-Wigner (JW) transformation to convert molecular Hamiltonian to qubit Hamiltonian. Note that, the JW transformation maps one fermionic mode into one qubit.

Precision preserved 6-qubit LiH Under above setting, the number of fermionic modes of LiH is 10, which requires 10 qubits; furthermore, we explore the symmetries in the molecule to further taper qubits based on Bravyi et. al. [bravyi2017tapering]. For LiH, this approach can find four symmetries and one qubit can be removed based on one symmetry. Thus, it results in a 6-qubit LiH. The finding symmetries package is available in Qiskit Aqua [Qiskit].

Precision preserved 7-qubit BeH Under above setting, the number of fermionic modes of BeH is 12, which requires 12 qubits; furthermore, we explore the symmetries in the molecule to further taper qubits based on Bravyi et. al. [bravyi2017tapering]. For BeH, this approach can find five symmetries. Thus, it results in a 7-qubit BeH.

Approximated 4-qubit LiH Under above setting, the number of fermionic modes of LiH is 10; furthermore, we remove the orbitals with less interaction ( and ) since we align atoms in x-axis. Thus, it removes 4 ferminonic modes and results in the molecular Hamiltonian with 6 modes. After that, we again explore the symmetries in the molecule to decrease the number of required qubits; however, since we had removed two orbitals, we are only able to find 2 symmetries this time. Afterwards, we only need 4 qubits for the approximated LiH.