Note
This repository was built as a submission for, and the winner of the IISC Quantum Fall Fest 2025 | IBM ⨯ Cleveland Clinic QFF Hackathon Prompt. The most-recent commit before the deadline is 0f64462.
Important
This README.md contains MathJax. Best viewed on GitHub on a Desktop Browser. A PDF containing more details can be found at ./eigenFold.pdf.
After cloning, make sure you're using Python 3.11.6.
On windows, set up the python environment using
python -m venv .venv
./.venv/Scripts/Activate
pip install -r requirements.txtYou can then run the whole pipeline
python main.py
python analysis.py # once main.py finishes runningA hybrid quantum–classical framework for simulating lattice-based protein folding using QUBO formulation and Variational Quantum Eigensolvers (VQE).
Protein folding is a complex optimization problem where a sequence of amino acids must find its lowest-energy 3D structure. Classical algorithms such as Monte Carlo or molecular dynamics require large computational resources and often get trapped in local minima. Quantum computing offers a new approach by representing the folding landscape as a quantum energy function that can be explored more efficiently.
EigenFold reformulates the lattice-based Hydrophobic–Polar (HP) folding model as a Quadratic Unconstrained Binary Optimization (QUBO) problem and solves it using the Variational Quantum Eigensolver (VQE). The workflow maps residues to binary variables, encodes physical rules like adjacency and self-avoidance as QUBO terms, converts the model into a Pauli Hamiltonian, and minimizes it using VQE. The resulting quantum state provides a probability distribution over possible folds, allowing multiple stable conformations to be visualized and compared across lattice geometries.
We use QUBO, i.e., for variables
We can't have hard constraints in QUBO, but we can penalties if the constraint is violated. Suppose we have a one-hot encoded variable, then
which we can turn into a squared penalty
where
The
We must also encode the fact that sequential residues must be placed next to each other in the lattice, i.e., enforce a rule backbone adjacency rule. This is achieved by the term
The QUBO energy function, where
Each binary variable
The terms can thus be transformed into pauli words via
Note
Algorithm ran successfully for R = [True, False, True] and (nx, ny, nz) = (2, 2, 1), after running for 87.01s.
One hot encoding is exopentially inefficient in the number of sites,
Instead of storing a seperate bit for every lattice site, we store the binary representation of the site index. Thus, for a lattice with
where,
Since
Note
For R = 3 and S = 12, we have num_qubits = 12, an improvement by a factor of 9, and takes 29.68s to execute.
The mapping to pauli words remains relatively unchanged.
Each simulation run stores:
- Lattice type (fcc, bcc, sc)
- Peptide sequence
- Number of residues, R
- Number of stable conformations
- Entropy of the conformation probability distribution
- Dominant fold probability and energy
- Runtime statistics
- Plots are generated automatically via analysis.py:
- Energy–Entropy relationships
- Entropy vs lattice topology
- Runtime scaling with R
- Number of stable conformations per lattice type
- Correlation matrix across all computed metrics
- These metrics quantify the folding landscape, energy degeneracy, and computational cost.
EigenFold reproduces realistic folding dynamics within a simplified lattice model. Longer peptides and denser lattices (e.g., fcc) exhibit:
- Higher entropy and greater conformational diversity
- Multiple stable low-energy states
- Higher runtime due to complex interaction graphs
- Simpler lattices (e.g., sc) show deterministic folding with single dominant minima.
- Energy–entropy correlations reflect natural folding trade-offs: increasing configurational freedom flattens the energy landscape but increases degeneracy.
EigenFold demonstrates a fully functional quantum-inspired folding pipeline that scales efficiently using binary encoding. The QUBO formulation captures core physical constraints — backbone connectivity, steric exclusion, and hydrophobic attraction — within a quantum-compatible optimization model. Results confirm that lattice geometry strongly governs folding entropy and computational cost, and that VQE can reliably identify dominant conformations even in small peptide systems. This work provides a concrete foundation for scaling quantum approaches to biologically relevant folding problems.
- Variational Quantum Eigensolver for Protein Folding using Neutral Atom Platforms, Gefen Barnes, 2024
- A perspective on protein structure prediction using quantum computers, Doga et al, 2023
- Resource-efficient quantum algorithm for protein folding, Robert et al., 2021
- Estimation of Effective Interresidue Contact Energies from Protein Crystal Structures: Quasi-Chemical Approximation, Miyazawa & Jernigan, 1985