Goal
Align the idle-noise surface of GeneralNoiseModel / GeneralNoiseModelBuilder in
crates/pecos-engines (and its PyO3 fluent builder in
python/pecos-rslib/src/engine_builders.rs) with the structured idle-noise vocabulary
(PR #420 layer-1 families; #423 layer-2 channels) — via a staged deprecation ramp,
because this API has external users.
Ramp
- Additive release: new structured setters (family-style or
with_idle_channels(...))
alongside the existing methods; nothing existing changes behavior.
- Warning release: legacy idle methods emit deprecation warnings. Each warning must
state the numerically equivalent new spelling, not just the new name — see units
below.
- Removal / major release: legacy methods removed or explicitly re-documented as
low-level primitives, per what usage telemetry and downstream feedback allow.
Unit trap (the reason the ramp needs care)
The builder rescales its public inputs before they reach the runtime fields
(crates/pecos-engines/src/noise/general/builder.rs, ~line 1006): square-root scaling on
the quadratic rate, a p_idle_coherent_to_incoherent_factor * 0.5 adjustment on the
stochastic branch, and a cycles-to-radians conversion. The structured vocabulary matches
the runtime application semantics (general.rs), not these builder input units. A naive
"use p_idle_sin_squared instead of p_idle_quadratic_rate" migration would silently
change the physics; the conversion formulas must be documented and embedded in the
warnings.
Alignment notes
Goal
Align the idle-noise surface of
GeneralNoiseModel/GeneralNoiseModelBuilderincrates/pecos-engines(and its PyO3 fluent builder inpython/pecos-rslib/src/engine_builders.rs) with the structured idle-noise vocabulary(PR #420 layer-1 families; #423 layer-2 channels) — via a staged deprecation ramp,
because this API has external users.
Ramp
with_idle_channels(...))alongside the existing methods; nothing existing changes behavior.
state the numerically equivalent new spelling, not just the new name — see units
below.
low-level primitives, per what usage telemetry and downstream feedback allow.
Unit trap (the reason the ramp needs care)
The builder rescales its public inputs before they reach the runtime fields
(
crates/pecos-engines/src/noise/general/builder.rs, ~line 1006): square-root scaling onthe quadratic rate, a
p_idle_coherent_to_incoherent_factor * 0.5adjustment on thestochastic branch, and a cycles-to-radians conversion. The structured vocabulary matches
the runtime application semantics (
general.rs), not these builder input units. A naive"use
p_idle_sin_squaredinstead ofp_idle_quadratic_rate" migration would silentlychange the physics; the conversion formulas must be documented and embedded in the
warnings.
Alignment notes
SingleQubitWeightedSamplerover X/Y/Z/L — the same alphabet the structured models adopted (including first-class
L).p_idle_coherent: boolinterpretation switch is replaced by law-in-the-namefamilies / channel types.
p_idle_coherent_to_incoherent_factor(default 1.5) is an engines-only calibrationknob; it should get an explicit, documented identity rather than being folded silently
into any migration.
alignment). Same standing principle: one idle-noise vocabulary at every level of PECOS,
capability and units enforced loudly, never silently approximated.