Answering that means comparing it against the exact ground state of the same active-space Hamiltonian — and computing one normally costs a PySCF install and a wait.
QEncode ships those reference energies for all 16 suite molecules inside the package. Scoring is one function call, imports no chemistry stack, and needs no network.
pip install qencode-benchmark
import qencode
s = qencode.score(-7.9835, # your energy, in Hartree
molecule="LiH",
active_space=(4, 4), # checked, not assumed
optimizer="COBYLA",
ansatz="hea")
print(s.report())Which prints:
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)
optimiser COBYLA (gradient-free)
amplifying YES -- gradient-free optimiser on an unstructured
ansatz. Re-run elsewhere, energies in this class
have moved by up to 1e-2 Ha.
among published #3 of 4 QEncode entries for this problem
best published gap 0.003 mHaA gradient-free optimiser picks its next step by comparing two nearly equal energies, so a difference in the thirteenth decimal — a different BLAS, a different NumPy — can flip a comparison and send the run into a different local minimum. That much is known.
What we measured is that the optimiser alone is not the rule. Holding molecule, basis, mapping and environment fixed on H₄ and changing only the ansatz:
| H₄ entry | Optimiser | Energy moved |
|---|---|---|
| ADAPT | COBYLA inner | 3.4 × 10⁻⁸ Ha |
| HEA | plain COBYLA | 8.8 × 10⁻⁴ Ha |
A factor of 25,595, with the same optimiser family on both rows. ADAPT-VQE selects its operators by analytic gradient, so the ansatz structure is gradient-determined and the gradient-free optimiser only polishes a small, well-conditioned parameter set. An unstructured ansatz hands the same optimiser a landscape full of near-degenerate minima. The risk is the conjunction: gradient-free and unstructured — which is what the amplifying flag reports.
A scoring tool that always returns a number is easy to write and easy to mislead yourself with. These are the cases where it raises or warns instead.
Declare an active space that differs from the reference and it raises rather than scoring. A gap measured between two different problems is not a worse number — it is a meaningless one.
The variational principle forbids a wavefunction energy below the exact ground state. If yours is lower, the problem you solved is not the one you think — a different geometry, active space, charge or spin, or a Hamiltonian missing its nuclear repulsion. That warning comes before any gap.
Scoring says a self-reported number would meet the threshold. Certification requires the pipeline: pinned environment, recorded provenance, a SHA-256 content hash and an Ed25519 signature. There is no field named certified, and a test enforces the wording.
Only the 16 suite molecules have published references. Anything else raises and tells you what is available, rather than silently comparing against the closest match.
All 16 Suite v4 problems, at the cc-pVDZ basis. Your geometry, charge, spin and active space must match the reference — the exact values are printed by qencode.reference("LiH").
| Molecule | Active space | Orbitals | Exact E₀ (Ha) | Entries |
|---|---|---|---|---|
| H2 | [2e, 2o] | hf | -1.131287 | 6 |
| HF | [2e, 2o] | hf | -100.019483 | 6 |
| BeH2 | [4e, 4o] | hf | -15.768411 | 4 |
| C4H4 | [4e, 4o] | casscf | -153.673427 | 4 |
| C4H6 | [4e, 4o] | hf | -154.921897 | 1 |
| H2CO | [4e, 4o] | hf | -113.896953 | 1 |
| H2O | [4e, 4o] | hf | -76.027338 | 3 |
| H4 | [4e, 4o] | hf | -2.186232 | 4 |
| LiH | [4e, 4o] | hf | -7.983773 | 3 |
| NH3 | [4e, 4o] | hf | -56.197889 | 3 |
| water_dimer | [4e, 4o] | hf | -152.062719 | 4 |
| benzene | [6e, 6o] | casscf | -230.787137 | 3 |
| H6 | [6e, 6o] | casscf | -3.316869 | 3 |
| N2 | [6e, 6o] | casscf | -109.089958 | 7 |
| H8 | [8e, 8o] | casscf | -4.414546 | 1 |
| H10 | [10e, 10o] | casscf | -5.512849 | 1 |
Reference energies are exact diagonalisation (CASCI) of the qubit Hamiltonian in the declared active space, generated from the 54 published entries. The same table ships inside the package, and a test fails if the two copies disagree. Entries counts every published entry for that problem — certified and research tier alike. N₂ has seven published entries and three that meet the threshold; a research-tier entry is a real result that hit the method's limit, not a discarded one.
Not on the list? QEncode has no reference for it, so this cannot score it — but qencode run computes the CASCI reference as part of generating an entry. That path does need the chemistry stack.
The honest next step is to stop self-reporting it. Generate a real entry: the same procedure, but with the environment pinned, the provenance recorded, and a content hash over the result — which is what makes it something a reviewer can rebuild.
qencode run --molecule LiH --mapping jordan_wigner --ansatz-type uccsd