Quantum Annealing in Drug Synthesis


A brief summary of the protein folding problem and QPacker quantum annealing algorithm

One of the most central ideas in drug development is the protein folding problem — the task of predicting how a protein’s unique amino acid sequence will affect its global 3D structure. Given that an average protein can include hundreds of amino acids, and there are twenty possibilities for each, this task is complex and not quickly accomplished.

Companies like Alphafold are trying to expedite this process by perfecting the art of predicting the shape of proteins. However, these methods are still highly dependent on trial and error, and proteins with over 150 monomers are actually incapable of being computed classically.

Quantum annealing presents a solution by allowing a power-efficient way to find the lowest energy path to fold protein sequences. It uses probability to approximate the global optimum of a function which, in the case of protein folding, is the lowest possible energy level and thus the most stable.

The overarching concept of a quantum annealing simulation is as follows:

  • The function starts at a specific temperature value and decreases incrementally until reaching zero (this emulates the heating and slow cooling down of a substance in physical annealing)
  • At each time step, the annealing algorithm will decide whether to keep the system in its current state s or jump to a new state S that is probabilistically preferable. This action is called a “move”
  • The probability of the new state being more preferable depends on the current temperature
  • This process is repeated until the system reaches a state with an acceptably low energy

One way of formalizing this method is by considering the rotamer optimization problem. A rotamer (rotational isomer) is the position of an amino acid side chain within a protein, and optimization refers to a state in which all rotamers of a protein have a combined lowest-energy solution.

The amount possible solutions turns out to be exponentially high — for a protein of M amino acids and N possibilities for the position of each amino acid, there are N^M possible configurations. Given the nature of this problem, it becomes apparent that quantum mechanics is necessary to find a competent algorithm.

This is where the QPacker quantum annealer comes in. To understand the QPacker algorithm, it is important to consider the classical counterpart from which it was derived — Rosetta’s Packer.

How Classical Rosetta’s Packer Works

In the Rosetta’s Packer annealing simulation, a “move” is made by substituting one rotamer for another at a random position on the protein, approximating its conformational energy, and deciding to accept or reject this move based on whether the calculated energy is acceptably low. The mathematical representation of this energy is as follows.

A rotamer at the Nth position is indexed as:

where each item in the index represents a rotamer at a specific position on the protein.

A solution to the rotamer problem is represented as the vector:

where each item represents an index of the rotamer at some given position.

The energy of a specific solution is then represented as:

Where S_i is a rotamer whose singular energy can be measured as O(S_i), and Sj and Sk are two different rotamers whose interaction energy can be measured as T(S_j,S_k).

How Quantum QPacker Works

In the QPacker annealing simulation, a move is made by evolving the ground state of an initial Hamiltonian to the ground state of a target Hamiltonian adiabatically, which means that there was no heat gained or lost in this exchange (and therefore, that the overall system hasn’t been disrupted from its ground state). This move can be represented by the following equation.


where H_S is the initial Hamiltonian, H_T is the target Hamiltonian, and H(tau) is the overall Hamiltonian as a function of the initial and target.

This equation can function as a transverse Ising model, a quantum mechanical version of the classical Ising Model that is meant to show phase transitions by arranging atomic spins into a lattice.

The reason the transverse Ising model allows for far more efficient rotamer optimization than the classical relies on a key concept within quantum computing: wave-particle duality. In corroboration with each other, observations like Young’s double slit experiment and Einstein’s photoelectric effect have shown that electrons behave like both a particle and a wave, allowing them to perform quantum tunneling. When an electron hits an energy barrier, it acts like a wave that quickly tapers off. If the barrier is thin enough, the wave might stand a chance at getting past it and appearing on the other side, defying the logic of classical mechanics and invoking quantum mechanics to account for this action.

The implication for annealing is that quantum tunneling helps a simulation to cover very rugged energy landscapes that would have presented energy barriers to a classical system, and ultimately do better at folding.

Figure 1: a quantum-tunneling particle can quickly locate the lowest energy level in a rugged energy landscape

In the context of the QPacker algorithm, slowly raising tau along the range from 0 to 1 means changing the transverse field. Tau=0 is when the ground state of the overall Hamiltonian is an equal superposition of all the states (i.e every classical configuration has an equal probability of being the optimal one). Tau=1 is the ground state that is being solved for.

The transverse Ising model is particularly helpful when investigation interactions that happen in a lattice.

Application to Lattice Folding

The method of using a lattice grid to consider protein folding can be represented as:

  • Create a lattice grid where each unit is a qubit that encodes information about an amino acid reaction
  • Perform conventional turn ancilla encoding on the protein
  • Create an energy function based on this encoding
  • Use quantum annealing to find out where the energy function is minimized

Figure 2: Turn ancilla encoding to represent a six-unit lattice protein

In turn ancilla encoding, a bond between amino acids is represented by two qubits, the value of which represents the direction that the protein is folding towards at that point. In Figure 2, a bond pointing towards the right is labeled as “01,” a bond pointing downwards is labeled as “00,” and so on. For a protein with six amino acids, the sequence of its turns is represented as “0100101011.”

Any given protein fold N can be described by a set of variables, whose amount can be found by calculating the variable value:

In order to conserve space in the final solution, the third variable can be fixed to only either go downwards or to the right, as shown in figure 2. This reduces the amount of variables down to:

An ideal protein configuration will have no amino acids overlapping with each other, no amino acids going backwards, and no non-bonded amino acids lying adjacent to each other. A sequence of turns that instantiates one of these conditions will return a very high (i.e. undesirable) energy value so the system will not want to return this configuration as a potential solution. The energy value is represented with an equation:

where q is a unique fold defined by the expression:

In this expression, 01 represents turn 1 and q_(2N-5) represents turn N-1.

From this step, quantum annealing algorithms like the QPacker algorithm allow the lowest energy value for the E(q) function to be found, thus optimizing the protein’s simulated configuration.

Implications of Quantum Annealing in Drug Synthesis

Research on quantum annealing shows promising signs of one day revolutionizing drug development. While quantum computers aren’t quite ready for widespread practical use in the medical field, many pharmaceutical companies do already use supercomputers to expedite the development of drug candidates. In 2015, the company Atomwise used supercomputers to launch a search into a molecular structure database and found two candidates for ebola treatment in less than a single day, as opposed to the months that a regular computer would have taken.

However, even supercomputers have their limits, which are rooted in the shortcomings of classical computation. Classical computers can’t handle database searches or protein configuration that deals with a lot of atoms at once and are thus only helpful for simple molecules. For example, the penicillin molecule has 41 atoms. Modeling it on a classical computer would take 10^86 bits, while it would take only 286 qubits on a quantum computer — using the concepts from quantum annealing, researchers would be able to map interactions between a drug molecule and the target protein it should bind to on an efficiency level that is orders of magnitude above computers in the status quo.

Going even further than the scope of annealing continued investment in quantum computing for health science technology could allow researchers to maximize DNA sequencing and analyzing speed, make medical data systems safer with quantum encryption, and make in silico clinical trials — trials that include no animal or human cells, but are fully simulated — a possible alternative to in vivo trials.


Fitzpatrick, Richard. “The Ising Model.” The Ising Model, 29 Mar. 2006, farside.ph.utexas.edu/teaching/329/lectures/node110.html.

Haddad, Yazan, et al. “Rotamer Dynamics: Analysis of Rotamers in Molecular Dynamics Simulations of Proteins.” Biophysics Journal, 22 Apr. 2019, www.cell.com/biophysj/supplemental/S0006-3495(19)30335-2#:~:text=Given%20by%20%CF%87%20torsional%20angles,(hence%20the%20word%20rotamer).

Hu, Chang-Kang, et al. “Quantum Thermodynamics in Adiabatic Open Systems and Its Trapped-Ion Experimental Realization.” Nature News, Nature Publishing Group, 26 Aug. 2020, www.nature.com/articles/s41534-020-00300-2.

Langione, Matt, et al. “Will Quantum Computing Transform Biopharma R&D?” United States — EN, United States — EN, 8 Jan. 2021, www.bcg.com/en-us/publications/2019/quantum-computing-transform-biopharma-research-development.

Liu, Alice. “Quantum Annealing: 2D Lattice Protein Folding.” Medium, Medium, 24 May 2020, medium.com/@aliceliu2004/quantum-annealing-2d-lattice-protein-folding-31e7049aa441.

Mulligan, Vikram K. Optimizing Side-Chains: Introduction to the Packer, 20 June 2016, www.rosettacommons.org/demos/latest/tutorials/Optimizing_Sidechains_The_Packer/Optimizing_Sidechains_The_Packer.

Mulligan, Vikram Khipple. “Designing Peptides on a Quantum Computer.” BioRxiv.org, 2 Sept. 2019, www.biorxiv.org/content/10.1101/752485v1.full.pdf.

Perdomo-Ortiz, Alejandro, et al. “Finding Low-Energy Conformations of Lattice Protein Models by Quantum Annealing.” Nature News, Nature Publishing Group, 13 Aug. 2012, www.nature.com/articles/srep00571.

“ProteinQure: the Quantum Landscape.” Proteinqure.com, www.proteinqure.com/files/proteinqure_quantum_landscape.pdf.

“Scanning Tunneling Microscopy.” Nanoscience Instruments, 26 July 2018, www.nanoscience.com/techniques/scanning-tunneling-microscopy/#:~:text=Tunneling%20is%20a%20quantum%20mechanical,be%20able%20to%20move%20through.&text=Quantum%20mechanics%20tells%20us%20that,effect%20of%20the%20wavelike%20nature.

“What Can Quantum Computing Do To Healthcare?” The Medical Futurist, 6 Nov. 2019, medicalfuturist.com/quantum-computing-in-healthcare/.