Materials databases to first-quantized Hamiltonians.
QMatBridge turns classical materials-database records into a neutral, provenance-rich description of the Hamiltonian, so fault-tolerant quantum-simulation benchmarks can be compared and reproduced.
Sources
- Materials Project available
- OQMD 0.4.0
- OPTIMADE (any server) 0.5.0
- Alexandria PBE / PBEsol, via OPTIMADE 0.5.0
Neutral representation
QMatEntry
Provenance · structure · basis · oracle cost · canonical hash
Exporters
- Plane-wave arrays (NumPy) 0.4.0
- OpenFermion 0.6.0
- Pauli LCU for qualtran / pyLIQTR / Cirq next release
- Qiskit planned
Materials, one representation
From a two-atom semiconductor to a 28-atom battery cathode, each fetched from the Materials Project and stored as a QMatEntry. Pick one and drag the crystal to rotate it.
Change one field, watch the fingerprint
Every entry has a canonical_hash(): a SHA-256 over eleven fields that identify the calculation setup (the source record, functional, electron count, basis cutoff and a few more), plus the lattice and atomic positions when an entry records them, as these do. Edit the selected material below. Metadata that does not change the Hamiltonian, such as tags, leaves the fingerprint alone. The hash is recomputed here in your browser with the same rules as the Python library.
As fetched
With your edits
The hashed fields
Two groups, one “silicon”, no way to check
Research groups developing block-encodings, qubitization variants and truncated Dyson series methods need realistic electronic-structure Hamiltonians. The usual route is a one-off script that pulls DFT data, reformats it and feeds it to a compiler.
Those scripts are rarely shared, rarely work with more than one framework, and often drop the provenance needed to reproduce a result. When two groups report T-gate counts for “silicon”, nothing says they used the same Hamiltonian. QMatBridge records what was used, and fingerprints the setup.
Illustration: Group A is a real fetched entry; Group B’s settings are invented to show the effect. Both fingerprints are computed in your browser.
Everything needed to reproduce the Hamiltonian
Select a part of the entry to see what it holds. The values are the real ones for the material chosen above, and a lit dot marks the fields that go into the fingerprint.
- provenanceWhere it came from. Database and identifier, functional, pseudopotential family, DFT code and version, retrieval time.
- structureWhat it is. Reduced and unit-cell formula, species per site, lattice parameters, space group.
- basisHow it is discretised. Plane-wave cutoff and the resulting number of plane waves.
- oracleWhat access costs. LCU 1-norm, per-term breakdown, SELECT/PREPARE parameters and complexity annotations.
- exportsWhere it went. Downstream framework, format, status and artifact path.
- hashA stable fingerprint.
canonical_hash()is a SHA-256 over eleven setup fields (source record, functional, electrons, basis and more), plus the lattice and atomic positions when the entry records them, so a result can be traced to one recorded calculation.
The core dataclasses
Dependency-free, JSON-serialisable, versioned. Changes to the schema go through public discussion and a minor-version bump.
| Class | Role | Key fields |
|---|---|---|
| QMatEntry | Top-level record | reference, hamiltonian, exports, tags, schema_version |
| MaterialReference | Provenance plus structure | provenance, structure |
| SourceProvenance | Upstream source and DFT settings | primary, functional, pseudopotential, code, retrieved_at |
| StructureMetadata | Chemistry and geometry | formula_reduced, formula_unit_cell, species, lattice |
| HamiltonianMetadata | Electrons, basis, terms, oracle | num_electrons, spin_polarized, basis, terms, oracle |
| BasisMetadata | Basis-set specification | type, cutoff_energy_ev, num_plane_waves |
| OracleMetadata | Block-encoding oracle description | oracle type, index encoding, complexity annotations |
| ExportMetadata | Downstream export record | target, format, status, artifact path |
One line from PyPI
Python 3.10+; the core schema has no required dependencies. Fetching from the Materials Project needs the mp extra and your own free API key (details); QMatBridge ships none. No key at all is needed for the OPTIMADE adapter, which reads any compliant server. Two notebooks, a quickstart and a tour with figures, run offline from a checkout.
pip install qmatbridge # core
pip install "qmatbridge[mp]" # + Materials Project adapter (Python 3.11+)export MP_API_KEY=... # your own key; QMatBridge ships none
python -c "from qmatbridge.adapters.materials_project import fetch_entry_from_mp as f; print(f('mp-149').canonical_hash())"python -c "from qmatbridge.registry import get_adapter as g; from qmatbridge.adapters.optimade import OptimadeAdapterConfig as C; print(g('optimade', config=C(encut_ev=520.0)).fetch_entry('mp:mp-149').canonical_hash())"Narrow on purpose: a bridge, not a database
Use it if you are
- an algorithm researcher who needs real materials Hamiltonians for block-encoding or qubitization work;
- a research software engineer who wants a citable format between the DFT and circuit worlds;
- a resource-estimation group running T-count and qubit studies across many materials.
Where the project is
v0.1 done
Schema, JSON I/O, canonical hash, adapter stubs, CI.
June 2026v0.2 released
Materials Project adapter validated against the live API, plane-wave utility, entry reader, plugin registry, Tier-1 fixtures with nightly drift checks, docs.
0.2.0 · October 2026v0.3 released
Atomic positions in the schema (schema 0.2), hashed when an entry records them; the website recomputes the same fingerprint in your browser. Per-species valence charges followed in 0.4.0 (schema 0.3).
0.3.0 · October 2026v0.4 in progress
OQMD live fetch shipped in 0.4.0 (recorded-response tested; the OQMD server was down when it was written, so a live check is still owed). The generic OPTIMADE adapter shipped in 0.5.0 (Materials Project and Alexandria PBE/PBEsol checked live). Cross-database deduplication (shared identifiers such as ICSD numbers, or matching atomic environments) is merged and ships in the next release. Next: the remaining Alexandria sets (HSE06, r²SCAN).
v0.5 in progress
Exporters: the raw plane-wave NumPy exporter shipped in 0.4.0 and the OpenFermion
InteractionOperatorexporter in 0.6.0 (a small point-ion plane-wave model, checked term by term against OpenFermion). The Pauli-LCU exporter for qualtran / pyLIQTR / Cirq (λ, coefficients, PREPARE probabilities; checked against OpenFermion and Cirq) is merged and ships in the next release.v0.6 planned
T-count, Toffoli and qubit estimation hooks.
Decided: valence charges live in the Hamiltonian record
Exporters need the ionic charge of each element, so hamiltonian.valence_charges records the valence electrons the pseudopotential contributes. It is deliberately not part of the fingerprint, so no existing hash changes. Earlier, positions were decided the same way: hashed when an entry records them.
Built in the open
Using QMatBridge in a paper?
There is no formal publication yet. Please cite the repository.
@software{qmatbridge,
author = {{dos Reis}, Roberto},
organization = {q-matsuite},
title = {{QMatBridge}: A bridge from classical materials
databases to first-quantized Hamiltonians for
quantum simulation},
url = {https://github.com/q-matsuite/qmatbridge},
version = {0.6.0},
year = {2026},
}