Variational Quantum Eigensolver
Find the most stable 3D shape of a short peptide using a hybrid quantum–classical algorithm.
What is VQE?
A protein or peptide folds into the 3D shape with the lowest energy. Finding that shape by brute force is impossible — the number of possible shapes explodes with chain length. VQE is a quantum algorithm that searches this huge space efficiently.
It works as a partnership: a quantum circuit proposes candidate shapes (as a quantum superposition), and a classical optimizer nudges the circuit's knobs to make low-energy shapes more likely. Repeat until the energy stops dropping — that's your folded structure.
Quantum part
A parameterized circuit (the “ansatz”) prepares a superposition of candidate conformations.
Classical part
Differential Evolution tunes the circuit’s parameters to minimize energy.
Result
The lowest-energy conformation — the predicted fold — plus how confident the run is in it.
How it works
Encode the peptide
Each backbone turn is placed on a tetrahedral lattice and encoded into qubits. A length-7 peptide uses 9 qubits.
Build the energy model
Every possible shape gets an energy from the Miyazawa–Jernigan contact potential — real chemistry between the 20 amino acids, not a toy model.
Propose & measure
The quantum circuit prepares a superposition of shapes and is measured. Each measurement is one candidate shape with a known energy.
Optimize
The classical optimizer adjusts the circuit to favor lower-energy shapes, using a CVaR objective that focuses on the best measurements rather than the average.
Converge
When the energy settles, the most-measured low-energy shape is your predicted fold.
Inputs
| Input | Typical value | What it does |
|---|---|---|
| Sequence | ≤ ~12 residues | The peptide to fold. Longer chains need more qubits. |
| Ansatz depth | 2 reps | More depth = more expressive circuit, but harder to optimize. |
| Optimization mode | Paper / Concentrate / Anneal | How aggressively to push probability onto the ground state (see below). |
| Device | CPU or GPU | Where the circuit is simulated. CPU is fine — and faster — for small peptides. |
The three optimization modes
All three find the correct lowest energy. They differ in how strongly they concentrate the result on that single best shape — measured by P(GS), the percentage of measurements landing on the true ground state.
📄 Paper
Reproduces the published settings exactly. Energy is spot-on; the result is spread across many shapes (low P(GS)). Use it for a faithful, comparable energy.
🎯 Concentrate
Pushes harder for a single dominant shape. Great for easy peptides; on harder ones a single pass can overshoot and lose the right energy.
🔥 Anneal recommended for hard peptides
Two stages: first find the right shape gently, then sharpen the focus on it. Delivers the highest confidence (P(GS) up to ~60%) while keeping the energy exact.
Reading your results
| Metric | What it means | What good looks like |
|---|---|---|
| Energy | The lowest energy VQE found (the fold's stability). | Matches the exact reference. |
| Energy match | Whether VQE's energy equals exact diagonalization. | ✅ within ~2%. |
| P(GS) | How often measurements hit the true ground state. | Higher = more confident. >20% is strong; Anneal reaches ~40–60%. |
| Time / memory | Wall-clock and RAM used by the run. | 9-qubit runs: ~4 min, ~200 MB on CPU. |
EXAMPLE — APRLRFY (7 residues, 9 qubits)
Exact ground-state energy −1.425. All three modes reproduce it. In Anneal mode, confidence climbs 6% → 34% → 44% as the focus sharpens — the same fold, just measured far more reliably.
When to use VQE (and its limits)
- Use it for short peptides where you want a single best 3D conformation and an accurate energy.
- Keep it short. Qubit count grows with length; runtimes grow fast beyond ~12 residues.
- For small peptides, choose CPU. GPU only pays off at larger qubit counts.
- For confidence, choose Anneal. It's the reliable way to a high P(GS).