Articles
Published:

Streamlining Protein Folding for Quantum Computers

The intersection of biology and quantum computing is one of the most exciting frontiers of science. Among biology’s many grand challenges, protein folding stands out as both vital and notoriously difficult to solve with classical methods. Misfolded proteins are at the root of diseases such as Alzheimer’s and Parkinson’s, while accurate protein structure prediction can unlock faster drug discovery and new advances in biotechnology.

The protein folding problem is a classic combinatorial optimization challenge whose vast conformational space places it firmly in the NP-hard regime, making brute-force approaches infeasible. As with many computationally intractable problems, exploring the potential advantages of quantum computing offers a promising path forward.

IBM and recently the UK’s STFC have each demonstrated quantum approaches to protein folding, using well-known algorithms such as the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimization Algorithm (QAOA). These results highlight that quantum computing is beginning to make tangible progress in one of biology’s most complex problems.

At Qoro, we’ve been building a software framework designed to make developing and scaling such algorithms far easier. With our Python SDK, Divi, researchers can rapidly set up VQE or QAOA experiments, adjust parameters with minimal overhead, and automatically parallelize workloads across real quantum devices in a distributed, cloud environment.

In this post, we’ll demonstrate how protein folding can be implemented using Divi, how Qoro’s software stack streamlines the workflow from simulation to execution on hardware, and how our approach significantly reduces both runtime and cost compared to conventional implementations.

For quantum computing to make a real impact, it must be accessible and easy to use. The field will not scale if domain experts—such as biologists—are required to master every layer of the stack: mapping their problems to quantum models, implementing variational algorithms, optimizing workloads, managing job execution, and mitigating hardware noise. The key to progress lies in abstraction and automation. Qoro’s software stack delivers exactly that, enabling researchers to access quantum hardware seamlessly and focus on solving scientific problems rather than managing infrastructure.

Protein Folding and Its Challenges

At its core, the protein folding problem is about predicting the complex three-dimensional structure of a protein from its simple, linear sequence of amino acids. For example, given a sequence like Ala-Pro-Arg-Leu-Arg-Phe-Tyr, a successful folding algorithm must predict the precise 3D coordinates of every atom. This structure is not arbitrary — it is the exact shape the protein adopts to perform its biological function.

Because proteins are the workhorses of the cell, their roles are remarkably diverse. They catalyze metabolic reactions as enzymes, replicate DNA, provide structural support, act as molecular motors to transport cargo, and serve as receptors and messengers that enable cellular communication.

The investigation begins with two fundamental questions: How do we encode the protein folding problem for a quantum algorithm? And, what do we aim to achieve by doing so? Before diving into the how, it’s worth pausing on the why.

Central to this discussion is the Levinthal paradox — the observation that, although the number of possible three-dimensional conformations for a given protein is astronomically large, proteins in nature fold correctly and spontaneously within microseconds. Any computational model must therefore reproduce not only the correct final structure but also the efficiency of this rapid folding process.

Here, quantum computing’s promise — simulating nature with nature — feels particularly compelling. Yet given today’s hardware constraints, most practical approaches rely on variational quantum algorithms. To explore this, we implement VQE using Qoro’s Divi, executed through Qoro’s software stack, demonstrating how our platform simplifies the setup, tuning, and execution of such experiments. The VQE optimizes a parameterized quantum circuit (ansatz) to approximate the ground state of a Hamiltonian — the mathematical representation of the system’s energy landscape — thereby revealing the most stable protein configuration.

Implementation

With the premise established, we can now turn to the implementation.

The algorithm uses a coarse-grained model in which the protein is mapped onto a discrete tetrahedral lattice rather than a continuous 3D space. This simplifies the representation by grouping atoms into larger “beads,” capturing the essential folding dynamics without simulating every atom individually.

The structure is built sequentially on this lattice: at each amino acid, a “turn” is made in one of four possible directions to place the next bead. The sequence of these turns — which determines the final 3D conformation — is encoded into qubits using a denser encoding scheme. Here, each turn is represented by just two qubits, whose four possible states (00, 01, 10, and 11) directly map to the four directions. A full sequence of these qubit pairs thus encodes the entire protein chain.

The Hamiltonian, which defines the energy of each possible fold, is composed of three main components:

  1. Geometric constraint term – prevents unphysical overlaps or the chain folding back on itself by applying a large energy penalty.
  2. Chirality term – ensures the correct “handedness” of the side chains by penalizing incorrect orientations relative to the backbone.
  3. Interaction energy term – captures attractive and repulsive forces between beads using contact qubits and an imputed contact map. This map specifies which amino acids should attract one another, guiding the formation of secondary structures like α-helices. Attractive energy is applied only when a contact qubit is active and the beads are at the right distance; otherwise, a penalty is imposed.

The computational complexity of this model scales steeply: the number of Hamiltonian terms grows as the fourth power of the protein length, or O(N⁴) for a chain of N amino acids.

In the reference implementation from IBM, the authors employed a hardware-efficient ansatz with two layers for all experiments. The variational circuit began with Hadamard and parameterized single-qubit Rᵧ gates, followed by an entangling block and another set of single-qubit rotations. For the experiment run on quantum hardware, the entangling block formed a closed loop of CNOT gates adapted to the device’s native connectivity.

Optimization was performed using a Conditional Value-at-Risk (CVaR) objective function. Since the goal was to sample low-energy configurations rather than compute exact expectation values, CVaR focuses on the lower-energy tail of the distribution, reducing the number of required measurements and speeding up convergence. The CVaR objective was minimized using a Differential Evolution (DE) optimizer — a population-based genetic algorithm that iteratively evolves parameter sets toward better solutions.

Divi allows a simple implementation of this. It supports both the ability to simply customize an Ansatz and one can select from the various supported optimizers, including genetic, evolution, and population based optimizers like DE, CMAES and Monte-Carlo methods.

In our tests, we employ a Monte Carlo optimizer, chosen for its robustness in noisy, high-dimensional landscapes. It allows us to evaluate a large number of circuit variations in parallel, demonstrating the scalability of our workflow. In each iteration, 100 distinct parameter sets are sampled and evaluated simultaneously; the best-performing configuration (lowest cost) seeds the next round of sampling. Subsequent iterations draw new samples around the top candidates within a progressively tighter radius, leading the search toward an optimal solution — all without requiring gradient information.

These stochastic, evolution-inspired optimization methods are sampling-based rather than gradient-based. This makes them inherently more resilient to barren plateau effects, where gradients vanish exponentially with circuit depth, allowing the optimizer to continue improving even in flat or noisy regions of the parameter space.

Although executing 100 circuits per iteration, per Hamiltonian term, represents a substantial computational load, this is efficiently managed through Qoro’s workload reduction and circuit packing capability — a feature we’ll explore later.

Finally, our framework provides flexibility in designing and experimenting with different ansatz configurations — varying the number of layers, entanglement layouts, and circuit parameters — enabling rapid prototyping and comparative testing. This adaptability reflects one of Qoro’s central goals: to make quantum algorithm design and scaling not only possible but practical.

Making Quantum Protein Folding Accessible

With the Hamiltonian defined, we’re ready to explore the search space under the guiding principle that hybrid quantum–classical algorithms like VQE hold promise for tackling problems of this scale.

Running a protein folding experiment, however, is no small task. It requires constructing an end-to-end workflow capable of processing Hamiltonians, initializing a VQE program, defining the optimization problem, and executing it across both simulated and real quantum backends. In practice, researchers often spend more time assembling this infrastructure than actually running their folding algorithms.

With Qoro’s software stack, that overhead disappears. A complete protein folding workflow can be expressed in just around twenty lines of code. From there, parameters can be adjusted, ansätze swapped, or optimization strategies tested — all without restructuring the entire setup. Tasks that typically become unmanageable at scale are streamlined through built-in features.

For instance, the observable grouping strategy using in Divi dramatically reduces the number of measurements required by identifying redundancies and grouping compatible observables. This allows multiple expectation values to be derived from the same set of results, improving both efficiency and precision.

When it’s time to scale, Qoro connects seamlessly to the cloud. You can switch between high-performance simulators and quantum hardware from multiple vendors without altering your code. Through Composer, we use a cluster of Maestro instances that automatically selects the most suitable simulator, be it statevector or matrix product state, while Composer handles hardware parallelization using circuit packing to minimize total runtime. Meanwhile, Divi constructs workloads that are inherently parallelizable, enabling them to leverage distributed compute resources for massive runtime gains.

Circuit packing is a technique designed to maximize the utilization of available qubits and reduce total execution time. Instead of sending individual circuits to the quantum processor, Composer combines multiple smaller circuits into a single, larger batch that fully occupies the QPU’s resources. Each sub-circuit operates independently within distinct qubit regions, allowing many experiments to run simultaneously in one hardware execution. This approach drastically cuts queue times and runtime, delivering significant speedups while keeping execution costs low. By abstracting this process away from the user, Qoro ensures that scaling up workloads is effortless and highly efficient.

The result: instead of wrestling with infrastructure, you focus on what actually matters — testing, refining, and scaling protein folding algorithms on real quantum hardware. Qoro makes experimentation frictionless, portable, and truly scalable.

Running Protein folding in Divi

Once a workload is defined in Divi, users can rapidly run and benchmark experiments across both simulators and quantum hardware backends. The process begins in Divi, where workloads are specified and dispatched to Qoro’s cloud simulators. This enables fast iteration — testing multiple configurations, comparing ansätze, and identifying the most promising setups before moving to real devices.

We then validated these experiments on IBM’s quantum processors using circuit packing to boost the runtime. This allowed us to efficiently verify our simulated results against real hardware behavior.

The outcomes were strong and reproducible, demonstrating how Divi and Qoro’s software stack simplify the transition from simulation to hardware execution — turning what is normally a fragmented, manual process into a seamless, automated workflow. This is the code we executed.

Overall, with very few lines of code, we could build out the protein folding experiment conducted by IBM, and begin evaluating it in the same way they’ve done with a relative negligible amount of effort.

9-Qubit Model: 7-Amino Acid Neuropeptide

This model focused on the 7-amino acid neuropeptide sequence APRLRFY, a fragment relevant to neuroscience research. This is the same protein used in the IBM work. We tested two distinct ansätze on both simulators and a 156-qubit IBM quantum device. Here we show the better of the two results.

The Ry Ansatz

This simple ansatz demonstrated strong performance, consistently converging to low minimum energy values. The results improved with an increasing number of layers and optimization iterations. Notably, its performance on the real IBM hardware was comparable to the simulator. This is likely because the absence of entangling gates makes the circuit less susceptible to device noise.

In this experiment, we utilized 90 qubits on the IBM device by packing 10 instances of the program into a single execution, without applying any error mitigation. Despite the high degree of packing, the results remained remarkably consistent with the noiseless Qoro simulator, indicating that crosstalk had minimal impact on solution quality. This configuration delivered an additional 10× improvement in runtime and cost efficiency, with no measurable loss in convergence performance.

Cost of Execution Breakdown

The number of terms in the APRLRFY Hamiltonian is 77. With the Monte-Carlo optimization, using 100 samples and 8 iterations, the cost saved by using Divi and Composer is significant. If we assume an IBM Pay-as-you-go model, at $96 / minute, the costs are:

Method usedCost for 8 iterationPrice Reduction
Naive approach77 x 100 x $3.84 x 8 = $236,544
With Divi 1 x 100 x $3.84 x 8 = $3,07298.7%
With Divi + Composer1 x 100 x $0.38 x 8 = $30799.8%

17-Qubit Model: 9-Amino Acid Bradykinin

For the second stage, we used a 17-qubit model of the 9-amino acid peptide Bradykinin (RPPGFSPFR), a hormone involved in blood pressure regulation and inflammation. This model was tested with three different ansätze across three backends: a classical simulator and the IBM device.

Hardware-Efficient Ansatz

This ansatz was designed as a compromise, incorporating a significant amount of entanglement within a shallow circuit depth (using a “brick” layout). Changing the Ansatz is trivial in Divi, and users can switch between various structures with a parameter change.

GenericLayerAnsatz(
  gate_sequence=[qml.H, qml.RY],
  entangler=qml.CZ,
  entangling_layout="brick"
)

The results are shown in the plot below.


In this experiment, we packed eight instances of the program onto a 156-qubit device, using 136 qubits in total. To assess the impact of crosstalk, we reran the program without packing. The resulting drop in solution quality suggests that the device was overpacked, introducing interference between circuits. Thanks to the runtime and cost reductions enabled by circuit packing, experiments like this become feasible — allowing researchers to probe hardware performance and establish meaningful quality benchmarks for real applications.

As shown in the figure, the 8-packed configuration achieved a significant reduction in runtime, completing all iterations in approximately 4 minutes at a total cost of $384, compared to nearly 28 minutes and $2,726 for the un-packed baseline. The 4-packed setup maintained similar energy-loss behavior while cutting runtime to 8 minutes and cost to $768, striking an optimal balance between efficiency and fidelity. When error mitigation (mit) was applied to the 8-packed configuration, the energy loss improved modestly indicating that mitigation can recover part of the performance degradation introduced by crosstalk, for additional cost but maintaining a runtime benefits.

Mitigation was conducted using the M3 mitigation method offered by IBM that performs a short hardware evaluation to generate a noise model to perform error mitigation at runtime.

For reference, the Qoro simulator closely reproduced the hardware trends at negligible cost, providing a stable baseline for algorithmic verification before executing on quantum hardware. Together, these results show how Qoro’s circuit packing and orchestration stack allow researchers to efficiently explore the trade-off between cost, runtime, and accuracy — enabling high-fidelity quantum protein-folding experiments on real devices.

Cost of Execution Breakdown

The number of terms in the RPPGFSPFR Hamiltonian is 335. With the Monte-Carlo optimization set with 100 samples per iteration:

Method usedCost for 8 iterationPrice Reduction
Naive approach335 x 100 x $3.84 x 8 = $1M (!)
With Divi 1 x 100 x $3.84 x 8 = $3,07299.7%
With Divi + Composer1 x 100 x $0.48 x 4 = $76899.9%

Using a naive approach would make running this experiment impossible. No one would pay $1 Million to run a test like this. Indeed, there are ways to reduce financial cost, but the 22 hour runtime is a large overhead that wouldn’t be overcome. Being able to perform benchmark tests in a fraction of the time opens the door to many possibilities. Qoro’s software stack enables this.

Summary

That’s all it takes: a few key choices — no need to build circuits from scratch, design optimization pipelines, or manually manage workload reductions and backend integrations. Quantum programs are far too complex to run reliably on local machines, and even simple experiments demand cloud and HPC-scale infrastructure. Qoro’s software stack removes these barriers, making it straightforward to run and test quantum algorithms at scale.

Protein folding remains one of the most challenging problems in computational biology, but quantum computing offers a new path forward. With Divi and Composer, researchers can define, optimize, and execute quantum protein folding experiments with minimal code — often in under twenty lines. Our integrated stack seamlessly connects simulators and quantum hardware, automatically parallelizes workloads, and delivers orders-of-magnitude cost reductions.

As shown in our benchmark, applying Divi’s workload reduction and Composer’s circuit packing yields a 99.9% decrease in execution cost, turning what was once a million-dollar computation into a few hundred dollars — all while maintaining solution characteristics.

Although this demonstration focuses on protein folding, Qoro’s platform is algorithm-agnostic. The same infrastructure can accelerate, scale, and benchmark other quantum-classical workflows — from optimization to chemistry to machine learning. This gives scientists a reproducible and extensible framework to explore quantum algorithms, and hardware providers a standardized way to benchmark real-world performance on meaningful applications.

Biologists may not understand coherence times or gate fidelities, but they can understand how well a protein-folding algorithm performs — and that’s precisely the bridge Qoro builds. By lowering the barrier for end-users to evaluate and experiment, we’re making it possible for a wider scientific community to understand the current capabilities of quantum hardware and what’s just over the horizon.

Stay Tuned!

This is just the beginning — in our next post, we’ll explore a larger protein that requires more advanced simulation methods as well as the effects of warm-starting! Stay tuned!

To provide the best experience, we use technologies like cookies to store and/or access device information. You can manage your preferences here.