The T1/T2 convenience constructor produces rates that do not match how the rest of IdleChannel interprets them.
// exp/pecos-neo/src/noise/idle.rs:140-151
pub fn from_t1_t2(t1: f64, t2: f64) -> Self {
// Approximate error rate from T1/T2
// This is a simplified model
let linear_rate = 1.0 / t1.max(1.0);
let quadratic_rate = 1.0 / (t2 * t2).max(1.0);
...
}
Two separate problems:
-
Dimensional inconsistency. quadratic_rate is consumed elsewhere as an angle per unit
time: coherent mode computes quadratic_rate * duration as an RZ angle, and incoherent
mode computes sin(quadratic_rate * factor * duration / 2)^2. A value of 1/t2^2 has
units of inverse time squared, so the resulting angle is not a physically meaningful
function of the requested T2.
-
Silent clamping. .max(1.0) is applied to the denominators, not the results. For any
t1 < 1.0 or t2 < 1.0 in abstract time units, the derived rate saturates at 1.0 and
stops responding to the input entirely -- a shorter coherence time produces the same noise
as t1 = 1.0. Nothing reports that the requested value was ignored.
The docstring says "simplified model", which covers approximation but not a rate that does not
track its own input.
Workaround: set linear_rate and quadratic_rate directly rather than deriving them from
T1/T2.
Suggested direction: derive the quadratic rate with units consistent with its consumers,
and either reject non-positive/very short times explicitly or let the rates scale as given
instead of clamping. Note that general_builder.rs also exposes with_idle_t1_t2, so any fix
should cover both entry points.
Found while reviewing after-2q idle noise in exp/pecos-neo; not addressed there because it
is independent of that change.
The T1/T2 convenience constructor produces rates that do not match how the rest of
IdleChannelinterprets them.Two separate problems:
Dimensional inconsistency.
quadratic_rateis consumed elsewhere as an angle per unittime: coherent mode computes
quadratic_rate * durationas anRZangle, and incoherentmode computes
sin(quadratic_rate * factor * duration / 2)^2. A value of1/t2^2hasunits of inverse time squared, so the resulting angle is not a physically meaningful
function of the requested T2.
Silent clamping.
.max(1.0)is applied to the denominators, not the results. For anyt1 < 1.0ort2 < 1.0in abstract time units, the derived rate saturates at1.0andstops responding to the input entirely -- a shorter coherence time produces the same noise
as
t1 = 1.0. Nothing reports that the requested value was ignored.The docstring says "simplified model", which covers approximation but not a rate that does not
track its own input.
Workaround: set
linear_rateandquadratic_ratedirectly rather than deriving them fromT1/T2.
Suggested direction: derive the quadratic rate with units consistent with its consumers,
and either reject non-positive/very short times explicitly or let the rates scale as given
instead of clamping. Note that
general_builder.rsalso exposeswith_idle_t1_t2, so any fixshould cover both entry points.
Found while reviewing after-2q idle noise in
exp/pecos-neo; not addressed there because itis independent of that change.