phanerozoic/qiskit-calibration-drift
Updated β’ 8.4k β’ 4
A single model for subspace alignment diagnostics across quantum hardware, spectroscopy, genomics, and neural signals.
Given any sequential data, the USDM outputs:
The USDM measures structural stability, not content.
The model automatically selects the best encoder for the input signal:
| Encoder | Sine | Random Walk | Noise | Verdict |
|---|---|---|---|---|
| Binning | 1.0000 | 1.0000 | 1.0000 | FAIL |
| Rotation | 1.0000 | 1.0000 | 1.0000 | FAIL |
| chunk-SVD | 0.4322 | 0.6057 | 0.1473 | PASS |
| Takens | 0.8170 | 0.9994 | 0.7844 | SENSITIVE |
chunk-SVD is the default. Takens is used when the signal has strong periodic structure. Binning and rotation are never selected.
| Substrate | Self-alignment | Cross-reference |
|---|---|---|
| FTIR (amber) | 0.14 | 0.50 |
| 16S rRNA | 0.14 | 0.45 |
| IBM T1 (qubit 17) | 0.63 Β± 0.09 | β |
| Backend | Duration | First dark | Last dark |
|---|---|---|---|
| ibm_fez | 2297.9 h | 2026-01-31 | 2026-05-07 |
| ibm_kingston | 1341.6 h | β | β |
| ibm_marrakesh | 2308.9 h | β | β |
| ibm_torino | 1449.3 h | β | β |
| IBM T1 | FTIR | 16S | |
|---|---|---|---|
| IBM T1 | 1.000 | 0.336 | 0.266 |
| FTIR | 0.336 | 1.000 | 0.268 |
| 16S | 0.266 | 0.268 | 1.000 |
All off-diagonal values are at or below the random baseline (0.375). Domains are geometrically distinct.
from usdm import UnifiedSubspaceDiagnostic
model = UnifiedSubspaceDiagnostic.from_pretrained("zeechimp/usdm-base")
# Single series
result = model.diagnose(t1_trajectory)
# result.stability -> "STABLE"
# result.alignment_trajectory -> [1.0, 0.97, 0.95, ...]
# result.domain -> "IBM_T1"
# result.failure_risk -> 0.02
# Cross-domain
result = model.compare(t1_trajectory, ftir_spectrum)
# result.same_domain -> False
# result.alignment -> 0.336
## Why This Is Novel
**1. It is the first model where the core computation is a geometric invariant, not a learned function.** The subspace alignment `Tr(P_a P_b)/k` is fixed. The learned components are lightweight heads that interpret the trajectory. This means the model can be applied to domains it was never trained on β the geometry is universal even when the domains are not.
**2. It unifies ten applications under one architecture.** Prior work treated each domain separately. The USDM treats them as instances of the same primitive: encode β extract subspace β measure alignment β interpret trajectory.
**3. It is trained on negative results.** The domain classifier is trained on the absence of cross-domain structure. The encoder selection head is trained on which encoders fail. This is rare in ML β most models are trained on positive examples.
**4. It produces a trajectory, not a prediction.** Every existing model outputs a point estimate (next calibration value, error probability, class label). The USDM outputs a sequence β the alignment trajectory β which is a richer object. The trajectory contains the stability, the drift rate, the changepoints, and the memory structure all in one signal.
## The Surreal Part
The USDM is trained on four datasets from four unrelated physical systems. The training signal is the same in all four: subspace alignment. The model that emerges does not know whether its input is a qubit's T1 record, an amber FTIR spectrum, a bacterial 16S sequence, or a neural EEG trace. It only knows the shape of the subspace trajectory.
This is not a failure of the model. It is the point. The model's job is to measure **structural integrity** β how much the subspace has drifted from its own past. Whether the substrate is a quantum computer, a fossil, a genome, or a brain is irrelevant to that measurement.
The most surreal output: the model can tell you that qubit 17's T1 record and a 110-million-year-old amber spectrum have **nothing in common** (alignment 0.336, below random baseline), and that is the correct answer. They are different physical systems with different geometries. The USDM knows this because it was trained on the negative result.
## Implementation Path
**Step 1:** Build the encoder zoo (chunk-SVD, Takens, rotation, binning) with the positive control validation.
**Step 2:** Train the encoder selection head on synthetic signals with known ground truth.
**Step 3:** Train the stability classifier and failure predictor on the IBM calibration data (already on Hugging Face).
**Step 4:** Train the domain classifier on the cross-domain alignment matrix.
**Step 5:** Package as a Hugging Face model with the model card above.
The model is lightweight β the subspace extraction is SVD on small matrices (8Γ8 to 20Γ20), and the interpretation heads are 2β3 layer MLPs. Total parameters: under 1 million. Inference time: milliseconds per window.