Available via license: CC BY 4.0

Content may be subject to copyright.

Folding lattice proteins with quantum annealing

Anders Irb¨ack,1, ∗Lucas Knuthson,1Sandipan Mohanty,2and Carsten Peterson1

1Computational Biology & Biological Physics,

Department of Astronomy, and Theoretical Physics,

Lund University, Box 43, SE-221 00 Lund, Sweden

2Institute for Advanced Simulation, J¨ulich Supercomputing Centre,

Forschungszentrum J¨ulich, D-52425 J¨ulich, Germany

(Dated: May 13, 2022)

Abstract

Quantum annealing is a promising approach for obtaining good approximate solutions to diﬃcult

optimization problems. Folding a protein sequence into its minimum-energy structure represents

such a problem. For testing new algorithms and technologies for this task, the minimal lattice-based

HP model is well suited, as it represents a considerable challenge despite its simplicity. The HP

model has favorable interactions between adjacent, not directly bound hydrophobic residues. Here,

we develop a novel spin representation for lattice protein folding tailored for quantum annealing.

With a distributed encoding onto the lattice, it diﬀers from earlier attempts to fold lattice proteins

on quantum annealers, which were based upon chain growth techniques. As a result, our approach

naturally implements self-avoidance, performs very well in terms of solution quality, and has better

scaling properties with chain length. Moreover, the encoding is robust to changes in the parameters

required to constrain the spin system to chain-like conﬁgurations. The results are evaluated against

existing exact results for HP chains with up to N= 30 beads with 100% hit rate thereby also

outperforming classical simulated annealing. The method also allows us to recover the lowest

known energy for an N= 64 HP chain. These results are obtained by the commonly used hybrid

quantum-classical approach. For pure quantum annealing, our method successfully folds an N= 14

HP chain. The calculations were performed on a D-Wave Advantage quantum annealer.

∗anders.irback@thep.lu.se

1

arXiv:2205.06084v1 [quant-ph] 12 May 2022

I. INTRODUCTION

Quantum computers with their interacting qubits as basic units appear very promising

for optimization problems with binary variables such as those present in spin systems. These

technologies are being developed along two main tracks: quantum annealers [1] and gate-

based systems [2]. In quantum annealing (QA) [3–5], the idea is to encode the solution to a

given optimization problem in the ground state of a Hamiltonian and eﬃciently locate the

energy minimum by exploiting quantum ﬂuctuations and tunneling, in analogy with the role

played by thermal ﬂuctuations in classical simulated annealing (SA) [6]. Mapping diﬃcult

binary optimization problems onto Ising spin glass systems goes back to the eighties in the

context of neural networks [7, 8]. For a recent review, see Ref. [9]. In the context of QA,

this approach is called quadratic unconstrained binary optimization (QUBO).

Protein folding, going from sequence to structure by minimizing an energy function, rep-

resents a diﬃcult optimization problem. Simpliﬁed lattice-based models for this problem can

often provide qualitatively relevant results, but remain computationally challenging and are

therefore ideal testbeds for novel algorithms. A pioneering QUBO formulation of the folding

problem for lattice proteins was given by Perdomo and coworkers [10]. They considered the

HP model [11], where proteins are represented by linear chains of Nhydrophobic (H) or

polar (P) beads, residing on a lattice. Their binary variables encoded bead coordinates on

the lattice, which led to a relatively large number of required qubits even for short chains

but a polynomial rather than exponential scaling with N.

An early attempt to fold a short lattice protein (N= 6) by QA was carried out on

a D-Wave (D-Wave Systems Inc.) machine [12]. This implementation relied on a growth

algorithm, where turns along the chain were mapped onto qubits. This encoding is resource-

eﬃcient for very short chains, but scales exponentially with N. Recent work implemented

on an IBM gate-based quantum computer used a similar encoding [13], again for a short

protein chain (N= 7). These growth algorithms oﬀer a compact chain representation, at

the cost of making interactions such as self-avoidance diﬃcult to implement. For a recent

review of lattice protein folding on quantum computers, see Ref. [14].

In contrast to Refs. [12, 13], here we propose a diﬀerent type of mapping, in which

all sites of the lattice on which the protein lives host qubits. The approach was inspired

by recent D-Wave applications for homopolymers [15], and shares some similarities with a

2

QUBO formulation for lattice heteropolymers [16] which, to our knowledge, has not yet been

implemented. The energy Eis such that its minimization makes the values of the qubits

coalesce to a ﬁnite set of active qubits deﬁning the desired folded structure. Importantly

from the viewpoint of QA, the entire function E, including a self-avoidance term, is mani-

festly quadratic, or two-local, in the binary spin variables. This fully distributed dynamical

encoding method can be considered as a clustering approach driven by requiring a legal

chain on the lattice. It is also somewhat reminiscent of a molecular ﬁeld theory [17] where

the ﬁelds reside on a lattice and give rise to structures through their dynamics.

We evaluate the performance of our approach using the two-dimensional HP model [11]

as a testbed. In particular, we consider a set of sequences with up to 30 beads, for which

the exact solutions are known from exhaustive enumerations of all structures [18, 19]. In

addition, we present results obtained for two longer sequences [20] with 48 and 64 beads,

respectively, which have been studied by various classical methods.

In what follows, we ﬁrst brieﬂy describe the HP model and then map the energy mini-

mization problem for HP sequences to a QUBO problem. We then evaluate our encoding

using both classical SA and explorations performed on the D-Wave Advantage quantum

annealer, with over 5,000 qubits and 15-way qubit connectivity [21].

II. METHODS

A. HP lattice proteins

We consider the minimal lattice-based HP model for protein folding [11], in which the

protein is represented by a self-avoiding chain of hydrophobic (H) or polar (P) beads on a

lattice. Two beads are said to be in contact if they are nearest neighbors on the lattice but not

along the chain. A given chain conﬁguration is assigned an energy deﬁned as EHP =−NHH ,

where NHH is the number of HH contacts [11]. With this choice of energy, low-energy

conﬁgurations tend to exhibit a hydrophobic core of H beads. Despite the simplicity of the

model, there are HP sequences with a unique ground state, and therefore a well-deﬁned

structure. In particular, on a 2D square lattice, it is known from exhaustive enumerations

that about 2% of all HP sequences with ≤30 beads have a unique ground state [18, 19].

3

FIG. 1. Illustration of a hypothetical evolution of the binary model described in Sec. II B for the

6-bead sequence HPHPPH. Circles represent beads, and numbers indicate bead positions along

the sequence. By construction, odd/even beads can reside only on grey/white sites. (A) Early

stage. Typically, all the three constraints are violated (E1, E2, E3>0). (B) Intermediate stage.

Some but not all of the constraints are satisﬁed (in this example: E1=E2= 0, E3>0). (C) The

ﬁnal state, in this example corresponding to the desired minimum-energy structure of the given

sequence (EHP =−2, E1=E2=E3= 0).

B. Binary quadratic model for HP lattice proteins – QUBO encoding

Given an HP sequence (h1, . . . , hN), hi∈ {P,H}, we wish to determine its ground state

using QA. To this end, in this section, we present a binary encoding for HP lattice proteins,

assuming a square grid with L2sites.

Inspired by the binary representation of homopolymers of Ref. [15], rather than directly

encoding chain conﬁgurations, we introduce ﬁelds of binary variables along with penalty

terms, the latter of which serve to ensure that the ﬁnal binary ﬁeld conﬁgurations corre-

spond to proper chain conﬁgurations. To reduce the number of binary variables, we make a

checkerboard division of the lattice into even and odd sites, and use the fact that in a valid

chain conﬁguration all even (odd) beads share the same lattice site parity (see Fig. 1). As

a result, we may assume that even (odd) beads reside on even (odd) lattice sites. Thus, we

introduce one set of binary ﬁelds, σf

s, to describe the location of even beads, and another

set for odd beads σf0

s0. Here, the indices fand srun over even beads and sites, respectively,

while f0and s0run over odd beads and sites. We set σf

s= 1 if bead fis located on site s,

and σf

s= 0 otherwise. The odd ﬁelds σf0

s0are deﬁned in the same way. The division into

even and odd sites reduces the number of variables required from N×L2to ≈N×L2/2.

4

Having deﬁned the degrees of freedom, we now describe the energy function. In our

QUBO model, the total energy Ehas the form

E=EHP +

3

X

i=1

λiEi,(1)

where EHP is the energy of the HP model (see above) and the remaining three terms E1,E2

and E3are constraint energies. The strengths of the constraints are set by the parameters

λi.

Speciﬁcally, in terms of the binary ﬁelds, the four energies can be expressed as follows.

•The HP energy EHP =−NHH can be rewritten as

EHP =−X

|f−f0|>1

C(hf, hf0)X

hs,s0i

σf

sσf0

s0(2)

where the interaction strength C(hf, hf0) = 1 if hf=hf0= H and C(hf, hf0)=0

otherwise. In Eq. 2, the second sum runs over all nearest-neighbor pairs of sites,

hs, s0i. Such a pair always consist of one even and one odd site. The beads fand f0

must both be of type H for a non-zero energy contribution, and must not, with our

deﬁnition of a contact, be adjacent along the chain.

•The ﬁrst constraint energy, E1, is given by

E1=X

f X

s

σf

s−1!2

+{same for odd parity},(3)

and serves to ensure that each bead is located at exactly one lattice site.

•The energy E2makes the chain self-avoiding. It is given by

E2=1

2X

f16=f2X

s

σf1

sσf2

s+{same for odd parity},(4)

and provides an energy penalty whenever two beads occupy the same site.

•The ﬁnal energy, E3, has the form

E3=X

1≤f<N X

s

σf

sX

||s0−s||>1

σf+1

s0+{same with odd/even parity interchanged},(5)

and is responsible for connecting the beads to a chain. It provides an energy penalty

whenever two adjacent beads along chain are not nearest neighbors on the lattice.

5

Our model contains three parameters; λ1,λ2and λ3(Eq. 1). It is desirable that when

executing the model it is reasonably robust with respect to these parameters. This will turn

out to be the case in Sec. III when exploring the method.

As indicated in Sec. I, the above binary model shares similarities with the “diamond”

encoding proposed in Ref. [16]. The latter method is able to reduce the number of binary

variables required for very short chains, by ﬁxing the position of the ﬁrst bead and using the

fact that odd and even beads can be assumed to belong to diﬀerent “diamond” layers. For

long chains, our choice of a freely moving chain on a simple odd/even checkerboard is more

resource-eﬃcient, because, in general, the search for the ground state can be carried out

on a smaller grid if the chain is freely moving. Our constraint energies Eialso diﬀer from

those of Ref. [16]. In our case, all three constraint energies are manifestly non-negative for

both physical and unphysical spin conﬁgurations, which makes our method more robust to

changes in the strength parameters λi. Since the encoding in Ref. [16] was never explored,

a robustness analysis is not available.

C. Simulated annealing

Before turning to QA, we tested this QUBO model using SA, with the system deﬁned

by the partition function Z=P{σf

s,σf0

s0}e−βE , where βdenotes inverse temperature and E

is given by Eq. 1. All runs spanned the same set of 25 temperatures, given by β0= 1 and

βi+1 = 1.05βi. At each temperature, 104sweeps were performed, where one sweep comprises,

on average, one attempted update per spin variable. The updates were single-spin ﬂips,

controlled by a Metropolis acceptance criterion. All runs were started from random initial

spin conﬁgurations, and used a 102grid.

For comparison, we also conducted SA runs based on the conventional explicit-chain

representation of the HP model. Here, the energy was given by EHP, without the constraint

terms. The set of temperatures was the same as in the QUBO SA runs. The simulations used

three Metropolis-type elementary moves: local one- and two-bead updates, and a non-local

pivot update. At each temperature, 105sweeps were performed, with one sweep consisting

of N−1 one-bead moves, N−2 two-bead moves and one pivot move. The chains were not

conﬁned to a ﬁnite-size grid.

The QUBO SA simulations were run on a standard desktop computer. For N= 30, each

6

QUBO SA run required 21 CPU-core-seconds, whereas each explicit-chain SA run required

5 CPU-core-seconds. To gather statistics, for each sequence, we performed 1000 runs with

each method, using diﬀerent random number seeds.

D. Hybrid quantum-classical computations

D-Wave oﬀers access to solvers based solely on QA as well as hybrid quantum-classical

solvers. The hybrid approach uses classical solvers while sending suitable subproblems as

queries to the quantum processing unit (QPU). The solutions to the subproblems serve to

guide the classical solvers [22]. The goal is to speed up the solution of challenging QUBO

problems by queries to the QPU. With the hybrid approach, it is possible to tackle much

larger problems, with many thousands of fully connected variables, than what can be dealt

with using QA alone.

We conducted hybrid quantum-classical computations for HP chains with up to 64 beads,

using D-Wave’s hybrid solver services using a D-Wave Advantage quantum computer. All

sequences were folded on a 102grid. For N= 64 (N= 30), each hybrid run required 8 (4)

seconds. To gather statistics, we performed 200 runs for the 64-bead sequence, and 100 runs

for each of the other sequences.

E. Pure QPU computations

The 5000-qubit Advantage machine uses a Pegasus topology with a connectivity of 15 [21].

Thus, in order to solve a problem with higher connectivity, it has to be embedded into

the Pegasus graph. This embedding is done by forming “chains” of qubits that act as

single qubits. The strength of the coupling between the qubits within a chain is a tunable

parameter, called the chain strength. This parameter is typically chosen slightly larger than

the minimum chain strength needed to avoid chain breaks.

D-Wave oﬀers several so-called samplers for ﬁnding embeddings into the QPU topology

and performing the QPU computation. We used the DWaveCliqueSampler, designed for

dense binary quadratic models. All the computations used a chain strength between 1 of

7.5 and the annealing time was set to τ= 2000 µs, its maximum allowed value. The number

of output reads per run, which must be <106/(τ/µs), was set to 490.

7

F. Testbed – HP sequences

As a testbed, we use a selected set of HP sequences with 14–30 beads, all of which are

known from exhaustive enumerations to have a unique minimum-energy structure [18, 19].

The sequences are labeled SN, where Nindicates the number of beads, and are shown in

Table A1.

A sequence having a unique minimum-energy structure is said to design that structure.

The number of diﬀerent sequences designing a given structure is called the designability of

the structure. Structures with high designability thus show robustness to mutation.

For a given N≤30, in most cases, the selected sequence SNis one of those that fold to

the structure with highest designability for that N.

The sequences SNcan be found in Table A1, along with their minimum energies, Emin .

Some of the corresponding structures are shown in Fig. A1.

III. RESULTS

Using the spin representation of Sec. II B, we wish to ﬁnd minimum-energy structures

of given HP sequences by minimizing the total energy E=EHP +PiλiEi(Eq. 1) on a

quantum annealer. As a ﬁrst step toward this goal, we investigate the power of the QUBO

approach under classical SA, and how it depends on the Lagrange parameters λi. We next

do the same using the hybrid quantum-classical solver. Finally, we compare the results by

using the QPU annealer only. We ﬁnd that the hybrid quantum-classical solver outperforms

all the other approaches listed above for our application.

A. Simulated annealing with QUBO encoding

In our binary model, the EHP energy can become substantially lower than it is in any

proper chain conformations. For this QUBO approach to work, it is therefore essential

that the λiparameters that force the solutions to be “legal” are suﬃciently large. On the

other hand, by choosing large λivalues, one risks making the energy landscape rugged, and

therefore the dynamics potentially slow. Hence, the λiparameters should be neither too

large nor too small.

8

FIG. 2. Run-time evolution of the HP energy EHP and the constraint energies E1,E2and E3

in a QUBO SA folding simulation for the 30-bead sequence S30 (Table A1) on 102grid, with

λ= (2.1,2.4,3.0).

To gain insight into the behavior of the binary model and its dependence on the λi

parameters, we conducted a set of classical Monte Carlo-based SA runs (Sec. II C), using

the HP sequences S18–S30 in Table A1. The runs had a ﬁxed length and were deemed

successful if the ﬁnal state corresponded to the known minimum-energy structure of the

given HP sequence. As expected, in order to have an acceptable hit rate, it was necessary

to choose the λiparameters with some care. Nevertheless, without excessive ﬁne-tuning,

it was possible to ﬁnd a single set of parameters, λ= (2.1,2.4,3.0), that gave a hit rate

>

∼0.1 for all the sequences S18–S30 (see below). We refrained from attempting any further

optimization of the parameters, as the optimal values need not be the same on a quantum

annealer. The optimal parameters would, of course, also depend on both HP sequence and

grid size.

Figure 2 shows the run-time evolution of the four diﬀerent energy terms in one of 1000

QUBO SA runs for the sequence S30. At the end of the run, all the three constraint energies

Eivanish, while EHP takes its known minimum value for an HP chain with this sequence

(Emin =−15). Hence, the ﬁnal spin conﬁguration corresponds to the S30 ground state in

the HP model. The hit rate, deﬁned as the fraction of runs ending in the ground state, was

0.226±0.013. The remaining runs ended in spin conﬁgurations that either did not correspond

to a proper chain, or corresponded to a structure with EHP > Emin. In the beginning of the

runs, the spin system undergoes a rapid relaxation, which brings the energies from initial

values EHP ∼ −103and λ1E1+λ2E2+λ3E3∼105to the plotted range before the ﬁrst

9

FIG. 3. Parameter dependence of the fraction of correct solutions (hit rate) in the vicinity of a

reference point λ∗, when using QUBO SA and hybrid quantum-classical computation to search

for the ground state of the S30 sequence (Table A1) on a 102grid. The hit rate is plotted against

∆λi=λi−λ∗

i, keeping λj=λ∗

jfor j6=i. Lines are drawn to guide the eye. (A) QUBO SA

with λ= (2.1,2.4,3.0). (B) Hybrid quantum-classical computations with λ= (2.0,3.0,3.0).Note

the diﬀerence in scale between the two panels, reﬂecting the diﬀerence in performance as shown in

Fig. 4.

measurement is taken (after 103sweeps). We note that among the three constraint energies,

E1and E3tend to relax much more slowly than E2, as is the case in Fig. 2. Note also that

the HP energy takes values EHP < Emin many times during the course of the run. Such

values can occur only when at least one constraint is broken.

Based on a limited set of preliminary runs, we chose λ=λ∗= (2.1,2.4,3.0) for this

QUBO SA run (Fig. 2). Figure 3(a) shows the parameter dependence of the hit rate in

the vicinity of λ∗, when changing one λiat a time. In all three parameters, the hit rate

stays tiny until a threshold is passed, followed by a steep increase to the maximum observed

hit rate, for λi=λ∗

i. When further increasing λibeyond λ∗

i, the hit rate decays, probably

due to an increasingly rugged energy landscape. This decay leads to an upper limit on the

parameter λ1, beyond which the hit rate is impractically small. By contrast, the hit rate

stays signiﬁcant even for λ2and λ3values much larger than those in Fig. 3(a). In fact,

setting λ2= 100 or λ3= 100, we still obtained hit rates of 0.132 ±0.011 and 0.074 ±0.008,

respectively. Hence, overall the parameter sensitivity is low, although λ1must be chosen

with some care.

10

The fact that the λ1dependence has a diﬀerent shape than the dependencies on λ2and

λ3can be, at least in part, understood. With the single-spin updates employed, the system

cannot move from one chain-like conﬁguration to another, both with E1=E2=E3= 0,

without visiting intermediate non-chain conﬁgurations with E1>0. By contrast, E2and

E3may stay zero during such a move. This observation suggests that the energy landscape

becomes rugged for large λ1, but not necessarily so for large λ2or λ3.

To explore how the performance of the QUBO SA approach depends on chain length,

we conducted calculations for all the HP sequences S18–S30 in Table A1, using λ=λ∗.

As expected, the measured hit rates show a decreasing trend with increasing N(Fig. 4).

However, the decrease is not monotonous, indicating that the hit rate is sequence-dependent

and not a simple function of N.

For comparison, we also carried out a set of direct SA minimizations of EHP based on

conventional explicit-chain Monte Carlo methods (Fig. 4). Despite being faster, the hit rate

is higher in these run than it is with QUBO-based SA. However, the diﬀerence in hit rate

is modest given that state space for explicit chains is tiny is comparatively tiny. Note the

similarities in shape between the hit rates obtained from these two unrelated sets of SA

calculations. These similarities suggest that some target structures are relatively easy or

diﬃcult to ﬁnd, independent of the method employed.

B. Hybrid quantum-classical computations

A promising alternative to pure QA is provided by hybrid quantum-classical methods, by

which larger systems can be studied. To assess the power of this approach, we conducted

hybrid computations for all the HP sequences studied in Sec. III A, S18–S30 (Table A1).

We additionally included a two longer sequences [20], which have been extensively used as

testbeds for various (classical) methods.

As in the SA case, with the hybrid solver, a rough search was suﬃcient in order to ﬁnd a

single λ,λ∗= (2.0,3.0,3.0), for which all the sequences S18–S30 could be correctly folded on

a 102grid. Figure 3(b) shows the parameter dependence of the hit rate near λ∗when using

the hybrid solver. Compared to QUBO SA (Fig. 3(a)), the measured hit rates are markedly

higher with the hybrid solver (Fig. 4). At the same time, the λidependencies share a similar

shape in both cases. In particular, in both cases, the hit rate is more sensitive to changes

11

FIG. 4. Fraction of correct solutions (hit rate) when searching for the ground state of HP chains

with 18 ≤N≤30 beads by using the D-Wave hybrid solver with QUBO encoding (blue), SA

with explicit chains (black) and SA with QUBO encoding (red). The HP sequences studied can

be found in Table A1. The parameters λwere set to (2.1,2.4,3.0) in the QUBO SA runs, and

to (2.0,3.0,3.0) when using the hybrid solver. All QUBO-based results were obtained using a 102

grid.

in λ1than to changes in λ2or λ3. As in the SA case, λ2or λ3can be chosen far above the

plotted range in Fig. 3, without any major loss in hit rate. In fact, when setting λ2= 100

or λ3= 100, we obtained hit rates of 0.980 ±0.014 and 0.54 ±0.05, respectively. Overall,

the parameter sensitivity is lower with the hybrid solver than with QUBO SA.

When comparing hit rates from our hybrid and QUBO SA runs for the sequences S18–S30,

we ﬁnd that it is consistently highest in the hybrid case (Fig. 4). In fact, the hit rate is one

across this entire set of sequences for the hybrid solver.

It is important to note that when folding the sequences S18–S30 , the hybrid solver did not

always make use of the QPU. The fraction of runs that used the QPU increased with Nand

was above one half for N > 21. Still, the precise contribution of the QPU to the ﬁnal results

is hard to judge since the details of the hybrid solver are not publicly available information.

Nevertheless, the impressive results obtained for these sequences motivated us to also test

the hybrid solver on two signiﬁcantly longer sequences, namely S48 and S64 (Table A1) with

48 and 64 beads, respectively.

For these two sequences exact results are not available, but both belong to a set of HP

sequences that have been widely used to test novel (classical) algorithms [20]. The lowest

12

FIG. 5. The minimum-energy structure from hybrid classical-quantum computations for the 64-

bead sequence S64 (Table A1), obtained using a 102grid and λ= (3.0,4.0,4.0). Filled and open

symbols indicate H and P beads, respectively. The energy is EHP =−42, which is the lowest

known energy for this sequence [24].

known energies are EHP =−23 for S48 [23] and EHP =−42 for S64 [24]. We performed

hybrid computations for both sequences on a 102grid. In order to obtain good results,

the λiparameters had to be adjusted. For S48 , the lowest known energy, EHP =−23, was

recovered in 10 of 100 hybrid runs, using λ= (2.0,3.5,3.0). For S64, with λ= (3.0,4.0,4.0),

a structure with the lowest known energy, EHP =−42, was obtained in 1 of 200 hybrid runs.

This folded structure is depicted in Fig. 5. Although the hit rate is low, it is encouraging

that the hybrid solver is able to locate this complex low-energy structure.

C. Pure QPU computations

The QUBO problem that we wish to solve for ﬁnding minimum-energy HP structures

contains ≈NL2/2 logical qubits. Moreover, the system is almost fully connected, implying

that its embedding into the QPU topology requires a signiﬁcant amount of additional qubits.

Therefore, pure QPU computation is eﬀectively limited to relatively short HP chains.

To explore how the performance of the pure QPU approach depends on system size, we

conducted computations for the six sequences S4, S6, S7, S8, S9and S10 (Table A1) for

various grid sizes. Figure 6(a) shows the fraction of all annealing cycles that recovered the

known minimum-energy structure, for these systems, plotted against the number of physical

13

qubits employed. The parameters λiand the annealing time were the same for all systems,

whereas the chain strength was chosen individually for each system, for best performance

(among the values 1.0, 1.5,. . . , 4.5, 5.0). Albeit with some scatter, the hit rate shows a

roughly exponential decay with system size. This system-size dependence is more severe

than the above-mentioned scaling of the number of qubits required, and remedies are being

explored [25].

The longest sequence that was successfully folded in our pure QPU computations was S14

with 14 beads (Table A1). This sequence, whose minimum-energy structure can be seen in

Fig. 6(b), was studied using a 42grid, which required 112 logical and 1214 physical qubits.

The chain strength was set to 7.5. To our knowledge, this is the largest protein succesfully

folded using a quantum computer. However, the ground state was only recovered in one of

a total of 100 ×490 annealing cycles. This number of cycles is larger than the number of

distinct conformations available to a chain with 14 beads on a 42grid, which is 416. On the

other hand, it is tiny compared to the 2112 ≈5.2×1033 states of the binary system, the vast

majority of which do not correspond to proper chain conﬁgurations. Finally, we note that

our S14 system is similar in size to the largest system solved in a recent benchmarking study

of the D-Wave Advantage machine using exact cover problems, which contained 120 logical

qubits [26].

It is possible that the pure QPU results can improved by further tuning of the simulation

parameters. However, at present, we conclude that pure QPU computation cannot match

classical SA or the hybrid quantum-classical approach (Secs. III A, III B).

IV. SUMMARY AND OUTLOOK

We have developed a novel mapping of the two-dimensional HP lattice protein model onto

a quantum annealer, which is successfully explored on the D-Wave Advantage system. This

simpliﬁed model for protein structures is known to represent a quite diﬃcult optimization

problem when determining structure using conventional classical methods. As benchmarks

for success, we used HP chains with sizes ranging from N= 4 to N= 30, for which the

exact solutions are known from exhaustive enumerations. For larger problems, with N= 48

and N= 64, we compared with the best known solutions obtained by classical means. The

approach allows us to explore the largest chains studied so far on a quantum annealer, and

14

FIG. 6. Pure QPU computations. For every choice of sequence and grid size studied, we conducted

100 runs with 490 annealing cycles each. The sequences can be found in Table A1. (A) The hit

rate on a logarithmic scale against the number of physical qubits used for the sequences S4, S6,

S7, S8, S9and S10 for various grid sizes, using λ= (1.0,2.0,1.5). Statistical errors are comparable

with or smaller than the symbol sizes. (B) The minimum-energy structure for the sequence S14 ,

which was successfully recovered on a 42grid, using λ= (2.0,7.0,4.0). Filled and open symbols

indicate H and P beads, respectively.

consistently provides high percentages of correct solution on multiple runs. However, the

success of our approach relies upon using the hybrid variant provided by D-Wave. The

performance of pure QA is less impressive with a drastic decrease in success rate as the

system size is increased. These calculations were therefore limited to chains with at most

N= 14.

Our approach diﬀers from previous attempts based upon growth algorithms, as it maps

the problem onto a lattice spin system where the spins, or qubits, are present throughout the

lattice. In comparison to earlier work, this representation greatly facilitates the handling

of interactions, including self-avoidance. Furthermore, except for very short chains, this

representation is more resource-eﬃcient, as the amount of logical qubits required exhibits a

polynomial rather than exponential scaling with chain length.

The encoding requires penalty terms for the global energy minimum of the spin system

to correspond to a proper chain. The method is robust to changes in the strengths of the

penalty terms, which require only a modest amount of tuning.

For convenience, we have focused on the HP model with its minimal two-letter alphabet.

15

To extend the approach to models with larger alphabets, such as the 20-letter Miyazawa-

Jernigan model [27], is straightforward, as it amounts to simply changing the interaction

parameters in Eq. 2. Moreover, although the checkerboard division into even and odd sites

may have to be modiﬁed or abandoned, the method can be applied to an arbitrary graph.

In particular, it can be directly applied to three-dimensional grids, including the tetrahedral

one used in Ref. [13].

Finally, we note that a similar approach could be applicable to gate-based quantum

computers. This could potentially take the form of a quantum variational algorithm or a

quantum search algorithm.

16

Appendix

TABLE A1. The HP sequences studied. The sequences are labeled SN, where Nindicates the

number of beads. All SNwith N≤30 have a known, unique minimum-energy structure [18, 19].

The minimum energy is denoted by Emin. For all N≤30, the sequence SNis chosen among those

having the most highly designable structure for this Nas its unique minimum-energy structure.

For the additional and longer sequences S48 and S64 , the ground states are unknown. Here, the

Emin values, marked with an asterisk, are the currently lowest known energies, found with classical

methods [23, 24]. Low-energy structures for all the sequences studied can be found in Figs. 5 (S64),

6(b) (S14), and A1 (all other SN).

Name Sequence Emin

S4HPPH −1

S6HPPHPH −2

S7PHPPHPH −2

S8HPHPHPPH −3

S9HHPPHPPHP −3

S10 HPPHPPHPPH −4

S14 HHHPPPHPPHPPPH −5

S18 HHHPPHPPHPHPPHPHPH −9

S19 PHPHPHPPHPHPPHPPHHH −9

S20 HPHPHPPHPHPPHPPPPHHH −9

S21 PHHPPHPHPPHPHPPHPPHHH −10

S22 HPPHPPHPHPPHPHPPHPPHHH −11

S23 PPHHHHPPHPPHPHPPHPHPPHP −10

S24 HPPPPHPPHPHPPHPHPPHPPHHH −11

S25 PHPHPHPHPPHPHPHPPHPPHHHHH −13

S26 HHHHPPHHPPHPHPPHPHPPHHPPHH −14

S27 PHPHPHPHPPHPHPHPPHPPPPHHHHH −13

S28 PPHHHPPHPPHPHPHPPHPHPPHPPHHH −13

S29 PHPHPHPPHHPPHPHPPHPPHHHHPPHHH −15

S30 PPHHHHPPHPPHPHPPHHPPHPHPHPPHHH −15

S48 PPHPPHHPPHHPPPPPHHHHHHHHHHPPPPPPHHPPHHPPHPPHHHHH −23∗

S64 HHHHHHHHHHHHPHPHPPHHPPHHPPHPPHHPPHHPPHPPHHPPHHPP-

HPHPHHHHHHHHHHHHH −42∗

17

FIG. A1. Ground states for all the sequences SNin Table A1 with N≤30 [18, 19] except S14

(whose ground state can be found in Fig. 6(b)). Also shown is an S48 structure, which is one of

10 structures with the lowest known energy (EHP =−23) for this sequence found using the hybrid

solver. A low-energy structure for the sequence S64 in Table A1 can be found in Fig. 5.

18

ACKNOWLEDGMENTS

This work was in part supported by the Swedish Research Council (Grant no. 621-2018-

04976). We gratefully acknowledge the J¨ulich Supercomputing Centre (https://www.fz-

juelich.de/ias/jsc) for supporting this project by providing computing time on the D-Wave

Advantage™System JUPSI through the J¨ulich UNiﬁed Infrastructure for Quantum com-

puting (JUNIQ). We have enjoyed fruitful discussions with theory group members at the

Wallenberg Centre for Quantum Technology at Chalmers University. In particular, we would

like to thank Hanna Linn for feedback on the code.

[1] M. W. Johnson, M. H. S. Amin, S. Gildert, T. Lanting, F. Hamze, N. Dickson, R. Harris,

A. J. Berkley, J. Johansson, P. Bunyk, E. M. Chapple, C. Enderud, J. P. Hilton, K. Karimi,

E. Ladizinsky, N. Ladizinsky, T. Oh, I. Perminov, C. Rich, M. C. Thom, E. Tolkacheva,

C. J. S. Truncik, S. Uchaikin, J. Wang, B. Wilson, and G. Rose, Quantum annealing with

manufactured spins, Nature 473, 194 (2011).

[2] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G.

S. L. Brandao, D. A. Buell, B. Burkett, Y. Chen, Z. Chen, B. Chiaro, R. Collins, W. Courtney,

A. Dunsworth, E. Farhi, B. Foxen, A. Fowler, C. Gidney, M. Giustina, R. Graﬀ, K. Guerin,

S. Habegger, M. P. Harrigan, M. J. Hartmann, A. Ho, M. Hoﬀmann, T. Huang, T. S. Humble,

S. V. Isakov, E. Jeﬀrey, Z. Jiang, D. Kafri, K. Kechedzhi, J. Kelly, P. V. Klimov, S. Knysh,

A. Korotkov, F. Kostritsa, D. Landhuis, M. Lindmark, E. Lucero, D. Lyakh, S. Mandr`a,

J. R. McClean, M. McEwen, A. Megrant, X. Mi, K. Michielsen, M. Mohseni, J. Mutus,

O. Naaman, M. Neeley, C. Neill, M. Y. Niu, E. Ostby, A. Petukhov, J. C. Platt, C. Quintana,

E. G. Rieﬀel, P. Roushan, N. C. Rubin, D. Sank, K. J. Satzinger, V. Smelyanskiy, K. J. Sung,

M. D. Trevithick, A. Vainsencher, B. Villalonga, T. White, Z. J. Yao, P. Yeh, A. Zalcman,

H. Neven, and J. M. Martinis, Quantum supremacy using a programmable superconducting

processor, Nature 574, 505 (2019).

[3] T. Kadowaki and H. Nishimori, Quantum annealing in the transverse Ising model, Phys. Rev.

E58, 5355 (1998).

[4] J. Brooke, D. Bitko, T. F. Rosenbaum, and G. Aeppli, Quantum annealing of a disordered

19

magnet, Science 284, 779 (1999).

[5] S. Boixo, T. F. Rønnow, S. V. Isakov, Z. Wang, D. Wecker, D. A. Lidar, J. M. Martinis, and

M. Troyer, Evidence for quantum annealing with more than one hundred qubits, Nat. Phys.

10, 218 (2014).

[6] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, Optimization by simulated annealing, Science

220, 671 (1983).

[7] J. J. Hopﬁeld and D. W. Tank, Neural computation of decisions in optimization problems,

Biol. Cybern. 52, 141 (1985).

[8] C. Peterson and J. R. Anderson, Neural networks and NP-complete problems; a performance

study of the graph bisectioning problem, Complex Syst. 2, 59 (1988).

[9] A. Lucas, Ising formulations of many NP problems, Front. Phys. 2, 1 (2014).

[10] A. Perdomo, C. Truncik, I. Tubert-Brohman, G. Rose, and A. Aspuru-Guzik, Construction

of model hamiltonians for adiabatic quantum computation and its application to ﬁnding low-

energy conformations of lattice protein models, Phys. Rev. A 78, 012320 (2008).

[11] K. F. Lau and K. A. Dill, A lattice statistical mechanics model of the conformational and

sequence spaces of proteins, Macromolecules 22, 3986 (1989).

[12] A. Perdomo-Ortiz, N. Dickson, M. Drew-Brook, G. Rose, and A. Aspuru-Guzik, Finding low-

energy conformations of lattice protein models by quantum annealing, Sci. Rep. 2, 248 (2012).

[13] A. Robert, P. K. Barkoutsos, S. Woerner, and I. Tavernelli, Resource-eﬃcient quantum algo-

rithm for protein folding, Npj Quantum Inf. 7, 38 (2021).

[14] C. Outeiral, G. M. Morris, J. Shi, M. Strahm, S. C. Benjamin, and C. M. Deane, Investigating

the potential for a limited quantum speedup on protein lattice problems, New J. Phys. 23,

103030 (2021).

[15] C. Micheletti, P. Hauke, and P. Faccioli, Polymer physics by quantum computing, Phys. Rev.

Lett. 127, 080501 (2021).

[16] R. Babbush, A. Perdomo-Ortiz, B. O’Gorman, W. Macready, and A. Aspuru-Guzik, Construc-

tion of energy functions for lattice heteropolymer models: eﬃcient encodings for constraint

satisfaction programming and quantum annealing, Adv. Chem. Phys. 155, 201 (2014).

[17] B. A. Reva and A. V. Finkelstein, Search for the most stable folds of protein chains: II. Com-

putation of stable architectures of β-proteins using a self-consistent molecular ﬁeld theory,

Protein Eng. Des. Sel. 9, 399 (2014).

20

[18] A. Irb¨ack and C. Troein, Enumerating designing sequences in the HP model, J. Biol. Phys.

28, 1 (2002).

[19] C. Holzgr¨afe, A. Irb¨ack, and C. Troein, Mutation-induced fold switching among lattice pro-

teins, J. Chem. Phys. 135, 195101 (2011).

[20] R. Unger and J. Moult, Genetic algorithms for protein folding simulations, J. Mol. Biol. 231,

75 (1993).

[21] C. McGeoch and P. Farr´e, The D-Wave Advantage System: an overview, Tech. Rep. (D-Wave

Systems Inc., 2020).

[22] C. McGeoch, P. Farr´e, and W. Bernoudy, D-Wave Hybrid Solver Service + Advantage: tech-

nology update, Tech. Rep. (D-Wave Systems Inc., 2020).

[23] F. Liang and W. H. Wong, Evolutionary Monte Carlo for protein folding simulations, J. Chem.

Phys. 115, 3374 (2001).

[24] U. Bastolla, H. Frauenkron, E. Gerstner, P. Grassberger, and W. Nadler, Testing a new Monte

Carlo algorithm for protein folding, Protein Eng. 32, 52 (1998).

[25] A. Pearson, A. Mishra, I. Hen, and D. A. Lidar, Analog errors in quantum annealing: doom

and hope, Npj Quantum Inf. 5, 107 (2019).

[26] D. Willsch, M. Willsch, C. D. G. Calaza, F. Jin, H. De Raedt, M. Svensson, and K. Michielsen,

Benchmarking Advantage and D-Wave 2000Q quantum annealers with exact cover problems,

Quantum Inf. Process. 21, 141 (2022).

[27] S. Miyazawa and R. L. Jernigan, Residue-residue potentials with a favorable contact pair term

and an unfavorable high packing density term, for simulation and threading, J. Mol. Biol. 256,

623 (1996).

21