Skip to content

SEP 35: a carrier frame for the exponential Adams history - #26

Merged
jtravs merged 25 commits into
mainfrom
feature/multistep-carrier-frame
Oct 25, 2026
Merged

jtravs merged 25 commits into
mainfrom
feature/multistep-carrier-frame

Conversation

@jtravs

@jtravs jtravs commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

SEP 35, A carrier frame for the exponential Adams history, all four phases, now Final and archived.

What it adds

  • Multistep(carrier_frame="off" | "scalar"), default "off". With "scalar", each exponential step removes the carrier phase before it interpolates the source, integrates against φ-moments at x − σ, and keeps the flow at exp(x). This is exact for any σ. A step cap of 1 rad gives a floor of about |κ|L steps.
  • Backends: numpy_ref, numba_cpu (rotation fused into the row reads), and native CPU (σ formed on the host from the operator's own chord, plus shifted moments and history in the kernels). Coupled blocks use the shifted block's moments, with the flow at e^σ·φ₀.
  • Inert on envelope grids without third harmonic. Refused by name on:
    • free-space routes;
    • devices;
    • formulation="interaction";
    • precision="single".
  • Kernel schema 37. SEP 33 took 36.
  • "harmonic" was removed by the phase 4 gate.

Phase 4 decision

The default stays "off". At matched error, "scalar" is the fastest of the four methods only on the dense multimode Raman comb-to-continuum class: 27–42 % less time than the interaction formulation on the 2 ps window. It weakens forming weak bands near the launch. On argon and the H₂ soliton, the interaction formulation is faster. On helium, RK or the interaction formulation is faster. The decision guide is in docs/guide/numerics/adams.md (When to use it) and choosing-a-stepper.md.

Benchmark suite

ctc_reduced is now at revision 2: a 2 ps window, (2, 8192, 16384), with new pilot edges and a new accuracy envelope. Its qualification passed. The adoption review (qualify --recheck … --reviewed) is left to the maintainer.

Checks

  • Targeted tests run locally: carrier frame, driver, problem schema, mixture channels, dispersive Kerr, resident Adams, multistep, SEPs, benchmark references, native API contract and backend.
  • ruff and basedpyright are clean.
  • The public scan shows no new hits.
  • The full gate runs in CI.

🤖 Generated with Claude Code

jtravs and others added 21 commits October 25, 2026 09:07
The default Multistep's exponential formulation extrapolates a source
history that rotates with the carrier on grids that keep beta0, which
makes it several times costlier than the alternatives in dense gases.
SEP 35 proposes interpolating with a scalar carrier phase removed and
integrating against the correspondingly shifted phi-functions: exact
for any shift, with state, history, error estimate and resume unchanged.
Includes the numpy_ref prototype's measurements on four capillary cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make the carrier frame an opt-in Multistep(carrier_frame="scalar") policy
for field grids with a step cap on the carrier phase; derive the aliasing
and collar-stability conditions, the sign conventions, the varying-operator
and coupled recurrences, the reference rule and the kernel-contract and
resume treatment; defer per-band and lossy shifts and the envelope grid
with the third harmonic; fix the qualification criteria before measurement.
Record a response to each review point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elope THG

Record the present default's loose-tolerance failure on an argon capillary
(error 0.97 at rtol 1e-3) as evidence and a phase 4 case, with the corrected
mechanism. Bring the per-band harmonic shift back in scope behind a gate
fixed before measurement. Admit envelope grids with the third harmonic,
whose frame now measures its delay from zero frequency. Add an interim
manual note on the failure to phase 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed by the maintainer after the AI review and its revisions; status
Accepted, review status Reviewed. Moved to the roadmap's accepted proposals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The field is 'off' by default, so every existing run keeps SEP 16's arithmetic;
a shift needs the exponential formulation. CARRIER_PHASE_CAP is the policy's
fixed step cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference rule, the rotated-sample trial with moments at x - sigma, the
shifted coupled block whose flow is exp(sigma) times its phi_0, the rotated
untransported witness, the dense formula with the accepted step's sigma and
the step cap applied to the proposal. numba_cpu and native refuse either
shift by name; free-space routes are refused until qualified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exactness on a carrier-following source through the march itself (dense
planes and the step cap included), the section 4.3 table and Q6 at every
order, the section 4.4 threshold table, adaptive and replayed marches on the
residual components, the inert envelope grid bit for bit, physical windows on
both carrier-keeping grids, launches away from the reference, a custom frame,
varying operators with both compensations, coupled sections, resume and the
policy's identity, and the parity rounding budget against a 40-digit
evaluation. The shift gets its own broadcast annotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Adams page's carrier-frame section (the shifted step, the dense formula,
what the shift leaves, the cap, the stability table, where it applies and
what it measured), the interim note on the default's loose-tolerance failure
in dense gases in its limitations and in choosing a stepper, a pointer from
the linear operator's grid table, the design notes, and the changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The compiled moments pass forms phi(x - sigma) with exp(x) beside it, and the
predict and correct passes take one rotation factor per slot and row inside
their row reads, so the store is never copied. The reference passes take the
same shift= and factors= interface, so HostHistory has one path; the coupled
compiled passes rotate their few rows beforehand. numba_cpu delivers the
scalar shift and still refuses the harmonic one. Compiled parity tests: one
trial within the increment budget, exactness through the compiled march, a
matched window, and coupled sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The resident engine's kernels form the moments at x - sigma through
adams_moment_phi and read every history row through adams_history, rotated
by its factor; the coupled block functions keep exp(h B) for the flow and
shift each eigenvalue for the moments, and dense observation takes the
accepted step's sigma and factors, held on the host across later trials.
sigma and the factors travel in ExponentialWeights, formed on the host from
CarrierChord, the reference element's own operator, so nothing is read back.
The step cap reads the same chord on every backend. Native CPU builds deliver
the scalar shift; device builds and the harmonic shift are refused by name.
Both compiled backends form exp(x - sigma) as exp(x) exp(-sigma).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The carrier frame runs on numpy_ref, numba_cpu and native CPU builds; the
manual says how the compiled backends apply it and what a step costs (a
benchmark ledger entry: 4-6 % per step on a cheap Kerr source, under 1 % with
Raman, same-process A/B on one laptop). Part II records both phases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Short-window qualification on numba_cpu and native CPU (seven field-grid
cases, launch and developed windows, IP-DOPRI5 references three orders
tighter): the scalar shift reaches a given total-field error in half to three
quarters of the calls and time in dense molecular gases and levels on helium,
but leaves weak and named bands up to a few hundred times less accurate at
matched error, and on native costs up to 1.33x the time on cheap helium
sources, so it stays opt-in. The harmonic shift fails its gate: its boundary
rules leave self-phase-modulated and fundamental light less accurate, or are
the scalar shift everywhere but one launch window. The manual records the
results and when to use the shift; Part II the phase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP-DOPRI5 and the interaction formulation through phase 4's windows on both
backends: at matched band error the carrier frame is the fastest method on
the two-mode comb-to-continuum case only (0.69-0.88 of the next best), level
with the default on the four-mode RDW, and slower than an existing method on
the other five cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reduced comb-to-continuum case's 1 ps window crowded its 400 fs pulse; a
production run takes 2 ps or more. Revision 2 uses 2 ps (4097 bins), its
entrance re-piloted by the SEP 30 protocol (which reproduces revision 1's
edges exactly) and its 1e-4 envelope qualified anew (candidates 3.3e-7 and
1.1e-7 against tight RK). SEP 35 Part II records the comb-to-continuum case
on 2 ps and 4 ps windows: the carrier frame takes about half the time of the
default and of IP-DOPRI5 at matched error there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dows

It is the second-fastest method there; the carrier frame takes 30-40 % less
time than it at matched worst-plane error, 6-17 % in the developed window's
weak bins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carrier_frame="scalar" stays opt-in with a decision guide in the Adams page
and choosing a stepper: the fastest method on dense, multimode, Raman-active
field-grid runs, not on single-mode dense gases or helium, with two caveats
(a forming weak band, a floor of about |kappa| L steps). The SEP moves to the
archive, its open questions to the roadmap, its manual pages link back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…recision refused)

SEP 33 took kernel schema 36 for precision, so the carrier frame's field is
version 37. carrier_frame with precision='single' is refused by name; the
trial's moments and flow move into a helper so the binary32 rounding fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@read-the-docs-community

read-the-docs-community Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

jtravs and others added 2 commits October 25, 2026 21:01
…hema-21 projection

SEP 35 names carrier_frame in every Multistep representation, at its default
too, with no output layout change; the record-stability projection leaves the
default out, as it leaves out SEP 33's precision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

jtravs and others added 2 commits October 25, 2026 22:13
…ift checks

The coverage lane runs without native, where these were reached only through
the native engine's host side; the tests reach them directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs
jtravs merged commit 281f2c8 into main Oct 25, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants