fix(#116): disclose the computed interval estimator (BC vs BCa) via RelaxationResult.interval_method - #119
Conversation
…ult.interval_method The public surface advertised BCa intervals unconditionally, but the leave-one-out jackknife that supplies the BCa acceleration term only runs for time grids of <= 60 points (a latency guard), while the default grid has 80 -- so the default pipeline computes a bias-corrected (BC) interval and nothing said so. This is issue #116 option 1: report which estimator actually ran ("BCa" / "BC" / "none", default "unreported" for pre-#116 serialised reports), document the gate at the gate, and align the README, tutorial, no-single-number.md, bootstrap and uncertainty docstrings with what is computed. No computed number changes; the field is additive and defaulted. Raising the gate or estimating the acceleration from bootstrap replicates changes reported numbers and stays open in #116. Tests: tests/test_interval_method.py (9) pin every reachable label state, the 60-point gate location, serialisation, the honest default, and include a discrimination test proving the acceleration term is live when supplied. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q8z6iNAyQ6ivP68b1jDeEW
Status 2026-09-07 — no issue band added, and that is the deliberate outcomeThis PR targets #116 must stay open. This PR's own body says so: it implements option 1 of 3 — the honesty fix, State, measured:
What Marco has to decideAt 62 commits behind the #121 head, the green rollup here describes a tree that has since moved a long way. The interaction the body already flags is the live one: Read-only measurement. No push, no merge, no band added, nothing resolved. |
Summary
Issue #116, option 1 only — the honesty fix, deliberately without changing any computed number. The public surface said "BCa" in at least six places, but the leave-one-out jackknife that supplies the BCa acceleration term runs only for time grids of ≤ 60 points (a latency guard: one extra GLS refit per grid point on top of
bootstrap_B), while the default grid has 80 — so the default pipeline always tookbca_ci's documenteda = 0.0fallback and computed a bias-corrected (BC) interval. The "a" of BCa is exactly the acceleration; the error direction is not conservative by construction.This PR makes the run say what it computed:
RelaxationResult.interval_method(additive, defaulted):"BCa"(jackknife ran),"BC"(a = 0fallback),"none"(bootstrap failed or the point estimate was not finite). Default"unreported", so a deserialised pre-The advertised BCa interval is never BCa in the default pipeline: the acceleration term is silently dropped above 60 grid points #116 report stays valid and honest — for it the estimator genuinely was not recorded.bca_ci/ the bootstrap module docstrings state the BC fallback explicitly.docs/explanation/no-single-number.md,docs/tutorials/first-diagnostic-run.md(2 places) and the U0 docstring no longer promise BCa unconditionally; U0 (fit_uncertainty) is documented as inheriting the label.CITATION.cff: recorded in the Pending for the next cut block as a labelling correction, per the 2026-08-09 convention — the v0.5.0 abstract is untouched.Deliberately not included (each changes reported numbers and needs its own anchor review, per the issue): raising/dropping the gate (option 2) and estimating the acceleration from the bootstrap replicates via the empirical-influence / infinitesimal-jackknife form (option 3). #116 stays open for those.
Scope
Verification
pytest -qpasses locally — 678 passed (669 at branch point + 9 new)tests/test_anchors.pyunchanged and green (21 passed) — no computed number changes, which is asserted by the full suite passing untouchedruff check src tests benchmarksclean;python -m mypy src/liouscopeclean (53 files).github/scripts/check_claim_safety.pypassed (21 public-facing markdown files)MANIFEST_SCHEMA.json: n/a — the run-manifest contract is untouched; the new field is additive with a default on the report dataclass.github/workflows/: n/aCITATION.cffpending block updated per DoD item 5Quality contract
tests/test_interval_method.pyincludes a discrimination test (test_acceleration_term_is_live_when_jackknife_supplied) proving the acceleration term genuinely moves the endpoints when supplied, so"BCa"cannot decay into a relabelled BC; the gate location itself is pinned at 60/61 points so the documented wording and the code cannot drift apart silently.Reproducibility note
No numerical results change: the field is derived from control flow the pipeline already executed. Tests use the fixed amplitude-damped qubit (
H = 0, jumpσ₋, rate 1.0,rho_0 = |+⟩⟨+|),seed=1,bootstrap_B=10.Conflict note (open PRs)
#115 adds other additive fields to
RelaxationResultand rewrites the default-grid derivation inrelaxation.py; this PR's edits there are small and additive (one field, one comment block, one assignment), so the merge either way is a trivial additive resolution. Interaction to keep in mind at merge time: once #115's gap-scaled window lands, the grid stays 80 points, so the default label remains"BC"— the two changes are semantically independent.Linked issues
Refs #116 (option 1 of 3 — the issue stays open for options 2/3, which change reported numbers and need anchor review).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q8z6iNAyQ6ivP68b1jDeEW
Generated by Claude Code