File size: 14,937 Bytes
4166aac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | ---
license: cc-by-4.0
language: en
pretty_name: "QM7b — Quantum-Augmented (QParquet v1.0)"
tags:
- chemistry
- molecular-property
- quantum-chemistry
- quantum-machine-learning
- quantum-kernels
- qm7b
- benchmark
size_categories:
- 1K<n<10K
task_categories:
- tabular-regression
- tabular-classification
---
# QM7b — Quantum-Augmented Dataset
A quantum-augmented edition of QM7b (Montavon et al. 2013, [arXiv:1305.7074](https://arxiv.org/abs/1305.7074)) — 7,211 small organic molecules with 14 computed quantum-chemistry properties (atomization energies, polarizabilities, HOMO/LUMO eigenvalues, ionization potentials, electron affinities, excitation energies) at PBE0 / ZINDO / GW / SCS levels of theory.
Each molecule carries its packed heavy-atom Coulomb-matrix features, the 14 original DFT-computed property targets, a derived HOMO–LUMO gap at GW level, and a **quantum-derived label `y_q`** produced by a Heisenberg-model quantum kernel on a 7-qubit simulator. The kernel matrix `K_q` and the per-sample 1-RDM observables are precomputed and shipped alongside, so downstream consumers can train against quantum-geometric structure without running any quantum circuit themselves.
Produced by **ReLab** (Sirius Quantum), shipped in **QParquet v1.0**.
---
## Headline result
On the 6,041-molecule subset of QM7b with exactly 7 heavy atoms (C, N, O, S, Cl), N_train=300 / N_test=100 stratified by HOMO–LUMO-gap quartile, the quantum kernel exposes a label channel that classical kernels on the same Coulomb features cannot represent.
**Quantum-kernel separation on a structural label channel**
| measurement | value | interpretation |
|---|---|---|
| accuracy of quantum-kernel SVC on a quantum-derived label channel | **0.81** | quantum kernel fits its own geometric label direction |
| accuracy of classical-RBF SVC on the same labels | **0.49** (chance) | classical RBF cannot represent that direction |
| prediction-accuracy advantage of quantum kernel over classical RBF on the label channel | **+0.32** | head-to-head moat metric ([Huang et al. 2021 §IV](https://arxiv.org/abs/2011.01938)) |
| kernel-space geometric difference `g(K_Q, K_RBF)` | **19.71** vs threshold **√N = 17.32** | quantum and classical kernels are structurally distinct ([Schuld 2024](https://arxiv.org/abs/2403.07059); [Huang 2021](https://arxiv.org/abs/2011.01938) Fig. 1) |
| sample-complexity ratio `s_classical / s_quantum` derived from kernel-target alignment | **~1,500×** | quantum kernel needs ~1,500× less data to reach the same alignment on `y_q` |
**Shuffled-label null** (n = 30 permutations of training labels, fixed test labels):
| measurement | real | null (mean ± std) | z-score |
|---|---|---|---|
| quantum SVC accuracy | 0.81 | 0.506 ± 0.067 | **+4.54** |
| classical SVC accuracy | 0.49 | 0.495 ± 0.058 | −0.09 |
| accuracy advantage | +0.32 | +0.011 ± 0.094 | **+3.27** |
The quantum SVC accuracy is 4.5 σ above shuffled chance; the head-to-head advantage is 3.3 σ above the shuffled null. The classical SVC is at chance whether the training labels are shuffled or not, confirming `y_q` is genuinely quantum-geometric and not a memorisation artifact.
---
## Compressed-representation regression — head-to-head on the 14 original properties
Per-property kernel ridge regression on each original DFT property, plus the derived HOMO–LUMO gap, head-to-head against classical RBF on the same 28-dimensional packed Coulomb features. The quantum kernel uses **7 qubits** — a **4× compression** of the feature representation.
| target index | observed range | classical MAE | quantum MAE | Δ (q − c) | 2 σ_classical_CV | within tolerance |
|---|---|---|---|---|---|---|
| T00 (atomization energy, PBE0) | −2213 to −410 | 119.25 | 332.32 | +213.07 | 28.35 | — |
| T01 (polarizability, PBE0) | 3.4 to 39.7 | 3.156 | 3.188 | +0.032 | 0.478 | ✓ |
| T02 (polarizability, SCS) | 0.05 to 3.35 | 0.205 | 0.202 | −0.003 | 0.021 | ✓ |
| T03 (HOMO, GW) | −16.0 to −7.5 | 0.985 | 1.657 | +0.672 | 0.167 | — |
| T04 (LUMO, GW) | −2.3 to +4.2 | 1.187 | 1.159 | −0.028 | 0.156 | ✓ |
| T05 (IP, ZINDO) | 1.5 to 36.8 | 1.632 | 1.701 | +0.069 | 0.328 | ✓ |
| T06 (EA, ZINDO) | 6.9 to 15.7 | 0.964 | 1.609 | +0.644 | 0.169 | — |
| T07 (E1, ZINDO) | −4.0 to +2.9 | 1.322 | 1.236 | −0.086 | 0.219 | ✓ |
| T08 (Emax, ZINDO) | −10.95 to −5.12 | 0.613 | 1.153 | +0.541 | 0.088 | — |
| T09 (Imax, ZINDO) | −3.81 to +0.41 | 0.621 | 0.632 | +0.010 | 0.037 | ✓ |
| T10 (HOMO, ZINDO) | −14.1 to −7.0 | 0.659 | 1.442 | +0.783 | 0.100 | — |
| T11 (LUMO, ZINDO) | −1.84 to +1.96 | 0.405 | 0.425 | +0.020 | 0.080 | ✓ |
| T12 (uncertain — see column-mapping note) | 2.53 to 17.17 | 0.741 | 2.295 | +1.554 | 0.332 | — |
| T13 (uncertain — see column-mapping note) | 2.43 to 16.46 | 0.599 | 2.490 | +1.891 | 0.298 | — |
| **gap_GW** (LUMO_GW − HOMO_GW) | 7.34 to 15.24 | 1.844 | 2.240 | +0.396 | 0.344 | — |
The quantum kernel matches classical RBF (Δ within ±2 σ of classical 5-fold CV variance) on **7 of the 15 targets**: both polarizabilities, LUMO_GW, IP_ZINDO, the first ZINDO excitation, the absorption intensity, and LUMO_ZINDO. It underperforms on the absolute atomization energy, both HOMO eigenvalues, electron affinity, the maximal absorption energy, and the HOMO–LUMO gap (which inherits the HOMO error). Original-task regression is reportable for the targets where it matches classical RBF; the dataset's value as a quantum-augmented release rests on the structural label channel, not on universal regression dominance.
---
## Column-mapping caveat — names array in source `.mat` is scrambled
The `names` field in the upstream `qm7b.mat` file is character-array corrupted by `scipy.io.loadmat` and is not human-readable as shipped. The 14 property indices in this datacard follow the canonical ordering from **Montavon et al. 2013, Table 1** ([arXiv:1305.7074](https://arxiv.org/abs/1305.7074)).
Indices with unambiguous numeric ranges — T03 / T04 (HOMO / LUMO GW eigenvalues), T10 / T11 (HOMO / LUMO ZINDO) — are confidently labelled. **T12 and T13** have positive ranges that do not match HOMO / LUMO PBE0 (eigenvalues should be negative for HOMO), so we mark them *uncertain*. Consumers needing exact column semantics should cross-reference Montavon 2013.
---
## What this dataset adds over a classical QM7b
| field | classical QM7b | this dataset |
|---|---|---|
| Coulomb matrices + 14 property targets | ✓ | ✓ |
| packed heavy-atom features (28-D) | — | ✓ |
| `K_q` — precomputed quantum kernel matrix (N × N float32) | — | ✓ |
| `y_q` — quantum-derived labels in {−1, +1} | — | ✓ |
| `observables_1rdm` — per-sample 1-RDM Pauli expectations | — | ✓ |
| derived `gap_GW` target | — | ✓ |
| validated schema + provenance metadata | — | ✓ |
The added columns express geometric structure in a 7-qubit Hilbert space (a Heisenberg model on the molecular bond graph) that classical kernels on the same Coulomb features do not capture — the shuffled-null and head-to-head numbers above quantify how much.
---
## Schema (QParquet v1.0)
QParquet v1.0 ships a kernel-centric schema; classical features and targets remain joinable from the upstream QM7b source by `input_id` (SHA-1 of the packed Coulomb-matrix sub-vector, first 16 hex chars).
| column | type | shape | description |
|---|---|---|---|
| `row_idx` | int64 | (N,) | row index `0 … N−1`, sorted on read |
| `input_id` | string | (N,) | stable per-sample identifier (SHA-1 of `features_packed[i]`) |
| `kernel_row` | list<float32> | (N,) per row → (N, N) total | row of `K_q` — the quantum fidelity kernel matrix |
| `labels_quantum` | int8 | (N, 1) | `y_q` ∈ {−1, +1} — quantum-derived labels |
| `observables_1rdm` | list<float32> | (N, 21) | per-sample 1-RDM Pauli ⟨X_j⟩, ⟨Y_j⟩, ⟨Z_j⟩ for j ∈ [0, 7) |
| file-level `qparquet_metadata` | JSON (parquet key-value metadata) | — | encoding, n_qubits, backend, full evaluation report, per-property MAE table, shuffled-null z-scores, citations |
Validation enforced at write time: `K_q` square, symmetric within atol = 1e-6, diagonal ≈ 1.0 within atol = 1e-3, `input_ids` unique, `observables_1rdm` shape `(N, 3·n_qubits)`.
To recover the classical features and DFT property targets, join by `input_id` against the upstream QM7b `.mat` file (`scipy.io.loadmat("qm7b.mat")`); the hashing is deterministic on `features_packed`. The full classical view is not duplicated in this artifact — its value is the quantum-augmented columns.
---
## Loading
```python
import numpy as np
import pandas as pd
import pyarrow.parquet as pq
from sklearn.svm import SVC
from sklearn.kernel_ridge import KernelRidge
# QParquet v1.0 — read the kernel matrix and quantum labels
table = pq.read_table("qm7b_quantum.parquet")
df = table.to_pandas()
K_q = np.vstack(df["kernel_row"].to_numpy()).astype(np.float32) # (N, N)
y_q = np.vstack(df["labels_quantum"].to_numpy()).ravel().astype(np.int8)
input_ids = df["input_id"].tolist()
# File-level qparquet_metadata (encoding, evaluation, citations, …)
import json
meta = json.loads(table.schema.metadata[b"qparquet_metadata"].decode())
# Train on the quantum-derived label channel
clf = SVC(kernel="precomputed", C=1.0).fit(K_q[:300], y_q[:300])
print(clf.score(K_q[300:, :300], y_q[300:]))
# Original-task regression: join with upstream QM7b for classical targets
# (download qm7b.mat from quantum-machine.org/data/qm7b.mat — link in metadata)
```
The dataset is a drop-in for scikit-learn precomputed-kernel pipelines: load `K_q`, train. No quantum hardware or simulator required at inference time.
To produce `K_q` and `y_q` for *new* molecules with the ReLab SDK:
```python
import relab
# Quantum kernel matrix
K_q = relab.kernel(features_scaled, domain="molecular", n_qubits=7)
# Quantum-derived labels
y_q = relab.fit(features_scaled, domain="molecular", n_qubits=7)
```
---
## Methodology
- **Encoding**: a Heisenberg model on the molecular bond graph (`XX + YY + ZZ` couplings, one qubit per heavy atom). Coulomb off-diagonals `J_ij` map to bond couplings; diagonals `h_i = ½ Z_i^2.4` map to local fields. Reference: [arXiv:2407.14055](https://arxiv.org/abs/2407.14055) (Heisenberg encoding for graph-structured data).
- **Why this encoding for molecular data**: Coulomb sub-matrix entries are physics-native pairwise couplings — encoding them as quantum entanglement preserves the topological inductive bias that sorted-eigenspectrum representations ([Rupp et al. 2012](https://arxiv.org/abs/1109.2618)) destroy. Validated on QM7 atomization-energy regression prior to this dataset.
- **Feature scaling**: `MinMaxScaler` to `[−π, π]` per [Schuld, Sweke, Meyer 2021](https://arxiv.org/abs/2008.08605) Fourier-bandwidth constraint.
- **Quantum-label construction**: generalised Rayleigh quotient on `K_q` against the classical-RBF kernel `K_c`, threshold at the median back-projection ([Huang et al. 2021 §IV](https://arxiv.org/abs/2011.01938)). Test-set extension via quantum-kernel interpolation — `K_q` is the only kernel that can faithfully generalise the quantum label direction.
- **Backend**: Apple Silicon Metal GPU via the Zilver MLX simulator (open-source v0.3.2). Statevector-exact at 7 qubits. Cross-verified against a pure-NumPy reference at atol = 1e-4.
### What this kernel is, in plain language
The kernel compresses 28-dimensional Coulomb features into a 7-qubit Hilbert space and measures molecular similarity as the fidelity of two Heisenberg-evolved states. At seven qubits, the kernel is *classically tractable in practice* — the full N × N matrix is computable in tens of seconds on a laptop. The claim is **compression and quantum-geometric structure**, not asymptotic classical hardness. The geometry the kernel measures is not reproduced by RBF, polynomial, or cosine kernels on the same Coulomb features; that distinctness is what the head-to-head and shuffled-null numbers above quantify.
For the asymptotic-hardness question see Tang's body of work on dequantisation ([arXiv:1807.04271](https://arxiv.org/abs/1807.04271); [arXiv:1910.06151](https://arxiv.org/abs/1910.06151)) and the QSVT framework ([Gilyén, Su, Low, Wiebe 2019](https://arxiv.org/abs/1806.01838)). The plain Heisenberg fidelity kernel is BQP-complete worst-case ([Janzing & Wocjan 2007](https://arxiv.org/abs/quant-ph/0610203)) but admits no published Tang-style classical sampling algorithm; we do not make an asymptotic-hardness claim at seven qubits. The QSVT spectral-filter upgrade — block-encoding the bond Hamiltonian and applying a HOMO–LUMO gap-midpoint projector polynomial — *is* provably not dequantisable ([Lin & Tong 2020](https://arxiv.org/abs/2002.12508); [Martyn et al. 2021](https://arxiv.org/abs/2105.02859)) and is on the ReLab roadmap; it is not the kernel shipped in this dataset.
---
## Reproduction
Headline run:
- N_train = 300, N_test = 100, stratified across HOMO–LUMO-gap quartiles
- RNG seed = 42
- Backend: Zilver MLX simulator on Apple Silicon Metal GPU, max_qubits = 25
- `K_q` computed in 17.5 s; per-property KRR sweep in sub-second
---
## Citation
```bibtex
@dataset{relab_qm7b_quantum_2026,
title = {QM7b — Quantum-Augmented (QParquet v1.0)},
author = {ReLab (Sirius Quantum)},
year = {2026},
source = {derived from Montavon et al. 2013, arXiv:1305.7074},
note = {Quantum kernel matrix and quantum-derived labels via a Heisenberg model on the molecular bond graph (7 qubits, one per heavy atom).}
}
```
If you build on this dataset, please also cite the upstream QM7b source (Montavon 2013) and the ReLab engine that generated the quantum-augmented columns.
## References
- Montavon, Rupp, Gobre, Vazquez-Mayagoitia, Hansen, Tkatchenko, Müller, von Lilienfeld 2013 — [arXiv:1305.7074](https://arxiv.org/abs/1305.7074) — QM7b dataset
- Rupp, Tkatchenko, Müller, von Lilienfeld 2012 — [arXiv:1109.2618](https://arxiv.org/abs/1109.2618) — Coulomb-matrix representation
- Huang et al. 2021 — [arXiv:2011.01938](https://arxiv.org/abs/2011.01938) §IV — head-to-head benchmark, geometric difference threshold, sample-complexity bound
- Schuld, Sweke, Meyer 2021 — [arXiv:2008.08605](https://arxiv.org/abs/2008.08605) — Fourier-bandwidth scaling
- Schuld 2024 — [arXiv:2403.07059](https://arxiv.org/abs/2403.07059) — geometric advantage `g(K_Q, K_C)`
- Zhao et al. 2026 — [arXiv:2604.07639](https://arxiv.org/abs/2604.07639) — compression-match framework
- Gilyén, Su, Low, Wiebe 2019 — [arXiv:1806.01838](https://arxiv.org/abs/1806.01838) — QSVT
- Janzing & Wocjan 2007 — [arXiv:quant-ph/0610203](https://arxiv.org/abs/quant-ph/0610203) — BQP-completeness of Hamiltonian overlap
- arXiv:2407.14055 — graph-Hamiltonian encoding for structured data
|