# Track C, Phase I — synthetic causal controls for single-qubit detuning

Frozen 15 November 2026, before any test seed was run. The commit that adds this file contains the code and no results; results arrive in a later commit.

**Evidence label: synthetic observation.** Every mechanism, parameter and count is constructed. No hardware job was run, no device calibration was used, and nothing here is a measured property of any processor.

**Inputs actually read:** `D0RE_AI_READ_FIRST_2026-11-15.md` (complete) and the six-file download kit. The project archive, the AI starter and the Existing Hardware Noise Benchmark v0.1 package were not available, so this is a new run with its own identity, not a replay of that benchmark.

## 1. Question

`docs/NOISE_CAUSAL_IDENTIFICATION_PLAN.md`, Phase I, asks for a known hidden mechanism, instrument-like counts, strong standard baselines, an oracle bound and negative controls. This run answers three things on one observable:

1. Can the mechanism behind a drifting qubit frequency be identified from interleaved Ramsey counts at a fixed shot budget?
2. Does identifying it lower prospective correction error against ordinary adaptive tracking with the same information?
3. How much room is left between the best standard method and the bound? That room is the most any new estimator, D0RE-derived or not, could gain on this task.

## 2. Model and units

Rotating-frame idle evolution under detuning δf for a probe delay τ accumulates probe phase `x = 2π·δf·τ` (radians). One calibration **block** is 20 shots of each Ramsey quadrature:

```
P(1 | cos probe) = e0 + (1 − e0 − e1)·½·(1 + C·cos x)
P(1 | sin probe) = e0 + (1 − e0 − e1)·½·(1 + C·sin x)
```

with contrast C = 0.80 and readout errors e0 = 0.01, e1 = 0.03, all known exactly to every estimator. The phase is quasi-static inside a block. A trial is 500 blocks (20,000 shots). Counts are single binomial draws per quadrature per block, which are sufficient statistics, not shot-by-shot trajectories.

Everything is computed in radians of probe phase per block. For a nominal τ = 20 µs and a nominal block spacing of 1 s, 1 rad ↔ 7,957.7 Hz. These nominal values only label the scale; they are not measurements.

| Mechanism | Hidden law (k = block index, x0 ~ U(−0.5, 0.5) rad) | Constructed range | Nominal scale |
|---|---|---|---|
| `const` | x = x0 | — | offset within ±3.98 kHz |
| `white` | x = x0 + σ·ξ_k, independent per block | σ ~ U(0.2, 0.4) rad | 1.6–3.2 kHz jitter |
| `linear` | x = x0 + b·k | \|b\| ~ U(0.001, 0.003) rad/block, random sign | 8–24 Hz/s |
| `tele` | x = x0 + A·s_k, s flips with probability p per block | A ~ U(0.4, 0.8) rad, p ~ U(0.01, 0.03) | 3.2–6.4 kHz jump, 33–100 s dwell |
| `rw` | x_k = x_{k−1} + q·ξ_k | q ~ U(0.02, 0.05) rad/√block | 160–400 Hz/√s |
| `sine` | x = x0 + S·sin(2πk/T + ψ) | S ~ U(0.3, 0.5) rad, T ~ U(80, 160) blocks | outside every candidate class |

`white` is the negative control where tracking cannot help. `sine` is the misspecified case required by the plan.

## 3. Task and metrics

Before block k, each estimator outputs a prediction x̂_k using blocks 0…k−1 only. The task is a phase correction applied to a payload idle of the same delay, so the residual is x_k − x̂_k.

- **Primary: task infidelity** = mean over test blocks of sin²((x_k − x̂_k)/2). This is the state infidelity of an equatorial state under the uncorrected residual rotation. It needs the hidden truth, so it exists only in simulation. It is not a gate error rate, a logical error rate or a hardware measurement.
- **Secondary: predictive log-probability** of each test block's counts. Needs no hidden truth, so it carries over to real data.
- **Identification:** the candidate's most probable class after block 349.
- **Cost:** shots are equal for all estimators by construction; classical compute per block is reported.

Chronological split: blocks 0–199 learn, 200–349 validate (window length and random-walk noise chosen here, per trial, from counts only), 350–499 test. Nothing from the test segment feeds any choice.

## 4. Estimators

All see identical counts, the same known C, e0, e1, a flat prior on the offset, and act with the same one-block latency.

| Name | Rule | Status |
|---|---|---|
| `none` | x̂ = 0 | reference |
| `fixed` | pooled two-quadrature phase estimate from blocks 0–99, then held | old-calibration control |
| `window` | pooled estimate over the last W blocks, W ∈ {5, 10, 20, 40, 80, 160, all} chosen on validation | ordinary phase estimation |
| `rw` | exact random-walk Bayes filter on a 1,024-point circle grid, q ∈ {0.005 … 0.16} chosen on validation | standard state-space filter |
| `bank` | equal-prior Bayesian model average of five exact grid filters: `const`, `white`, `linear`, `tele`, `rw`, with frozen hyper-grids wider than the generators' ranges | **candidate** |
| `bank_z8` | `bank` with the correction rounded to the nearest multiple of π/4 | eight-phase control |
| `oracle` | the true class alone with the generator's hyperparameter ranges; for `sine` it is told S and T exactly | diagnostic bound, not a competitor |

**Novelty status of the candidate: none claimed.** `bank` is standard Bayesian multiple-model filtering. Its D0RE reading is the predictive-sufficiency repair in `PROJECT_SCIENTIFIC_STATUS.md` §2: when the current estimate does not determine the next observation, add the missing state variable (a drift rate, a switch state). This run records that equivalence; it does not test a new algorithm.

## 5. Sufficiency diagnostic

If a model's state is predictively sufficient, its innovations (the score of the next block's counts at the prediction) have zero mean given the past. The registered statistic is the variance ratio of 20-block innovation sums over blocks 50–349, flagged above χ²₁₅(0.95)/15 = 1.666. A Ljung-Box statistic on count innovations (20 lags, two quadratures, χ²₄₀ threshold 55.758) is also reported.

## 6. Hypotheses and thresholds

48 test trials per mechanism, seeds `[1, mechanism index, 0…47]`. Intervals are 95% percentile bootstrap over trials (4,000 resamples, paired for ratios). "Best standard" is whichever of `window` and `rw` has the lower mean test infidelity for that mechanism, chosen after the fact in the baseline's favour.

| ID | Claim | Pass condition |
|---|---|---|
| H1 | Mechanism is identifiable | most probable class equals the truth in ≥ 90% of trials (≥ 44/48), for each of the five in-bank mechanisms |
| H2 | Identification helps where there is structure | on `linear` and `tele`: bank/standard ≤ 0.80 and interval upper bound < 1 |
| H3 | It does no harm elsewhere | on `const`, `white`, `rw`: bank/standard ≤ 1.10 |
| H4 | Headroom above the candidate | per in-bank mechanism, bank/oracle: **open** if lower bound > 1.10, **closed** if upper bound < 1.10, else **unresolved** |
| H5 | The diagnostic exposes a missing variable | variance-ratio flag on `bank` fires in ≥ 80% of `sine` trials and ≤ 15% of trials of each in-bank mechanism |
| H6 | Eight phase bins are worse than a continuous correction | `bank_z8` mean infidelity > `bank` in all six mechanisms. Reference floor for a uniform residual on ±π/8: 0.012752 |

For `sine`, bank/oracle is reported without a pass condition: it bounds the value of discovering the right class.

## 7. Development record (12 trials per mechanism, seeds `[0, ·, ·]`, disjoint from test)

Retained so the design choices and failures are visible:

- **D1, failed.** The first diagnostic, Ljung-Box on count innovations, flagged 0 of 12 `sine` trials although the oracle's infidelity was about 50 times lower than the bank's. It is kept in the output as a secondary statistic.
- **D2, weak.** Its replacement, the variance ratio in §5, flagged 2 of 12. Reasoning after the fact: a tracking filter whose noise parameter is tuned on validation whitens its own innovations, and any tracker suppresses their low-frequency content, so generic residual tests have little power here. **Registered expectation: H5 fails on `sine`.** No further diagnostic was tried, to avoid tuning a detector to a mechanism I already know is there.
- D3. In two slow-ramp `linear` trials (|b| ≈ 0.0011–0.0014) the random-walk class kept 14–40% posterior weight at block 349 and the bank was up to 2.8 times the oracle. In one `const` and one `rw` trial the most probable class was wrong. Expect H1 to be close to its threshold and H4 unresolved for `linear` and `const`.
- D4. On `white`, the validation-tuned random-walk filter was about 30% worse than a long window: adaptive tracking of unpredictable jitter hurts.
- Thresholds in §6 were written with these dev results in view and are not to be changed after the test run.

## 8. Limits declared in advance

- One qubit, one observable, pure detuning. No T1, leakage, crosstalk, readout drift or control error.
- Contrast and readout errors are known and constant; real ones drift and must be estimated.
- Jitter is quasi-static within a block. Shot-to-shot dephasing would only lower contrast and would not be separable from `const` by these counts.
- Phase is identified modulo 2π for one delay; detuning beyond ±1/(2τ) aliases.
- Telegraph switching is symmetric and two-level.
- Grid filters round sub-grid shifts to 3 mrad; the linear-class slope grid is 5×10⁻⁵ rad/block.
- A pass here licenses Phase II (real timestamped data), nothing more.

## 9. Reproduce

```sh
python3 phase1.py --selfcheck     # invariants, about 5 s
python3 phase1.py --dev           # 72 trials, about 45 s on 4 cores
python3 phase1.py --test          # 288 trials, writes results.json
python3 briefing_checks.py        # separate: re-derives numbers quoted in the briefing
```

Python 3.13, numpy 2.5. No other dependency.
