QEncode — Quantum Algorithm Benchmarking Standard
QEncode is the open benchmark standard for reproducible VQE quantum chemistry evaluation — free to run, certified when you need signed results.
🌐 qencode-benchmark.org · 📊 Live Leaderboard · 📄 Benchmark Spec · 📝 Blog
What QEncode does
Most published VQE results cannot be independently reproduced — different teams use different molecules, basis sets, encodings, active spaces, and error metrics, making cross-study comparison unreliable. QEncode fixes this with:
- Fixed benchmark definitions — 16 molecules, cc-pVDZ basis, chemistry-driven active spaces, 3 qubit encodings, 3 ansatz families, CASCI reference energies
- Open-source pipeline —
pip install qencode-benchmark, or one script with a pinned environment. Any result is independently reproducible - Enforced determinism — the linear-algebra backend is pinned to a single thread before NumPy loads, because multi-threaded BLAS makes gradient-free VQE non-reproducible (why)
- Signed certification — entries are signed with Ed25519 and carry a SHA-256 provenance hash
- Public leaderboard — certified entries ranked by accuracy gap, circuit cost, and balanced score
- Fault-tolerant resource estimates — every entry records non-Clifford and T-gate counts alongside its accuracy
- DARPA QB-GSEE aligned — N₂ certified at cc-pVDZ, directly comparable to QB-GSEE target specification
Suite v4.4 — Current (cc-pVDZ basis)
47 certified entries across 16 molecules (54 entries total; 7 recorded as research tier). An entry is certified when its gap to the active-space CASCI reference is below 10 mHartree.
| Molecule | Name | Active space | Qubits (JW → tapered) | Orbitals | Certified | Best gap (mHa) |
|---|---|---|---|---|---|---|
| H₂ | Hydrogen | [2e, 2o] | 4 → 1 | HF | 6 | <0.001 (PAR/UCCSD) |
| HF | Hydrogen fluoride | [2e, 2o] | 4 → 1 | HF | 6 | <0.001 (PAR/UCCSD) |
| LiH | Lithium hydride | [4e, 4o] | 8 → 5 | HF | 3 | 0.003 (JW/UCCSD) |
| BeH₂ | Beryllium hydride | [4e, 4o] | 8 → 3 | HF | 4 | <0.001 (PAR/HEA) |
| H₂O | Water | [4e, 4o] | 8 → 4 | HF | 3 | <0.001 (JW/UCCSD) |
| NH₃ | Ammonia | [4e, 4o] | 8 → 5 | HF | 3 | 0.032 (JW/UCCSD) |
| H₂CO | Formaldehyde | [4e, 4o] | 8 → 4 | HF | 1 | 1.124 (JW/ADAPT) |
| C₄H₆ | 1,3-Butadiene | [4e, 4o] | 8 → 4 | HF | 1 | 2.829 (JW/ADAPT) |
| (H₂O)₂ | Water dimer | [4e, 4o] | 8 → 5 | HF | 4 | 0.002 (JW/UCCSD) |
| H₄ | Hydrogen chain | [4e, 4o] | 8 → 5 | HF | 4 | 2.222 (JW/UCCSD) |
| C₄H₄ | Cyclobutadiene | [4e, 4o] | 8 → 6 | CASSCF | 4 | 5.963 (JW/ADAPT) |
| N₂ | Nitrogen | [6e, 6o] | 12 → 8 | CASSCF | 3 | 4.513 (JW/HEA) |
| H₆ | Hydrogen chain | [6e, 6o] | 12 → 9 | CASSCF | 1 | 9.273 (JW/ADAPT) |
| C₆H₆ | Benzene | [6e, 6o] | 12 → 9 | CASSCF | 2 | 8.741 (JW/HEA) |
| H₈ | Hydrogen chain | [8e, 8o] | 16 → 13 | CASSCF | 1 | 9.797 (JW/ADAPT) |
| H₁₀ | Hydrogen chain | [10e, 10o] | 20 → 18 | CASSCF | 1 | 9.977 (JW/ADAPT) |
Encoding notes:
- BK excluded for all molecules except H₂ and HF (PennyLane imaginary artefacts in tapering for active spaces > [2,2])
- PAR/UCCSD excluded for several molecules (JW-basis UCCSD operators incompatible with Parity tapering)
- CASSCF orbital optimization is used where HF orbitals cannot cleanly partition the active space (N₂, H₆, C₄H₄, benzene, H₈, H₁₀)
- H₈ and H₁₀ are the largest certified systems (16 and 20 qubits before tapering), reached with ADAPT-VQE and a sparse statevector engine
Score a VQE result you already have
You do not need to run our pipeline to use QEncode. If you have a VQE energy for one of the 16 suite molecules, one call tells you how far it is from the exact ground state of the same active space, which threshold it clears, how much margin it has, and whether your optimiser and ansatz make that margin fragile on another machine:
import qencode
s = qencode.score(-7.9835, molecule="LiH", active_space=(4, 4),
optimizer="COBYLA", ansatz="hea")
print(s.report())
your energy -7.9835000000 Ha
exact ground state -7.9837729770 Ha (CASCI in the declared active space)
gap 0.0002729770 Ha = 0.273 mHa
reaches CHEMICAL ACCURACY (< 1.6 mHa) and would meet the 10 mHa certification threshold
margin 9.727e-03 Ha (97.3% of the threshold)
amplifying YES -- gradient-free optimiser on an unstructured ansatz
among published #3 of 4 QEncode entries for this problem
The comparison normally needs a CASCI reference, which means installing PySCF and waiting. The references for all 16 molecules ship inside the package instead, so scoring imports no chemistry stack — not even NumPy. It refuses rather than guesses: a declared active space that does not match raises, and an energy below the variational minimum is reported as a problem with your setup, not as a good result.
Meeting the threshold is not certification — that requires the pipeline, with recorded
provenance, a content hash and a signature. See docs/TRUST_POLICY.md.
Walkthrough: notebooks/score_your_vqe_result.ipynb.
Quick start
Docker (recommended — pinned environment, determinism already enforced):
docker build -t qencode .
docker run --rm -v "$PWD/out:/work/out" qencode \
--molecule H2 --mapping jordan_wigner --ansatz-type uccsd --out-dir /work/out
pip:
pip install qencode-benchmark # Python 3.10+
# Run a single entry (H₂, Jordan-Wigner, UCCSD) — takes about ten seconds
qencode run --molecule H2 --mapping jordan_wigner \
--ansatz-type uccsd --out-dir out
No clone needed — the molecule catalogue ships with the package. qencode where reports
which mode you are in.
From a clone, which additionally gives you the entry database and records the producing commit inside each entry:
git clone https://github.com/qencode-benchmark/qencode-benchmark
cd qencode-benchmark
pip install -e .
# Run a single entry (H₂, Jordan-Wigner, UCCSD) — takes about ten seconds
python scripts/generate_entry_v4.py \
--molecule H2 --mapping jordan_wigner \
--ansatz-type uccsd --out-dir releases/v4/db
# Verify any published entry reproduces
python scripts/verify_entry.py releases/v4/db/<entry_id>.json
# Check whether YOUR environment can produce reproducible VQE results
python tools/check_vqe_reproducibility.py
See QUICKSTART.md for a five-minute walkthrough, including how to compare your own result against the leaderboard.
More examples:
# N₂ requires CASSCF orbital optimization
python scripts/generate_entry_v4.py \
--molecule N2 --mapping jordan_wigner --ansatz-type uccsd \
--orbital-opt casscf --multistart 1 --max-iter 10000 --out-dir releases/v4/db
# ADAPT-VQE — the only method that certifies the large chains
python scripts/generate_entry_v4.py \
--molecule H8 --mapping jordan_wigner --ansatz-type adapt \
--orbital-opt casscf --adapt-engine statevector --adapt-inner bfgs \
--adapt-max-ops 300 --out-dir releases/v4/db
# Export leaderboard CSVs from db entries
python scripts/export_leaderboard_v4.py
Windows: Use WSL2 or Docker. PySCF does not install natively on Windows. Long runs: Use
nohup ... &in a tmux session.systemd-inhibitdoes not work in WSL2. GPU: Pass--backend lightning.gpufor acceleration (requires cuQuantum).
Reproducibility
Reproducibility is enforced by the pipeline, not assumed. Before any entry is written, a guard checks that:
- the linear-algebra backend is restricted to one thread,
- installed package versions match
requirements-v4.txt, and - the git tree is clean, so the recorded commit describes the code that ran.
An entry that fails any check is not written. Each entry records its thread count and full software environment in its provenance block.
What reproducibility means here. Gradient-free optimizers are certified on outcome — the regenerated gap stays below the certification threshold — not on bit-identical energies across machines. Bit-identical regeneration is guaranteed only on the reference pinned environment. A gradient-free optimizer picks its next step by comparing two nearly equal energies, so a last-bit arithmetic difference can flip a comparison and land the run in a different local minimum: two simulator backends agreeing to 10⁻¹³ Ha have ended 11 mHa apart after COBYLA. Verify accordingly — --mode certification across machines, --mode strict on the pinned environment. Measured envelopes and the two entries that do not re-certify across environments are in docs/VERIFICATION_SWEEP.md.
The single-thread requirement is not a detail. Multi-threaded BLAS sums floating-point numbers in whatever order cores finish, which perturbs an energy in its last bits — and a gradient-free optimizer such as COBYLA, which picks its next step by comparing energies, can be driven into a different local minimum by that noise. We found this in our own published numbers and re-ran the entire suite. The full account is in We Audited Our Own VQE Benchmark.
To check your own setup — not just ours:
python tools/check_vqe_reproducibility.py # scorecard for this machine
python tools/check_vqe_reproducibility.py --record # write a provenance receipt
Pipeline
PySCF: HF → [CASSCF] → CASCI reference energy
↓
Qubit Hamiltonian from active-space integrals (OpenFermion bridge)
↓ JW / PAR / BK mapping
Z2 symmetry tapering (reduces qubit count)
↓
VQE — UCCSD, HEA, or ADAPT-VQE
COBYLA (gradient-free) or L-BFGS-B (analytic gradients)
single-threaded BLAS, pinned before NumPy loads
↓
SHA-256 provenance hash + Ed25519 signature → JSON entry
All reference energies (HF, MP2, CCSD, CCSD(T), CASCI) are computed by PySCF. The VQE gap is always |E_VQE − E_CASCI| — never against full-system FCI or a classical approximation.
Leaderboard categories
| Category | Ranked by |
|---|---|
| Accuracy | Lowest |E_VQE − E_CASCI| gap (Ha) |
| Lowest Cost | Fewest 2-qubit gates, then circuit depth |
| Balanced | Equal-weight normalised rank score |
| Research | Validated entries (gap ≥ 0.01 Ha) — recorded, never discarded |
Cost and Balanced also report an estimated T-gate count, the resource-relevant cost of a fault-tolerant implementation.
Repository structure
qencode-db/
├── molecules_v4.json # Suite v4 molecule catalog
├── requirements-v4.txt # Pinned environment (PySCF 2.6.2, PennyLane 0.45.0)
├── requirements-v3.txt # Frozen v3 environment
├── requirements-tools.txt # Extra deps for the leaderboard scripts (pandas, cryptography)
├── Dockerfile # Pinned, single-threaded run environment
├── QUICKSTART.md # Five-minute walkthrough
├── pyproject.toml # Package metadata, pinned deps, `qencode` entry point
├── src/qencode/ # The installable package
│ ├── __init__.py # Public API: generate_entry, load_entry, gap_mha
│ ├── cli.py # `qencode run | check | resources | where`
│ ├── _paths.py # Locates the checkout, or falls back to bundled data
│ ├── pipeline/ # Main pipeline (PySCF → taper → VQE → JSON)
│ └── data/ # Molecule catalogues bundled into the wheel
├── scripts/
│ ├── generate_entry_v4.py # Compatibility shim onto qencode.pipeline
│ ├── export_leaderboard_v4.py # JSON db → CSVs with deduplication
│ ├── publish_leaderboard.py # CSVs → Neon Postgres via /api/admin/publish-leaderboard
│ ├── verify_entry.py # Re-run any entry, auto-detects v3 vs v4 schema
│ └── of_bridge.py # Compatibility shim onto qencode.pipeline
├── tools/
│ └── check_vqe_reproducibility.py # Reproducibility scorecard for any VQE setup
├── releases/
│ ├── v4/db/ # Suite v4 (cc-pVDZ) entry JSONs ← current
│ ├── v3.1/db/ # Suite v3.1 (6-31G) frozen entries
│ └── v3/db/ # Suite v3 (STO-3G) frozen entries
├── docs/
│ ├── GETTING_STARTED.md # Longer-form introduction
│ ├── SUBMISSIONS.md # Submitting a result
│ ├── LEADERBOARD_RULES_V2.md # How rows are ranked
│ ├── TRUST_POLICY.md # Certified vs research tier
│ └── V4_PLAN.md # Suite roadmap
├── website/ # Next.js site on Vercel
└── schema/schema_v4.json # Entry JSON schema (v4)
Entry ID format (v4)
{mol}_{basis}_{MAP}_{ANS}_v4[_casscf]_tapered__sha256_{hash16}
Example: N2_ccpvdz_JW_ADAPT_v4_casscf_tapered__sha256_850d9d253b878943
Reproducibility and CI
The CI badge above runs on every commit. It re-generates H₂ and HF entries from scratch using the pinned environment and verifies the VQE gap matches the stored artifact. The v4 smoke job additionally checks that the gap is below the 0.01 Ha certification threshold.
Certification
The benchmark suite is free to run yourself. Managed certification — with Ed25519-signed artifacts, CASCI reference verification, and an audit-ready report — is available for teams that need verified results for publications, grant applications, or hardware evaluations.
Citation
If you use QEncode in your research, please cite it using the metadata in CITATION.cff.
QEncode Benchmark Suite v4 (2026). qencode-benchmark.org
Contributing
Contributions are welcome — especially a result of ours that does not reproduce for you. See CONTRIBUTING.md for setup, the determinism rules the project enforces, and how to propose a molecule or submit an entry.
License
Apache License 2.0 — see LICENSE. Free to use, modify, and redistribute, including commercially, with an express patent grant.
Contact
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qencode_benchmark-4.5.0.tar.gz.
File metadata
- Download URL: qencode_benchmark-4.5.0.tar.gz
- Upload date:
- Size: 103.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2378a764c99ce4b38e8b8f1ada6f07b7c5a22cae8efb234c5773eba59699403
|
|
| MD5 |
446587e1a8e932ae83254c4691863001
|
|
| BLAKE2b-256 |
f3b43dc7a630e572d9beef05bbf23371a759cf4a550e6fad891e21fb63c34ca8
|
Provenance
The following attestation bundles were made for qencode_benchmark-4.5.0.tar.gz:
Publisher:
publish.yml on qencode-benchmark/qencode-benchmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qencode_benchmark-4.5.0.tar.gz -
Subject digest:
f2378a764c99ce4b38e8b8f1ada6f07b7c5a22cae8efb234c5773eba59699403 - Sigstore transparency entry: 2713095412
- Sigstore integration time:
-
Permalink:
qencode-benchmark/qencode-benchmark@2fbee6028a5084977dfa350529f737bfe87f2c20 -
Branch / Tag:
refs/tags/v4.5.0 - Owner: https://github.com/qencode-benchmark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2fbee6028a5084977dfa350529f737bfe87f2c20 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qencode_benchmark-4.5.0-py3-none-any.whl.
File metadata
- Download URL: qencode_benchmark-4.5.0-py3-none-any.whl
- Upload date:
- Size: 89.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa0b5666dc9cdefa27f38871a469852f6b064fe23e4ae73ff8afa094fd8207f8
|
|
| MD5 |
c49fbd4d04f5e849dbb520be0ff23070
|
|
| BLAKE2b-256 |
169f0d33c4c16b96d860f0849903f402559f32be621ea94af0e5f8776cdff05f
|
Provenance
The following attestation bundles were made for qencode_benchmark-4.5.0-py3-none-any.whl:
Publisher:
publish.yml on qencode-benchmark/qencode-benchmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qencode_benchmark-4.5.0-py3-none-any.whl -
Subject digest:
aa0b5666dc9cdefa27f38871a469852f6b064fe23e4ae73ff8afa094fd8207f8 - Sigstore transparency entry: 2713095536
- Sigstore integration time:
-
Permalink:
qencode-benchmark/qencode-benchmark@2fbee6028a5084977dfa350529f737bfe87f2c20 -
Branch / Tag:
refs/tags/v4.5.0 - Owner: https://github.com/qencode-benchmark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2fbee6028a5084977dfa350529f737bfe87f2c20 -
Trigger Event:
release
-
Statement type: