deryakarl commited on
Commit
4166aac
·
verified ·
1 Parent(s): bc90c41

Add datacard

Browse files
Files changed (1) hide show
  1. README.md +219 -0
README.md ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language: en
4
+ pretty_name: "QM7b — Quantum-Augmented (QParquet v1.0)"
5
+ tags:
6
+ - chemistry
7
+ - molecular-property
8
+ - quantum-chemistry
9
+ - quantum-machine-learning
10
+ - quantum-kernels
11
+ - qm7b
12
+ - benchmark
13
+ size_categories:
14
+ - 1K<n<10K
15
+ task_categories:
16
+ - tabular-regression
17
+ - tabular-classification
18
+ ---
19
+
20
+ # QM7b — Quantum-Augmented Dataset
21
+
22
+ 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.
23
+
24
+ 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.
25
+
26
+ Produced by **ReLab** (Sirius Quantum), shipped in **QParquet v1.0**.
27
+
28
+ ---
29
+
30
+ ## Headline result
31
+
32
+ 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.
33
+
34
+ **Quantum-kernel separation on a structural label channel**
35
+
36
+ | measurement | value | interpretation |
37
+ |---|---|---|
38
+ | accuracy of quantum-kernel SVC on a quantum-derived label channel | **0.81** | quantum kernel fits its own geometric label direction |
39
+ | accuracy of classical-RBF SVC on the same labels | **0.49** (chance) | classical RBF cannot represent that direction |
40
+ | 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)) |
41
+ | 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) |
42
+ | 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` |
43
+
44
+ **Shuffled-label null** (n = 30 permutations of training labels, fixed test labels):
45
+
46
+ | measurement | real | null (mean ± std) | z-score |
47
+ |---|---|---|---|
48
+ | quantum SVC accuracy | 0.81 | 0.506 ± 0.067 | **+4.54** |
49
+ | classical SVC accuracy | 0.49 | 0.495 ± 0.058 | −0.09 |
50
+ | accuracy advantage | +0.32 | +0.011 ± 0.094 | **+3.27** |
51
+
52
+ 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.
53
+
54
+ ---
55
+
56
+ ## Compressed-representation regression — head-to-head on the 14 original properties
57
+
58
+ 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.
59
+
60
+ | target index | observed range | classical MAE | quantum MAE | Δ (q − c) | 2 σ_classical_CV | within tolerance |
61
+ |---|---|---|---|---|---|---|
62
+ | T00 (atomization energy, PBE0) | −2213 to −410 | 119.25 | 332.32 | +213.07 | 28.35 | — |
63
+ | T01 (polarizability, PBE0) | 3.4 to 39.7 | 3.156 | 3.188 | +0.032 | 0.478 | ✓ |
64
+ | T02 (polarizability, SCS) | 0.05 to 3.35 | 0.205 | 0.202 | −0.003 | 0.021 | ✓ |
65
+ | T03 (HOMO, GW) | −16.0 to −7.5 | 0.985 | 1.657 | +0.672 | 0.167 | — |
66
+ | T04 (LUMO, GW) | −2.3 to +4.2 | 1.187 | 1.159 | −0.028 | 0.156 | ✓ |
67
+ | T05 (IP, ZINDO) | 1.5 to 36.8 | 1.632 | 1.701 | +0.069 | 0.328 | ✓ |
68
+ | T06 (EA, ZINDO) | 6.9 to 15.7 | 0.964 | 1.609 | +0.644 | 0.169 | — |
69
+ | T07 (E1, ZINDO) | −4.0 to +2.9 | 1.322 | 1.236 | −0.086 | 0.219 | ✓ |
70
+ | T08 (Emax, ZINDO) | −10.95 to −5.12 | 0.613 | 1.153 | +0.541 | 0.088 | — |
71
+ | T09 (Imax, ZINDO) | −3.81 to +0.41 | 0.621 | 0.632 | +0.010 | 0.037 | ✓ |
72
+ | T10 (HOMO, ZINDO) | −14.1 to −7.0 | 0.659 | 1.442 | +0.783 | 0.100 | — |
73
+ | T11 (LUMO, ZINDO) | −1.84 to +1.96 | 0.405 | 0.425 | +0.020 | 0.080 | ✓ |
74
+ | T12 (uncertain — see column-mapping note) | 2.53 to 17.17 | 0.741 | 2.295 | +1.554 | 0.332 | — |
75
+ | T13 (uncertain — see column-mapping note) | 2.43 to 16.46 | 0.599 | 2.490 | +1.891 | 0.298 | — |
76
+ | **gap_GW** (LUMO_GW − HOMO_GW) | 7.34 to 15.24 | 1.844 | 2.240 | +0.396 | 0.344 | — |
77
+
78
+ 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.
79
+
80
+ ---
81
+
82
+ ## Column-mapping caveat — names array in source `.mat` is scrambled
83
+
84
+ 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)).
85
+
86
+ 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.
87
+
88
+ ---
89
+
90
+ ## What this dataset adds over a classical QM7b
91
+
92
+ | field | classical QM7b | this dataset |
93
+ |---|---|---|
94
+ | Coulomb matrices + 14 property targets | ✓ | ✓ |
95
+ | packed heavy-atom features (28-D) | — | ✓ |
96
+ | `K_q` — precomputed quantum kernel matrix (N × N float32) | — | ✓ |
97
+ | `y_q` — quantum-derived labels in {−1, +1} | — | ✓ |
98
+ | `observables_1rdm` — per-sample 1-RDM Pauli expectations | — | ✓ |
99
+ | derived `gap_GW` target | — | ✓ |
100
+ | validated schema + provenance metadata | — | ✓ |
101
+
102
+ 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.
103
+
104
+ ---
105
+
106
+ ## Schema (QParquet v1.0)
107
+
108
+ 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).
109
+
110
+ | column | type | shape | description |
111
+ |---|---|---|---|
112
+ | `row_idx` | int64 | (N,) | row index `0 … N−1`, sorted on read |
113
+ | `input_id` | string | (N,) | stable per-sample identifier (SHA-1 of `features_packed[i]`) |
114
+ | `kernel_row` | list<float32> | (N,) per row → (N, N) total | row of `K_q` — the quantum fidelity kernel matrix |
115
+ | `labels_quantum` | int8 | (N, 1) | `y_q` ∈ {−1, +1} — quantum-derived labels |
116
+ | `observables_1rdm` | list<float32> | (N, 21) | per-sample 1-RDM Pauli ⟨X_j⟩, ⟨Y_j⟩, ⟨Z_j⟩ for j ∈ [0, 7) |
117
+ | 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 |
118
+
119
+ 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)`.
120
+
121
+ 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.
122
+
123
+ ---
124
+
125
+ ## Loading
126
+
127
+ ```python
128
+ import numpy as np
129
+ import pandas as pd
130
+ import pyarrow.parquet as pq
131
+ from sklearn.svm import SVC
132
+ from sklearn.kernel_ridge import KernelRidge
133
+
134
+ # QParquet v1.0 — read the kernel matrix and quantum labels
135
+ table = pq.read_table("qm7b_quantum.parquet")
136
+ df = table.to_pandas()
137
+ K_q = np.vstack(df["kernel_row"].to_numpy()).astype(np.float32) # (N, N)
138
+ y_q = np.vstack(df["labels_quantum"].to_numpy()).ravel().astype(np.int8)
139
+ input_ids = df["input_id"].tolist()
140
+
141
+ # File-level qparquet_metadata (encoding, evaluation, citations, …)
142
+ import json
143
+ meta = json.loads(table.schema.metadata[b"qparquet_metadata"].decode())
144
+
145
+ # Train on the quantum-derived label channel
146
+ clf = SVC(kernel="precomputed", C=1.0).fit(K_q[:300], y_q[:300])
147
+ print(clf.score(K_q[300:, :300], y_q[300:]))
148
+
149
+ # Original-task regression: join with upstream QM7b for classical targets
150
+ # (download qm7b.mat from quantum-machine.org/data/qm7b.mat — link in metadata)
151
+ ```
152
+
153
+ 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.
154
+
155
+ To produce `K_q` and `y_q` for *new* molecules with the ReLab SDK:
156
+
157
+ ```python
158
+ import relab
159
+
160
+ # Quantum kernel matrix
161
+ K_q = relab.kernel(features_scaled, domain="molecular", n_qubits=7)
162
+
163
+ # Quantum-derived labels
164
+ y_q = relab.fit(features_scaled, domain="molecular", n_qubits=7)
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Methodology
170
+
171
+ - **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).
172
+ - **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.
173
+ - **Feature scaling**: `MinMaxScaler` to `[−π, π]` per [Schuld, Sweke, Meyer 2021](https://arxiv.org/abs/2008.08605) Fourier-bandwidth constraint.
174
+ - **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.
175
+ - **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.
176
+
177
+ ### What this kernel is, in plain language
178
+
179
+ 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.
180
+
181
+ 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.
182
+
183
+ ---
184
+
185
+ ## Reproduction
186
+
187
+ Headline run:
188
+ - N_train = 300, N_test = 100, stratified across HOMO–LUMO-gap quartiles
189
+ - RNG seed = 42
190
+ - Backend: Zilver MLX simulator on Apple Silicon Metal GPU, max_qubits = 25
191
+ - `K_q` computed in 17.5 s; per-property KRR sweep in sub-second
192
+
193
+ ---
194
+
195
+ ## Citation
196
+
197
+ ```bibtex
198
+ @dataset{relab_qm7b_quantum_2026,
199
+ title = {QM7b — Quantum-Augmented (QParquet v1.0)},
200
+ author = {ReLab (Sirius Quantum)},
201
+ year = {2026},
202
+ source = {derived from Montavon et al. 2013, arXiv:1305.7074},
203
+ note = {Quantum kernel matrix and quantum-derived labels via a Heisenberg model on the molecular bond graph (7 qubits, one per heavy atom).}
204
+ }
205
+ ```
206
+
207
+ 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.
208
+
209
+ ## References
210
+
211
+ - Montavon, Rupp, Gobre, Vazquez-Mayagoitia, Hansen, Tkatchenko, Müller, von Lilienfeld 2013 — [arXiv:1305.7074](https://arxiv.org/abs/1305.7074) — QM7b dataset
212
+ - Rupp, Tkatchenko, Müller, von Lilienfeld 2012 — [arXiv:1109.2618](https://arxiv.org/abs/1109.2618) — Coulomb-matrix representation
213
+ - Huang et al. 2021 — [arXiv:2011.01938](https://arxiv.org/abs/2011.01938) §IV — head-to-head benchmark, geometric difference threshold, sample-complexity bound
214
+ - Schuld, Sweke, Meyer 2021 — [arXiv:2008.08605](https://arxiv.org/abs/2008.08605) — Fourier-bandwidth scaling
215
+ - Schuld 2024 — [arXiv:2403.07059](https://arxiv.org/abs/2403.07059) — geometric advantage `g(K_Q, K_C)`
216
+ - Zhao et al. 2026 — [arXiv:2604.07639](https://arxiv.org/abs/2604.07639) — compression-match framework
217
+ - Gilyén, Su, Low, Wiebe 2019 — [arXiv:1806.01838](https://arxiv.org/abs/1806.01838) — QSVT
218
+ - Janzing & Wocjan 2007 — [arXiv:quant-ph/0610203](https://arxiv.org/abs/quant-ph/0610203) — BQP-completeness of Hamiltonian overlap
219
+ - arXiv:2407.14055 — graph-Hamiltonian encoding for structured data