Skip to content

Whitening assumes a uniform grid, so the sampling scheme cannot be improved on its own #122

Description

@marcohost33-maker

Where this comes from

PR #115 review, thread "Preserve early-time sampling for separated decay modes". The reviewer's instinct — keep unit-scaled early-time coverage and the 1/gap horizon — is right. It was not done in that PR, and the reason is worth recording as its own issue rather than as a paragraph in a closed thread.

The coupling

fitting/gls.py::_whiten forms r_k − ρ·r_{k−1} with a single AR(1) coefficient. A constant sample interval is therefore not a convenience of the current grid; it is an assumption of the noise model. That assumption also carries the parametric bootstrap and N_eff.

Put a two-scale or logarithmic grid underneath it and the lag-1 correlation becomes a function of position. The fit still returns numbers, the CI still prints, the AICc still selects — and none of them mean what they claim any more. That is a silent failure, which is the class this project treats as worse than a loud one.

So: the grid and the whitening cannot be changed independently. Either both move or neither does.

The hard limit that motivates it

On the current uniform grid, samples_per_fast_efolding = 1/(r_max·dt) ≈ 7.9·Δ/r_max. One uniform 80-point window straddles at most about an eightfold spread of timescales. Six decades — two independent channels at 1e-6 and 1 — is not reachable by any choice of uniform window. Only by roughly 1e6 points, or by giving up uniformity.

Measured on exactly that system (two amplitude-damped qubits, rates 1e-6 and 1, Δ = 5e-7):

window beta_D_linear relative error vs true Δ
old absolute [0, 10] 0.0177 3.5e4
gap-scaled [0, 2e7] (current) 7.9e-7 0.58

Both windows fail; they fail at opposite ends. The current one fails on the quantity that is not the layer's headline output, which is why it was chosen — not because it is adequate.

What PR #115 did instead

Disclosed rather than repaired: samples_per_fast_efolding is measured from the spectrum and an UnderResolvedTransientWarning fires below one sample per fast e-folding. That stops the layer from quietly reporting an unsampled mode as measured. It does not make the mode measurable.

Scope of this issue

  1. Make the AR(1) whitening interval-aware (or replace it with a noise model that does not assume uniform spacing), and propagate that through the parametric bootstrap and N_eff.
  2. Only then adopt a genuinely two-scale or logarithmic grid that covers both the fast transient and the 1/gap horizon.
  3. Discrimination requirement: a test on the 1e-6/1 system in which the current implementation fails and the new one recovers both rates — not merely a test that the new grid runs.
  4. The rate-unit invariance already pinned in tests/test_relaxation_grid_scale.py must survive. A guard or estimator that behaves differently at c ∈ {1e-4, 1, 1e4} reintroduces, inside the fix, the defect PR fix: scale the default relaxation window to the system's own relaxation time #115 removed.

Related: #111 (least-squares convergence is not rate-unit invariant at extreme spans) touches the same estimator from the other side.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions