The quantum hardware employed consists of 16 units of a recently characterized eightqubit unit cell22,39. Post-fabrication characterization determined that only 115 qubits out of the 128 qubit array can be reliably used for computation (see Fig. 1). The array of coupled superconducting flux qubits is, effectively, an artificial Ising spin system with programmable spin-spin couplings and transverse magnetic fields. It is designed to solve instances of the following (NP-hard40) classical optimization problem: Given a set of local longitudinal fields {h i } and an interaction matrix {J ij }, find the assignment , that minimizes the objective function E(s), where,

|h i | ≤ 1, |J ij | ≤ 1 and s i ∈ {+1, -1}.

Figure 1 Device architecture and qubit connectivity. The array of superconducting quantum bits is arranged in 4 × 4 unit cells that consist of 8 quantum bits each. Within a unit cell, each of the 4 qubits in the left-hand partition (LHP) connects to all 4 qubits in the right-hand partition (RHP) and vice versa. A qubit in the LHP (RHP) also connects to the corresponding qubit in the LHP (RHP) of the units cells above and below (to the left and right of) it. (a) Qubits are labeled from 0 to 127 and edges between qubits represent couplers with programmable coupling strengths. Grey qubits indicate the 115 usable qubits, while vacancies indicate qubits under calibration which were not used. The larger experiments (Experiments 1,2 and 4) were performed on this chip, while the three remaining smaller experiments were run on other chips with the same architecture. (b) Embedding and qubit connectivity for Experiment 4, coloring the 81 qubits used in the experiment. Nodes with the same color represent the same logical qubit from the original 19-qubit Ising-like Hamiltonian resulting from the energy function associated with Experiment 4 (see Supplementary material for details). This embedding aims to fulfill the arbitrary connectivity of the Ising expression and allows for the coupling of qubits that are not directly coupled in hardware. Full size image

Finding the optimal s* is equivalent to finding the ground state of the corresponding Ising classical Hamiltonian,

where are Pauli matrices acting on the ith spin.

Experimentally, the time-dependent quantum Hamiltonian implemented in the superconductingqubit array is given by,

with responsible for quantum tunneling among the localized classical states, which correspond to the eigenstates of H p (the computational basis). The time-dependent functions A(τ) and B(τ) are such that A(0) ≫ B(0) and A(1) ≪ B(1); in Fig. 2(b), we plot these functions as implemented in the experiment. t run denotes the time elapsed between the preparation of the initial state and the measurement.

Figure 2 Lattice folding mapping for quantum annealing. (a) Step-by-step construction of the binary representation of lattice protein. Two qubits per bond are needed and the bond directions are denoted as “00” (downwards), “01” (rightwards), “10” (leftwards) and “11” (upwards). The example shows one of the possible folds of an arbitrary six-amino-acid sequence. Any possible N-amino-acid fold can be represented by a string of variables with . (b)Time-dependence of the A(τ) and B(τ) functions, where τ = t/t run with t run = 148 µs, (c) time-dependent spectrum obtained through numerical diagonalization and (d) Bloch-Redfield simulations showing the time-dependent population in the first eight instantaneous eigenstates of the experimentally implemented 8-qubit Hamiltonian (Eq. 3) with H p from Eq. S18 in the Supplementary material. In panel (c), for each instantaneous eigenenergy curve we have subtracted the energy of the ground state, effectively plotting the gap of the seven-lowest-excited states with respect to the ground state (represented by the baseline at zero-energy). As a reference, we show the energy with the device temperature, which is comparable to the minimum gap between the ground and first excited state. In panel (d), populations are ordered in energy from top (ground state) to bottom. Although τ = t/t run runs from 0 to 1, we show the region where most of the population changes occur. As expected, this is in the proximity of the minimum gap between the ground and first excited state around τ ~ 0.4 [see panel(c)]. Full size image

QA exploits the adiabatic theorem of quantum mechanics, which states that a quantum system initialized in the ground state of a time-dependent Hamiltonian remains in the instantaneous ground state, as long as it is driven sufficiently slowly. Since the ground state of H p encodes the solution to the optimization problem, the idea behind QA is to adiabatically prepare this ground state by initializing the quantum system in the easy-to-prepare ground state of H b , which corresponds to a superposition of all 2N states of the computational basis. The system is driven slowly to the problem Hamiltonian, H(τ = 1) ≈ H p . Deviations from the ground-state are expected due to deviations from adiabaticity, as well as thermal noise and imperfections in the implementation of the Hamiltonian.

The first challenge of the experimental implementation is to map the computational problem of interest into the binary quadratic expression (Eq. 2), which we outline next. In lattice folding, the sequence of amino acids defining the protein is viewed as a sequence of beads (amino acids) connected by strings (peptide bonds). This bead chain occupies points on a two- or three-dimensional lattice. A valid configuration is a self-avoiding walk on the lattice and its energy is calculated from the sum of interaction energies between nearest non-bonded neighbors on the lattice. By the thermodynamic hypothesis of protein folding41, the global minimum of the free-energy function is conjectured to be the native functional conformation of the protein.

Finding low-energy three-dimensional structures is an intractable problem42,43,44. The hydrophobic-polar (HP) model is one of the simplest possible models for lattice folding45. In this model, the amino acids are classified into two groups, hydrophobic (H) and polar (P). Even in this simplest model, exhaustive search of all possible global minima is limited to sequences in the tens of amino acids46. To describe real protein energy landscapes a more elaborate description needs to be considered, such as the Mijazawa-Jernigan (MJ) model38 which assigns the interaction energies for pairwise interactions among all twenty amino acids. The formulation we used is general enough to take into account arbitrary interaction matrices for lattice models in two and three dimensions. In particular, we solved a MJ model in 2D, the six-amino-acid sequence of Proline-Serine-Valine-Lysine-Methionine-Alanine (PSVKMA in the one-letter amino-acid sequence notation). We solved the problem under two different experimental schemes (see Schemes 2 and 3 in Fig. 3), each requiring a different number of resources. Solving the problem in one proposed experimental realization (Scheme 1) requires more resources than the number of qubits available (115 qubits) in the device. Scheme 2 and 3 are examples of the divide-and-conquer strategy, in which one partitions the problem in smaller instances and combines the independent set of results, thereby obtaining the same solution for the intractable problem. In the Supplementary Information section, we complement these four MJ related experiments with two small tetrapeptide instances (effectively HP model instances) for a total of six different problem Hamiltonians. We used the largest of these two instances (an 8 qubit experiment) for direct theoretical simulation of the annealing dynamics of the device. The results from our experiment and the theoretical model, which does not use any adjustable parameters (all are extracted experimentally from the device), are in excellent agreement (see Supplementary Fig. S2 online).

Figure 3 Experimental realizations. (a) Representation of the six-amino-acid sequence, Proline-Serine-Valine-Lysine-Methionine-Alanine with its respective one-letter sequence notation, PSVKMA. We use the pairwise nearest-neighbor Miyazawa-Jernigan interaction energies reported in Table 3 of Ref. 38. (b) Divide and conquer approach showing three different schemes which independently solve the six-amino-acid sequence PSVKMA on a two-dimensional lattice. We solved the problem under Scheme2 and 3 (Experiments 1 through 4). (c) Energy landscape for the valid conformations of the PSVKMA sequence. Results of the experimentally-measured probability outcomes are given as color-coded percentages according to each of the experimental realizations described in panel (b). Percentages for states with energy greater than zero are 32.70%, 59.88%, 8.00% and 95.97% for Experiments 1 through 4, respectively. Full size image

To represent each of the possible N-amino-acid configurations (folds) in the lattice, we encode the direction of each successive bond between amino acids; thus, for every N-bead sequence we need to specify N - 1 turns corresponding to the number of bonds. For the case of a two dimensional lattice, a bond can take any of four possible directions; therefore, two bits per bond are required to uniquely determine a direction. More specifically, if a bond points upwards, we write “11”. If it points downwards, leftwards or rightwards, we write “00”, “10”, or “01” respectively. Fixing the direction of the first bond reduces the description of any N-bead fold to binary variables, without loss of generality. As shown in Fig. 2(a), in the absence of external constraints other than those imposed by the primary amino-acid sequence (see Supplementary Information for an example with external constraints), we can fix the third binary variable to “0”, forcing the third amino acid to go either straight or downward and reducing the number of needed variables to . This constraint reduces the solution space by removing conformations which are degenerate due to rotational symmetry. Thus, a particular fold is uniquely defined by,

An example of this encoding for a six-amino-acid sequence is represented in Fig. 2(a).

Using this mapping to translate between the amino-acid chain in the lattice and the 2(N - 1) string of bits, we constructed the energy function E(q) in which q denotes the remaining 2N-5 binary variables. Additionally, we penalized folds which exhibit two amino acids on top of each other, to favor self-avoiding walk configurations. The energy penalty chosen for each problem was sufficient to push the energy of invalid folds outside of the energy range of valid configurations (those with E ≤ 0). Finally, we took into account the interaction energy among the different amino acids. A detailed construction of our energy function for the general case of N amino acids with arbitrary interactions is given elsewhere.

The experiment consists of the following steps: a) construction of the energy function to be minimized in terms of the turn encoding; b) reduction of the energy expression to a two-body Hamiltonian; and finally, c) embedding in the device. These last two steps need additional resources as explained below. We will focus on the simplest example (Experiment 3, Fig. 3) to show the procedure in detail. The embeddings for the other five experiments are provided in the Supplementary material. The energy function for Experiment 3, containing the contributions due to on-site penalties for overlapping amino acids and pairwise interactions between amino acids is,

where q 1 0 (q 2 q 3 ) encodes the orientation of the fourth (fifth) bond (see Fig. 3). From Eq. 5 one can verify by substitution that the eight possible three-bit-variable assignments provide the desired energy landscape: the six conformations with E ≤ 0 shown in blue in Fig. 3.

Eq. 5 describes the energy landscape of configurations but it is not quite ready for the device. Experimentally, we can specify up to two-body spin interactions, and therefore, we need to convert this cubic energy function (Eq. 5) into a quadratic form resembling Eq. 1 (see Supplementary Information for details). The resulting expression is

where the original binary variables and spin operators are related by . Experimental measurements of yield s i = +1 (s i = −1) corresponding to q i = 0 (q i = 1). Since q i = (1 − s i )/2, measurement of s 1 , s 2 and s 3 allows us to reconstruct the bit string q 1 0q 2 q 3 which encodes the desired fold.

One ancilla variable was added during the transformation of the three-variable cubic Hamiltonian into this quadratic four-variable expression. The meaning of the original variables s 1 , s 2 and s 3 remains the same, allowing for the reconstruction of the folds. The energy of this four-variable expression will not change as long as the measurements of through result in values for q 1 q 2 q 3 q 4 satisfying q 4 = q 2 q 3 . This transformation ensures an energy penalty whenever this condition is violated.

The architecture of the chip lacks sufficient connectivity between the superconducting rings for a one-to-one assignment of variables to qubits (see Fig. 4). To satisfy the connectivity requirements of the four-variable energy function, the couplings of one of the most connected variables, q 4 , were fulfilled by duplicating this variable inside the device such that q 4 → q 4 and q 4′ . In the form of Eq. 2 the final expression representing the energy function of Experiment 3 is given by,

This expression satisfies all requirements for the problem Hamiltonian (Eq. 3), the completion of which allows for the measurement of the energetic minimum conformation of this small peptide instance. The embedding of Eq. 7 into the hardware is shown in Fig. 4, where we label the five qubits used, q 1 , q 2 , q 3 , q 4 and q 4′ . Since we want the two qubits representing q 4 to end up with the same value, we apply the maximum ferromagnetic coupling (J = −1) between them, which adds a penalty whenever this equality is violated (last term in Eq. 7). These maximum couplings are indicated in Fig. 4 by heavy lines. The thinner lines show the remaining couplings used to realize the quadratic terms in Eq. 7, color coded according to the sign of the interaction and its thickness representing their strength. Note that every quadratic term in Eq. 7 has a corresponding coupler. Hereafter, we will denote the outcome of the five-qubit measurements as q exp3 = 010010q 1 0q 2 q 3 |q 4 q 4′ , with q i = 0 (q i = 1) whenever s i = 1 (s i = −1). Notice that only the bits preceding the divider character | contain physical information. These are the ones shown under each of the protein fold drawings associated with Experiment 3 (see Fig. 3).

Figure 4 Embedding problem instances into hardware. Graph representations of (a) the four-qubit unembedded energy function (Eq. 6) and (b) the five-qubit expression (Eq. 7) as was embedded into the quantum hardware. In graphs (a) and (b), each node denotes a qubit and the color and extent of its glow denotes the sign and strength of its corresponding longitudinal field, h i . The edges represent the interaction couplings, J ij , where color indicates sign and thickness indicates magnitude. Since we want the two qubits representing q 4 (q 4 and q 4′ ) to end up with the same value, we apply the maximum ferromagnetic coupling (J = −1) between them, which adds a penalty whenever this equality is violated. These maximum couplings are indicated in the figure by heavy lines. For the case of Experiment 3, the reconstruction of the binary bit stings representing the folds in Fig. 3, from the five-qubit experimental measurements can be recovered by q exp 3 = 010010q 1 0q 2 q 3 |q 4 q 4′ , with q i = 0 (q i = 1) whenever s i = 1 (s i = −1). Full size image

Similar embedding procedures to the one previously described were used for the larger experiments. For example, in Experiment 1, only 5 qubits define solutions of the computational problem. We needed 5 auxiliary qubits to transform the expression with 5-body interactions into an expression with only 2-body interactions. Embedding of this final expression required an additional of 18 qubits to satisfy the hardware connectivity requirements, for a total of 28 qubits. Table S1 in the Supplementary material summarizes the number of qubits required in each step through to the final experimental realizations.