Materials databases to first-quantized Hamiltonians.
QMatBridge is a Python library that 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 stub
- OPTIMADE planned
Neutral representation
QMatEntry
Provenance · structure · basis · oracle cost · canonical hash
Exporters
- OpenFermion planned
- qualtran / pyLIQTR planned
- Qiskit planned
Three materials, one representation
A textbook semiconductor, a wide-gap III–V, and a Li-ion battery cathode, each fetched from the Materials Project and stored as a QMatEntry. Drag the crystal to rotate it.
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 hashes it.
Everything needed to reproduce the Hamiltonian
- 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 the physically meaningful fields, so a result can be traced to one Hamiltonian.
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 |
From source, in a minute
Not yet on PyPI. Python 3.10+; the core schema has no required dependencies. Fetching from the Materials Project needs the mp extra and a free API key.
git clone https://github.com/q-matsuite/qmatbridge.git
cd qmatbridge
pip install -e ".[mp]"export MP_API_KEY=... # your own key
python -c "from qmatbridge.adapters.materials_project import fetch_entry_from_mp as f; print(f('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.
v0.2 in progress
Materials Project adapter, plane-wave utility, benchmark fixtures, documentation site.
v0.3 planned
OPTIMADE, OQMD and Alexandria adapters; cross-database deduplication.
v0.4 planned
Exporters: OpenFermion, raw plane-wave arrays, LCU coefficients for qualtran / pyLIQTR.
v0.5 planned
T-count, Toffoli and qubit estimation hooks.
Using QMatBridge in a paper?
There is no formal publication yet. Please cite the repository.
@software{qmatbridge,
author = {Reis, Roberto},
title = {{QMatBridge}: A bridge from classical materials
databases to first-quantized Hamiltonians for
quantum simulation},
url = {https://github.com/q-matsuite/qmatbridge},
version = {0.1.0},
year = {2026},
}