Advertisement

An evolutionary strategy for finding effective quantum 2-body Hamiltonians of p-body interacting systems

  • G. Acampora
  • V. Cataudella
  • P. R. Hegde
  • P. Lucignano
  • G. PassarelliEmail author
  • A. Vitiello
Short Communication
  • 78 Downloads

Abstract

Embedding p-body interacting models onto the 2-body networks implemented on commercial quantum annealers is a relevant issue. For highly interacting models, requiring a number of ancilla qubits, that can be sizable and make unfeasible (if not impossible) to simulate such systems. In this manuscript, we propose an alternative to minor embedding, developing a new approximate procedure based on genetic algorithms, allowing to decouple the p-body in terms of 2-body interactions. A set of preliminary numerical experiments demonstrates the feasibility of our approach for the ferromagnetic p-spin model and paves the way towards the application of evolutionary strategies to more complex quantum models.

Keywords

Adiabatic quantum computation Quantum annealing p-spin model Genetic algorithms Graph embedding 

1 Introduction

Finding the solution of NP-hard problems requires a time-to-solution increasing exponentially as a function of the system size (Cook 1971). NP-hard tasks can be studied with adiabatic quantum computation (Farhi et al. 2000; Albash and Lidar 2018), a heuristic tool for finding the optimal solution to this kind of problems. The D-Wave quantum machines (Harris et al. 2011) can perform finite-time adiabatic quantum computation, or quantum annealing. The superconducting architecture of D-Wave processors is built on the Chimera graph (Choi 2008; 2011), a sparsely connected graph that can host N ≤ 2048 qubits, with at most 2-body interactions. However, many interesting problems, including the ferromagnetic p-spin model (Derrida 1981; Gross and Mezard 1984; Bapst and Semerjian 2012), can be mapped on fully connected qubit systems with p-body interactions (p ≥ 2). In order to exploit the available quantum hardware, these problems have to be mapped to effective Hamiltonians (Lucas 2014), containing at most 2-body interactions. This necessarily implies the introduction of auxiliary degrees of freedom, or ancillae (Biamonte 2008). The major challenge in this problem is to find the free parameters in the 2-body Hamiltonian, corresponding to the p-body one, such that the two Hamiltonians share the same spectral properties (Brell et al. 2011).

In this paper, we show that genetic algorithms can be a powerful tool to optimize the free parameters in the effective 2-body model, focusing on the ferromagnetic p-spin system. Genetic algorithms are stochastic meta-heuristics for finding solutions to optimization problems, inspired by the Darwinian theory of evolution (Goldberg and Holland 1988). The (real) free parameters to optimize, or genes, are arranged in a chromosome. Many such chromosomes, or individuals, compose a population. The fitness of each individual represents its chances of survival along generations. Choosing an appropriate fitness function is the core of genetic algorithms. As shown with more in-depth in the following sections, we use the mean square error of the effective spectrum from that of the original Hamiltonian as our fitness function. The idea to apply genetic algorithms is motivated by recent works (O’Driscoll et al. 2019; Hardy and Steeb 2010), where this kind of evolutionary algorithms has been successfully exploited to solve optimization problems in quantum computing domain.

The ferromagnetic p-spin model is equivalent to the Grover search algorithm in the limit of large and odd p. However, in this paper, we focus on the very simple cases involving small p (p = 3) that can be also analytically addressed. As shown by a set of preliminary experiments involving two simple configurations of ferromagnetic p-spin model, the analytic solutions are well-reproduced by the designed genetic algorithm. Moreover, to ensure the validity of our approach, we also simulate a quantum annealing and study the time evolution of the ground state probability for the p-spin system and its effective 2-body counterpart.

The rest of the paper is organized as follows. In Section 2, our model Hamiltonian is introduced. In Section 3, the details about the proposed genetic algorithm including chromosome structure and fitness function are given. Section 4 presents the settings and the results of a set of preliminary experiments related to the application of the proposed genetic algorithm to two small instances of the p-spin model, which we use as benchmarks for the accuracy of our scheme. Conclusions and improvements to be performed in the future are reported in Section 5.

2 Problem definition

We consider a system of N qubits. The two logical states in the computational basis of qubit i can be equivalently labeled as |σi〉, with σi = ± 1, or |xi〉, with xi = 0,1. The two choices are related by σi = 1 − 2xi. In the following, we will use the xi representation, unless stated otherwise. We denote by \( {\sigma _{i}^{k}} \), with k = x,y,z, the Pauli matrices acting on the i th qubit. Moreover, we work in natural units and fix \( \hslash = 1\).

We focus on the ferromagnetic p-spin model (Derrida 1981; Gross and Mezard 1984), whose dimensionless classical Hamiltonian reads
$$ E_{\text{p}} = -{N} {\left[ \frac{1}{{N}} \sum\limits_{i = 1}^{{N}} (1 - 2 x_{i}) \right]}^{p}. $$
(1)
The quantum version of this Hamiltonian reads
$$ H_{\text{p}} = -{N} {\left( \frac{1}{{N}} \sum\limits_{i = 1}^{{N}} {\sigma_{i}^{z}} \right)}^{p}. $$
(2)
For even p, there are two degenerate ground states due to the Z2 symmetry of this model, while for odd p, the ground state is nondegenerate. For \( {N} \to \infty \) and \( p \to \infty \) (pN, p odd), this model can implement a Grover-like search in adiabatic quantum computation (Grover 1996).
In adiabatic quantum computation, one usually employs the parametric Hamiltonian
$$ H(s) = A(s) H_{0} + B(s) H_{\text{p}}, $$
(3)
where s = t/tf is a dimensionless time and ranges in \( \left [0, 1\right ]\), tf being the annealing time, and the two functions A(s) and B(s) satisfy A(0) ≫ B(0) and A(1) ≪ B(1). H0 is the transverse field Hamiltonian:
$$ H_{0} = -\sum\limits_{i = 1}^{{N}} {\sigma_{i}^{x}}. $$
(4)
The qubit system is prepared in the ground state of H(0) and is evolved by slowly changing the parameter s towards s = 1. If the evolution is adiabatic compared to the inverse of the minimal gap Δ between the instantaneous ground state and the first excited state, the system is found at s = 1 in the ground state of Hp with large probability. In this paper, we will use a linear annealing schedule, i. e., A(s) = 1 − s and B(s) = s.

Despite the fact that it is analytically solvable, the p-spin model is heavily studied in the context of quantum optimization (Seki and Nishimori 2012; Seoane and Nishimori 2012; Susa et al. 2018; Ohkuwa et al. 2018; Passarelli et al. 2018, 2019, 2019) due to its ability to capture the essential feature of NP-hard problems, i. e., the exponentially growing time-to-solution as a function of N. In fact, when p > 2 and in the thermodynamic limit, the p-spin system with the Hamiltonian of Eq. 3 undergoes a first-order quantum phase transitions that makes its spectral gap Δ close exponentially fast as a function of N (Bapst and Semerjian 2012).

However, due to its full-connectivity and the presence of p-body interactions, this model can hardly be embedded in the available quantum hardware. The Chimera graph of latest D-Wave machines only allow to study sparse models with at most 2-body interactions (Choi 2008, 2011). In order to use D-Wave machines to perform the quantum annealing of the p-spin model, first we have to map its Hamiltonian Eq. 2 into an effective one, containing only 2-body interactions, yet still fully connected. Then, using minor embedding (Choi 2008), this fully connected effective 2-body Hamiltonian is mapped onto a sparse model, respecting the topology of the Chimera graph. Both these two steps require the introduction of a certain number Na of ancillary degrees of freedom. In this paper, we will address only the first question and discuss the mapping of the p-spin Hamiltonian with p-body interactions onto the effective fully connected 2-body Hamiltonian
$$ H_{\text{p}}^{\prime} = K + \sum\limits_{i = 1}^{{M}} h_{i} {\sigma_{i}^{z}} + \sum\limits_{i = 1}^{{M}} \sum\limits_{j = i + 1}^{{M}} J_{i, j} {\sigma_{i}^{z}} {\sigma_{j}^{z}}, $$
(5)
where M = N + Na is the total number of qubits, K is a constant energy shift, hi are the local longitudinal fields, and Ji,j couples qubits i and j (j > i). The corresponding classical effective energy reads
$$ E_{\text{p}}^{\prime} = c_{0} + \sum\limits_{i = 1}^{{M}} c_{i} x_{i} + \sum\limits_{i = 1}^{{M}} \sum\limits_{j = i + 1}^{{M}} d_{i, j} x_{i} x_{j}. $$
(6)
Parameters in the two Hamiltonians, Eqs. 5 and 6, are related by (Hauke et al. (2019))
$$ \begin{array}{@{}rcl@{}} K &=& c_{0} + \frac{1}{2} \sum\limits_{i = 1}^{{M}} c_{i} + \frac{1}{4} \sum\limits_{i = 1}^{{M}} \sum\limits_{j = i + 1}^{{M}} d_{i, j}. \end{array} $$
(7)
$$ \begin{array}{@{}rcl@{}} h_{i} &=& -\frac{1}{2} c_{i} - \frac{1}{4} \sum\limits_{i = 1}^{{M}} d_{i, j} - \frac{1}{4} \sum\limits_{j = 1}^{{M}} d_{i, j}, \end{array} $$
(8)
$$ \begin{array}{@{}rcl@{}} J_{i, j} &=& \frac{1}{4} d_{i, j}. \end{array} $$
(9)
All these free parameters are real-valued.

To map the Hamiltonian Eq. 2 to the Hamiltonian Eq. 5 means that the low part of the spectrum of \( H_{\text {p}}^{\prime } \) has to match the spectrum of Hp, and all other energy levels must be separated by a large energy gap from the original eigenvalues. Indeed, for the purpose of adiabatic quantum computation, only the ground state and the first excited subspace have to be matched in the purely adiabatic limit. However, in this paper, we will always aim at matching the first L = 2N eigenvalues of \( H_{\text {p}}^{\prime } \) and all the original spectrum. We stress that even if the low-energy subspace of \( H_{\text {p}}^{\prime } \) correctly reproduces the spectrum of Hp, the quantum dynamics could be different. However, this mapping allows to solve the original optimization problem, through an experimentally viable effective model.

Multiple-body interactions can be turned into 2-body interactions using AND embedding. Pairs of binary variables (xi,xj) are encoded in an ancillary degree of freedom \( \tilde {x}_{i, j} = x_{i} \land x_{j} \). Of course, allowed configurations for the triple \( (x_{i}, x_{j}, \tilde {x}_{i, j}) \) are those where the logical AND is satisfied. A penalty function \( E_{\text {pen}}(x_{i}, x_{j}, \tilde {x}_{i, j}) \) penalizes nonphysical configurations through a large cost δ > 0 or more. We will use the penalty function
$$ E_{\text{pen}}(x_{i}, x_{j}, \tilde{x}_{i,j}) = \delta(3 \tilde{x}_{i, j} + x_{i} x_{j} - 2 \tilde{x}_{i, j} x_{i} - 2 \tilde{x}_{i, j} x_{j}). $$
(10)
It is easy to see that Epen = 0 if \( \tilde {x}_{i, j} = x_{i} \land x_{j} \), while Epenδ if \( \tilde {x}_{i, j} \ne x_{i} \land x_{j} \) (Biamonte 2008; Leib et al. 2016).
To be specific, consider a 3-body term as Jx1x2x3. Using the previously introduced AND embedding, this term can be rewritten using an ancillary qubit \(\tilde {x}_{23}\) as
$$ J x_{1} x_{2} x_{3} \equiv J x_{1} \tilde{x}_{23} + \delta(3\tilde{x}_{23} + x_{2} x_{3} - 2 \tilde{x}_{23} x_{2} - 2\tilde{x}_{23} x_{3}), $$
(11)
where the equivalence is intended as equality between corresponding L = 8 lowest energy levels. This is pictorially represented in Fig. 1.
Fig. 1

Visual representation of the AND embedding of Eq. 11. On the left, the graph representing the original 3-body term Jx1x2x3. On the right, the graph corresponding to the decomposed Hamiltonian with maximum 2-body interactions, including penalties. Blue and red circles represent the original and the ancillary qubits, respectively. Blue lines represent coupling strength J; solid red lines represent − 2δ and dotted red lines δ

3 A genetic algorithm for optimizing Hamiltonian free parameters

This section is devoted to present the application of genetic algorithms for finding the free parameters useful for mapping p-body interacting systems in the 2-body Hamiltonian. Genetic algorithms are population-based meta-heuristics which try to solve an optimization (or search) problem by manipulating a multi-set of potential solutions and reproducing the natural selection process involving living beings. In detail, as natural selection process leads to the survival of only the fittest individuals (i. e., those capable of adapting to the changing environment), so the genetic algorithms perform an evolution process that leads to the survival of only the fittest solutions (i. e., those that better solve the optimization problem). Specifically, genetic algorithms operate on encoded representations of the solutions, called chromosomes. To determine how good a solution is, a method named fitness function is used to reflect the capability of the solution to solve the problem. In general, the workflow of a genetic algorithm includes the following steps. Firstly, a population of chromosomes is generated randomly and evaluated by using the fitness function. Successively, the algorithm performs a set of generations until some termination criteria are satisfied. In each generation, a set of chromosomes is selected to survive (parent selection mechanism) and reproduce by means of the crossover operator. Generally, this operator takes in input two chromosomes (parent) and gives in output two new chromosomes (offspring) by exchanging portions of the parents. As in the natural evolution process, some mutations can occur. The mutation operator performs by randomly changing some of the genes in the chromosomes. Both mutation and crossover operators are stochastic procedures that are applied according to a probability, named mutation probabilitypmut and crossover probabilitypcx, respectively. As for the termination criteria, the most common one is the achievement of a maximum number of generations. Therefore, in this paper, we use this termination criterion.

Starting from this description, in order to implement a genetic algorithm for our problem, it is necessary to define the chromosome structure, the fitness function, and the used genetic operators. Hereafter, a detailed description of the genetic algorithm components is given.

3.1 Chromosome structure

The chromosome must encode the solution of our problem, that is the set of Hamiltonian free parameters Eq. 6. In order to achieve this aim, the chromosome structure has been defined as follows:
$$ \mathbf{v} \equiv (c_{0}, c_{1}, \dots, c_{{M}}, d_{1, 2}, d_{1, 3}, \dots, d_{{M} - 1, {M}}). $$
(12)
The length of the defined chromosome is D = (M2 + M + 2)/2. The values for the genes belong to the range [− 10,10]. This choice is motivated by the fact that, in the analyzed cases, the genes of the chromosome v are strictly included within these bounds, except for the penalties that are not subject to the same constrictions.

3.2 Fitness function

The fitness function is used to evaluate the quality of the candidate solutions encoded in the chromosomes. It is implemented by taking into account Ep and \( E_{\text {p}}^{\prime } \) reported in Eqs. 1 and 6, respectively. In detail, firstly, we list all possible configurations with N qubits, for the starting model, and with M qubits, for the effective one. Conventionally, we arrange qubits of the effective model so that ancillae are at the beginning of the sequence. Secondly, we apply Ep and \( E_{\text {p}}^{\prime } \) for each combination, sort the corresponding energies in ascending order, and perform the differences. Formally, the fitness function F is defined as follows:
$$ F = \frac{1}{L}\sum\limits_{i = 1}^{L} {\left[(E_{\text{p}})_{i} - (E_{\text{p}}^{\prime})_{i}\right]}^{2} + E_{\text{pen}}^{\text{vec}}, $$
(13)
with L = 2N. The first term enforces equality between corresponding eigenvalues, while the second one is a penalty cost to be applied when the eigenvectors of the effective Hamiltonian are ordered differently than the original ones. We do not apply penalties when eigenvectors are ordered differently within symmetry subspaces of the original Hamiltonian. In our code, \( E_{\text {pen}}^{\text {vec}} = l \delta \), where l is the number of unsorted configurations.

3.3 Genetic operators

Once defined the chromosome structure and the fitness function, it is necessary to discuss about the genetic operators, that is, crossover, mutation, and selection mechanism. In the literature, different kinds of crossover, mutation, and selection operators have been defined (Yao 1993; Herrera et al. 2003). However, when a new problem is addressed with genetic algorithms, it is necessary to select the most opportune configuration for these operators. For this reason, in this paper, we perform a design study of the implemented genetic algorithm aimed at selecting the most opportune configuration for the problem at issue. In detail, this study has involved the investigation of two different crossover operators, that is, the one-point crossover and the two point-crossover, different Gaussian distributions for mutation operator, and different values for tournament size for the selection mechanism. The results of this design study are reported in the next section. To conclude, in this section, we give more details about the investigated genetic operators.

Crossover operators.

Generally, the crossover operator works by combining portions of two chromosomes, denoted as parents. In this work, we investigate two different strategies, i. e., one- and two-point crossovers. In detail, the one point crossover chooses a random number r in the range [1,D − 1] (with D the length of the chromosome), and then splits both parents at this point by creating the two children by exchanging the tails. Instead, the two-point crossover chooses two random numbers r1 and r2 in the range [1,D − 1] and breaks parents in these two points by creating the children by taking alternative segments from the parents.

Mutation.

Generally, the mutation operator works by changing values of chromosome genes randomly. The Gaussian mutation chooses values drawn from a Gaussian distribution with zero mean and standard deviation σ. In this work, we investigate several values for σ, i. e., σ = 0.2,0.4,0.6,0.8,and 1.0.

Selection.

Selection mechanism is devoted to select the chromosomes that will become parents of the next generation. One of the most known selection operators is the tournament mechanism which selects each parent by performing a tournament among NT chromosomes, randomly selected, where the chromosome that wins is the fittest one. In this work, we investigate NT = 2,3,and 5.

4 Preliminary experiments and results

This section is devoted to show the results of some preliminary experiments carried out to demonstrate the feasibility of the proposed approach. In detail, the designed genetic algorithm is applied to solve two simple configurations of the ferromagnetic p-spin model. This choice is due to the possibility to analytically solve these configurations and perform a comparison with the output of the genetic algorithm. The configuration of the applied genetic algorithm is the result of a design study involving the genetic operators described in Section 3.3. The comparison between the solution obtained by the designed genetic algorithm and that computed analytically is carried out by considering the energy eigenvectors and eigenvalues of the first 2N Hamiltonian states, as well as the Hamiltonian free parameters. Moreover, the use of the solution obtained by the genetic algorithm is investigated for the adiabatic quantum computation with respect to the original p-spin model. Hereafter, more details about the considered configurations of the ferromagnetic p-spin model, the design study, the comparison results, and the exploitation of genetic solutions in the adiabatic quantum computation are given.

4.1 Experimental setup

To perform our experimentation, we consider the simplest configurations of the ferromagnetic p-spin model which require the minimum number of ancillary qubits for embedding, e. g., N = 3,p = 3 and N = 4,p = 3. The Hamiltonian of the former one only contains a single 3-body term, which can be decomposed as described in Eq. 11 with a single ancilla, i. e., \(\tilde {x}_{23} = x_{2} \land x_{3}\) and hence M = 4. By contrast, the Hamiltonian for the N = 4 case contains four 3-body terms, which require two ancillae, i. e., \(\tilde {x}_{12} = x_{1} \land x_{2}\) and \(\tilde {x}_{34} = x_{3} \land x_{4}\), to be decomposed as described in Section 2, i. e., M = 6. The reduction process leads to the graph represented in Fig. 2.
Fig. 2

Graph representing the effective 2-body model for the p-spin Hamiltonian with N = 4 and p = 3, originally containing four 3-body terms. Blue and red circles represent the original and the ancillary qubits, respectively. Blue lines represent coupling strength J, solid red lines represent − 2δ and dashed red lines δ

These two cases are selected because it is possible to work out by hand the analytic solution for these settings with little effort and, this is useful for carrying out the comparison study with the designed genetic algorithm. We report the analytic solutions below.

$$ \begin{array}{@{}rcl@{}} \mathbf{v}_{{M}=4} &\equiv& \left( -3, -3\delta, \frac{26}{9}, \frac{26}{9}, \frac{26}{9}, 2\delta, 2\delta, \frac{16}{3}, -\frac{8}{3}-\delta, -\frac{8}{3}, -\frac{8}{3}\right); \end{array} $$
(14)
$$ \begin{array}{@{}rcl@{}} \mathbf{v}_{{M}=6} &\equiv&\left( -4, -3\delta, -3\delta, \frac{7}{2}, \frac{7}{2}, \frac{7}{2}, \frac{7}{2}, 0, 2\delta, 2\delta,\right.\\ && \left. 3, 3, 3, 3, 2\delta, 2\delta, -3-\delta, -3, -3, -3, -3, -3-\delta\vphantom{-4, -3\delta, -3\delta, \frac{7}{2}}\right). \end{array} $$
(15)
In what follows, we will fix δ = 50 as this number provides a large separation between the largest eigenvalue of the target subspace and the smallest eigenvalue of the nonphysical one, in both cases.

4.2 Design study

In order to select the best configuration for genetic operators, we perform a design study by considering the operators described in Section 3.3. By using 2 different crossover operators, 5 different mutation operators and 3 different selection operators, our design study involves the assessment of 30 different combinations. Table 1 gives an index to the different combinations. As for the other parameters of the genetic algorithm, in our experimentation, we set Npop = 20 chromosomes, the crossover probability pcx = 0.4, and the mutation probability pmut = 0.7. This choice is not typical, as usually pmut < pcx. However, the results we discuss below are qualitatively independent on these two parameters. The termination criterion is the achievement of a number of generations, i. e., Ng = 25,000.
Table 1

Combinations of genetic operators investigated in the design study. 1P (2P) stands for one-point (two-point) crossover

No.

Crossover

σ

NT

No.

Crossover

σ

NT

1

1P

0.2

2

16

2P

0.2

2

2

1P

0.2

3

17

2P

0.2

3

3

1P

0.2

5

18

2P

0.2

5

4

1P

0.4

2

19

2P

0.4

2

5

1P

0.4

3

20

2P

0.4

3

6

1P

0.4

5

21

2P

0.4

5

7

1P

0.6

2

22

2P

0.6

2

8

1P

0.6

3

23

2P

0.6

3

9

1P

0.6

5

24

2P

0.6

5

10

1P

0.8

2

25

2P

0.8

2

11

1P

0.8

3

26

2P

0.8

3

12

1P

0.8

5

27

2P

0.8

5

13

1P

1.0

2

28

2P

1.0

2

14

1P

1.0

3

29

2P

1.0

3

15

1P

1.0

5

30

2P

1.0

5

Genetic algorithms are stochastic procedures; thus, we repeat the simulation 100 times for every combinations.

The comparison among all the different combinations of genetic operators is shown in the boxplot of Fig. 3. In detail, boxplots show the minimum, the maximum, the median, and the likely range of variation of the fitness values over the 100 runs. However, in order to select the most opportune combination, the median fitness values are compared.
Fig. 3

Box graphs depicting the distribution of fitness values for different combinations of the genetic operators. For each combination, the black line inside the box corresponds to the median over 100 runs of the genetic algorithm. Outliers are explicitly indicated using black crosses. The indexes of the combinations on the x-axis are tabulated in Table 1

By analyzing Fig. 3, for N = 3, M = 4, the best median of the fitness values (the minimum one) is the combination 18, i. e., the combination involving the two-point crossover, the Gaussian mutation with σ = 0.2 and tournament selection with NT = 5. Instead, for N = 4 and M = 6, the configuration 2 is the one yielding the smallest median fitness value, i. e., the combination involving one-point crossover, σ = 0.2 and NT = 3.

4.3 Results

Once performed 100 runs of the genetic algorithm with configuration 18 for N = 3, M = 4 and 100 runs with configuration 2 for N = 4, M = 6, we obtain 100 solutions for N = 3, M = 4 and 100 solutions for N = 4, M = 6. As an example, Fig. 4 shows the fitness values against the number of generations for the genetic algorithm with configuration 18 used to address N = 3, M = 4 problem.
Fig. 4

Updating of the fitness values through 25,000 generations, for the case N = 3, M = 4, and for the best combination of genetic operators, i. e., combination 18 in Table 1. The final fitness value at the last generation is F = 9.8799 ⋅ 10− 8

To compare the solutions obtained by the genetic algorithm and the analytically computed ones for both considered configurations of the ferromagnetic p-spin model, we select the best chromosome (i. e., the one with the least fitness value) among all solutions over 100 runs. The comparison is carried out by considering the computed Hamiltonian free parameters, but also the energy eigenvectors and eigenvalues of the first 2N states of the embedded Hamiltonian generated by the genetic algorithm with that of the original Hamiltonian in Eq. 1. Tables 2 and 3 show the results of this comparison for N = 3, M = 4 and N = 4, M = 6, respectively. For N = 3, M = 4, the first qubit in the genetic eigenvector is the ancilla qubit defined as q0 = q1q2. For the case N = 4 and M = 6, the first two qubits of the sequence are the two ancillae, defined as q0 = q2q3 and q1 = q4q5. In addition, the first 2N genetic eigenvectors always respect the original degeneracies of the starting spectrum. Moreover, we also observe the sign-flip pattern in the spectrum, as predicted by the Z2 anti-symmetry of this model for odd p.
Table 2

The results of the comparison between the best chromosome obtained by the genetic algorithm and the analytically computed solution for N = 3, M = 4 problem. We fixed δ = 50

Free parameters

Eigenvectors

Eigenvalues

Analytic

Genetic

Analytic

Genetic

Analytic

Genetic

− 3

− 2.99919

[0, 0, 0]

[0, 0, 0, 0]

− 3.00000

− 2.99919

− 150

− 150.853

[0, 0, 1]

[0, 1, 0, 0]

− 0.11111

− 0.11138

26/9

2.88781

[0, 1, 0]

[0, 0, 0, 1]

− 0.11111

− 0.11129

26/9

2.88795

[1, 0, 0]

[0, 0, 1, 0]

− 0.11111

− 0.11124

26/9

2.88790

[0, 1, 1]

[1, 1, 1, 0]

0.11111

0.11111

100

100.720

[1, 0, 1]

[0, 1, 0, 1]

0.11111

0.11120

100

101.118

[1, 1, 0]

[0, 0, 1, 1]

0.11111

0.11120

16/3

5.33174

[1, 1, 1]

[1, 1, 1, 1]

3.00000

2.99999

− 158/3

− 53.6496

    

− 8/3

− 2.66531

    

− 8/3

− 2.66545

    
Table 3

The results of the comparison between the best chromosome obtained by the genetic algorithm and the analytically computed solution for N = 4, M = 6 problem. We fixed δ = 50

Free parameters

Eigenvectors

Eigenvalues

Analytic

Genetic

Analytic

Genetic

Analytic

Genetic

− 4

− 3.99450

[0, 0, 0, 0]

[0, 0, 0, 0, 0, 0]

− 4.0

− 3.99450

− 150

− 148.165

[0, 0, 0, 1]

[0, 0, 0, 0, 1, 0]

− 0.5

− 0.53947

− 150

− 144.833

[0, 0, 1, 0]

[0, 0, 1, 0, 0, 0]

− 0.5

− 0.52837

7/2

3.46613

[0, 1, 0, 0]

[0, 0, 0, 0, 0, 1]

− 0.5

− 0.47565

7/2

3.54304

[1, 0, 0, 0]

[0, 0, 0, 1, 0, 0]

− 0.5

− 0.45146

7/2

3.45503

[0, 0, 1, 1]

[1, 0, 1, 1, 0, 0]

− 0.0

− 0.03157

7/2

3.51886

[0, 1, 0, 1]

[0, 0, 0, 1, 0, 1]

− 0.0

− 0.02561

0

− 0.02015

[0, 1, 1, 0]

[0, 0, 1, 0, 0, 1]

− 0.0

− 0.01985

100

96.397

[1, 0, 0, 1]

[0, 0, 1, 0, 1, 0]

− 0.0

− 0.01965

100

95.7088

[1, 0, 1, 0]

[0, 0, 0, 1, 1, 0]

− 0.0

0.00748

3

2.98789

[1, 1, 0, 0]

[0, 1, 0, 0, 1, 1]

− 0.0

0.04105

3

3.12228

[0, 1, 1, 1]

[1, 0, 1, 1, 1, 0]

0.5

0.46894

3

2.91879

[1, 0, 1, 1]

[0, 1, 1, 0, 1, 1]

0.5

0.46932

3

3.04070

[1, 1, 0, 1]

[1, 0, 1, 1, 0, 1]

0.5

0.50621

100

97.8836

[1, 1, 1, 0]

[0, 1, 0, 1, 1, 1]

0.5

0.53568

100

97.9453

[1, 1, 1, 1]

[1, 1, 1, 1, 1, 1]

4.0

4.00773

− 53

− 58.5698

    

− 3

− 2.94631

    

− 3

− 3.01034

    

− 3

− 2.99610

    

− 3

− 3.09301

    

− 53

− 56.9343

    
An indicator of the accuracy of the returned solution is the root mean square
$$ \text{rms} \equiv \sqrt{\frac{1}{D} \sum\limits_{i = 1}^{D} {\left( \frac{v_{i}^{\text{analytic}} - v_{i}^{\text{genetic}}}{v_{i}^{\text{analytic}}}\right)}^{2}}. $$
(16)
In the N = 3 case, the best solution yields rms ≈ 7.2 ⋅ 10− 3, while for N = 4, we have rms ≈ 0.22. The scaling of the accuracy of the best returned solution as a function of the input size is a serious question that will be addressed in a forthcoming paper. However, we observe that the analytic solution is qualitatively well-reproduced by the genetic algorithm in both cases.

4.4 Discussion for adiabatic quantum computation

The genetic 2-body model can be used for adiabatic quantum computation, with the time-dependent Hamiltonian of Eq. 3, and compared with the original p-spin model, or with the analytic 2-body model. In this last part, we focus on N = 3, M = 4 for computational ease. We performed the same analysis also for N = 4, M = 6 with similar results. For the purpose of quantum optimization, it is paramount that the fidelity Φ, i. e., the ground state occupation probability at the end of the annealing (s = 1), is large. Of course, due to the larger number of degrees of freedom of the effective model with ancillae, we expect that a slower annealing is needed to reach the target ground state, compared with the original p-spin model.

First, we compare the low part of the instantaneous spectra of the two models in Fig. 5, using δ = 11 for visual clarity. We observe that the first 2N = 8 states match at s = 1, though they differ for 0 < s < 1. Higher excited states, subject to penalty, are significantly separated from the lower ones.
Fig. 5

Instantaneous eigenvalues of the time-dependent Hamiltonian Eq. 3, for \( s \in \left [0, 1\right ] \), with δ = 11 for sake of clarity. Panel a is for the p-body ferromagnetic p-spin model in Eq. 2; panel b is for the genetic 2-body Hamiltonian in Eq. 5, for the first L = 11 states. At s = 1, the first 2N states are the same for the two models, whereas higher (penalized) energy levels are separated from the low part of the spectrum. Increasing δ will increase this separation

Second, we classically simulate a quantum evolution of annealing time tf = 100, and compare the evolution of the ground state occupation probability of the genetic model with those of the original p-spin model and of the analytic 2-body model of Eq. 14. Results are shown in Fig. 6. The ground state population of the effective model evolves differently that the original one. This is not surprising, as the goal of our genetic algorithm is to match the final spectrum, irrespective of the instantaneous dynamics. By contrast, the evolution of the genetic model closely resembles that of the analytic 2-body model. The fidelity at the end of the evolution is large (Φ ≈ 0.994 and Φ ≈ 0.993 for the analytic and the genetic 2-body Hamiltonians, respectively), although not as large as that of the original model (Φ ≈ 0.99998) for this choice of tf. This can be justified by the adiabatic condition.
Fig. 6

Evolution of the ground state occupation probability as a function of the dimensionless time s, for the original p-spin model with N = 3 (black line), the analytic 2-body model of Eq. 14 (red line), and the best genetic solution (blue line).

In fact, a common adiabatic criterion states that the evolution time must satisfy the following condition,
$$ t_{\text{f}} \gg \max_{a, b, s} \frac{\left\langle{\epsilon_{a}(s) | H(s) | \epsilon_{b}(s)}\right\rangle}{{\Delta}^{2}}, $$
(17)
where |𝜖a(s)〉 are the instantaneous eigenstates of H(s) (Albash and Lidar 2018). The introduction of ancillary qubits with large energy penalties δ for unphysical configuration makes the numerator of the right-hand side of Eq. 17 larger for the effective model than for the original p-spin model, while the minimal gap is similar for both models. For the cases we analyzed, the adiabatic time scale of the effective model is \(\sim \delta \) times longer than for the original model. Thus, it is natural to expect that, for fixed tf, the original model is closer to the adiabatic limit than the effective one, thus the corresponding fidelity is larger.

5 Conclusions and future research directions

Using a genetic algorithm, we have mapped the ferromagnetic p-spin Hamiltonian into a Hamiltonian with only 2-body interactions. We have shown, in two analytically solvable cases, that our strategy can successfully be used for this task. In fact, the energy eigenvalues and eigenvectors of the first 2N states of the original Hamiltonian are correctly reproduced, with rms (Eq. 16) of ≈ 1.19 × 10− 3 for the best combination of genetic operators for the case of M = 4. However, the considered configurations of the ferromagnetic p-spin model are the simplest ones. In the future, a wider experimentation involving higher configurations (i. e., larger integral values for N and p) will be carried out to show the benefits of our proposal, compared with other existing techniques (Tanahashi et al. 2019). Since higher configurations represent harder problem instances, dealing with them could require to change genetic algorithm parameters by increasing, for example, the population size or the number of maximum generations. Moreover, the complexity of dealing with higher configurations could open the doors to the application of new evolutionary algorithms such as memetic algorithms (Moscato 1989), i. e., population-based meta-heuristics combining global search with local search procedures. Finally, for larger systems, the required number of ancillae becomes nontrivial and, as a consequence, improvements should be done to address also this problem. We could also use our technique to predict the minimum number of ancillae required for the embedding, in the case of large systems where the analytical mapping could be cumbersome.

Genetic algorithms can have countless applications in the context of adiabatic quantum computation. These include the derivation of simpler effective models, or the optimization of adiabatic paths as in quantum optimal control (Rezakhani et al. 2009; del Campo and Kim 2019).

Notes

References

  1. Albash T, Lidar DA (2018) ., vol 90. https://doi.org/doi/10.1103/RevModPhys.90.015002
  2. Bapst V, Semerjian G (2012) . Journal of Statistical Mechanics: Theory and Experiment 2012(06):P06007. http://stacks.iop.org/1742-5468/2012/i=06/a=P06007 CrossRefGoogle Scholar
  3. Brell CG, Flammia ST, Bartlett SD, Doherty AC (2011) . New J Phys 13(5):053039.  https://doi.org/10.1088/1367-2630/13/5/053039 CrossRefGoogle Scholar
  4. Choi V (2008) . Quantum Inf Process 7(5):193.  https://doi.org/10.1007/s11128-008-0082-9 MathSciNetCrossRefGoogle Scholar
  5. Choi V (2011) . Quantum Inf Process 10(3):343.  https://doi.org/10.1007/s11128-010-0200-3 MathSciNetCrossRefGoogle Scholar
  6. Cook SA (1971) .. In: Proceedings of the 3rd annual ACM symposium on theory of computing. STOC ’71. ACM, New York, pp 151–158,  https://doi.org/10.1145/800157.805047, (to appear in print)
  7. del Campo A, Kim K (2019) . New J Phys 21(5):050201.  https://doi.org/10.1088/1367-2630/ab1437 CrossRefGoogle Scholar
  8. Farhi E, Goldstone J, Gutmann S, Sipser M (2000) . arXiv:quant-ph/0001106
  9. Goldberg DE, Holland JH (1988) . Mach Learn 3(2):95.  https://doi.org/10.1023/A:1022602019183 CrossRefGoogle Scholar
  10. Grover LK (1996) In Proceedings of the Twenty-eighth annual ACM symposium on theory of computing (ACM, 1996), STOC ’96, pp 212–219. http://doi.acm.org/10.1145/237814.237866
  11. Hardy Y, Steeb W H (2010) . Int J Modern Phys C 21(11):1359CrossRefGoogle Scholar
  12. Harris R, Berkley A J, Johansson J, Bunyk P, Chapple E M, Enderud C, Hilton J P, Karimi K, Ladizinsky E, Ladizinsky N, Oh T, Perminov I, Rich C, Thom M C, Tolkacheva E, Truncik C J S, Uchaikin S, Wang J, Wilson B, Rose G (2011) . Nature 473:194CrossRefGoogle Scholar
  13. Hauke P, Katzgraber H G, Lechner W, Nishimori H, Oliver WD (2019) . arXiv:1903.06559
  14. Herrera F, Lozano M, Sánchez AM (2003) . International Journal of Intelligent Systems 18:309CrossRefGoogle Scholar
  15. Leib M, Zoller P, Lechner W (2016) . Quantum Sci Technol 1(1):015008.  https://doi.org/10.1088/2058-9565/1/1/015008 CrossRefGoogle Scholar
  16. Moscato P (1989) Caltech concurrent computation program. C3P Report 826:1989Google Scholar
  17. O’Driscoll L, Nichols R, Knott PA (2019) Quantum Machine Intelligence.  https://doi.org/10.1007/s42484-019-00003-8 CrossRefGoogle Scholar
  18. Ohkuwa M, Nishimori H, Lidar DA (2018) . Phys Rev A 98:022314. https://doi.org/doi/10.1103/PhysRevA.98.022314 CrossRefGoogle Scholar
  19. Passarelli G, De Filippis G, Cataudella V, Lucignano P (2018) . Phys Rev A 97:022319. https://doi.org/doi/10.1103/PhysRevA.97.022319 CrossRefGoogle Scholar
  20. Passarelli G, Cataudella V, Lucignano P (2019) Improving quantum annealing of the ferromagnetic p-spin model through pausing. Phys Rev B 100(2):024302.  https://doi.org/10.1103/PhysRevB.100.024302. https://doi.org/doi/10.1103/PhysRevB.100.024302 CrossRefGoogle Scholar
  21. Passarelli G, De Filippis G, Cataudella V, Lucignano P. (2019) . arXiv:1901.07787
  22. Rezakhani A T, Kuo W J, Hamma A, Lidar D A, Zanardi P (2009) . Phys Rev Lett 103:080502.  https://doi.org/10.1103/PhysRevLett.103.080502 CrossRefGoogle Scholar
  23. Seki Y, Nishimori H (2012) . Phys Rev E 85:051112. https://doi.org/doi/10.1103/PhysRevE.85.051112 CrossRefGoogle Scholar
  24. Seoane B, Nishimori H (2012) . Journal of Physics A: Mathematical and Theoretical 45(43):435301. http://stacks.iop.org/1751-8121/45/i=43/a=435301 MathSciNetCrossRefGoogle Scholar
  25. Susa Y, Yamashiro Y, Yamamoto M, Hen I, Lidar DA, Nishimori H (2018) . Phys Rev A 98:042326. https://doi.org/doi/10.1103/PhysRevA.98.042326 CrossRefGoogle Scholar
  26. Tanahashi K, Takayanagi S, Motohashi T, Tanaka S (2019) . Journal of the Physical Society of Japan 88(6):061010.  https://doi.org/10.7566/JPSJ.88.061010 CrossRefGoogle Scholar
  27. Yao X (1993) . Microprocessing and Microprogramming 38(1):707.  https://doi.org/10.1016/0165-6074(93)90215-7. http://www.sciencedirect.com/science/article/pii/0165607493902157. Proceedings Euromicro 93 Open System Design: Hardware, Software and ApplicationsMathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Dipartimento di Fisica “E. Pancini”Università di Napoli Federico IINaplesItaly
  2. 2.CNR-SPINNaplesItaly
  3. 3.Istituto Nazionale di Fisica NucleareSezione di NapoliNaplesItaly

Personalised recommendations