QMatBridge by q-matsuite
Open-source research software · early stage

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.

Provenance on every entryDeterministic SHA-256 fingerprintMIT licensedPython 3.10–3.14, fully typed

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
01 Examples

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.

02 Fingerprint

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.

Editing live

As fetched

With your edits

The hashed fields


          

03 The problem

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.

04 What an entry records

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 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.
05 Schema

The core dataclasses

Dependency-free, JSON-serialisable, versioned. Changes to the schema go through public discussion and a minor-version bump.

ClassRoleKey fields
QMatEntryTop-level recordreference, hamiltonian, exports, tags, schema_version
MaterialReferenceProvenance plus structureprovenance, structure
SourceProvenanceUpstream source and DFT settingsprimary, functional, pseudopotential, code, retrieved_at
StructureMetadataChemistry and geometryformula_reduced, formula_unit_cell, species, lattice
HamiltonianMetadataElectrons, basis, terms, oraclenum_electrons, spin_polarized, basis, terms, oracle
BasisMetadataBasis-set specificationtype, cutoff_energy_ev, num_plane_waves
OracleMetadataBlock-encoding oracle descriptionoracle type, index encoding, complexity annotations
ExportMetadataDownstream export recordtarget, format, status, artifact path
06 Install

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.

Install
pip install qmatbridge            # core
pip install "qmatbridge[mp]"      # + Materials Project adapter (Python 3.11+)
Fetch an entry
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())"
Or, without a key: OPTIMADE
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())"
07 Who it is for

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.

Look elsewhere if you want

  • a general materials-informatics toolkit — use pymatgen or ASE;
  • molecular, Gaussian-basis or excited-state Hamiltonians — out of scope for now.
08 Roadmap

Where the project is

  1. v0.1 done

    Schema, JSON I/O, canonical hash, adapter stubs, CI.

    June 2026
  2. v0.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 2026
  3. v0.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 2026
  4. 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.

Read the position decision
10 Cite

Using QMatBridge in a paper?

There is no formal publication yet. Please cite the repository.

BibTeX
@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},
}