You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
executable models that apply noise during simulation; fluent Rust-backed builders, 47 and 7 with_* methods
pecos.qec.surface.NoiseModel
a parameter bag consumed at DEM construction; a Python dataclass, 30 fields plus derived properties
The confusion is live rather than theoretical: docs/workflows/guppy-dem-decoding.md
now imports NoiseModel from pecos.qec.surface in a section that also discusses
simulator noise, and since #422 this dataclass is the shared idle-noise vocabulary for
both the Guppy and native-surface DEM routes — so it is no longer a surface-code detail
either.
NoiseParameters (or similar) would say what it is.
Whether it should gain with_* setters to mirror general_noise(). Recommend no: it is a dataclass, so dataclasses.replace(params, p1=...) already provides
what .with_p1(...) would, and 30 setters would restate the field list a third time
(fields, docstring, methods) with three places to drift. The conveniences that earn
their place already exist: uniform(), is_noiseless, physical_error_rate, for_runtime_idle_time_units().
Note for whoever picks this up: a "user-facing uses bare setters, low-level uses with_*" rule does not hold in this repo. sim()'s noise builders are user-facing
and use with_*; the Rust-backed BpOsdBuilder uses bare. The convention is genuinely
inconsistent, so a naming decision here should be made deliberately rather than by
appeal to an existing rule.
#425 already covers aligning the non-idle GeneralNoiseModel surfaces with the
structured vocabulary. The DEM-side and engines-side names should be settled once,
together — otherwise this gets renamed to NoiseParameters now and possibly again
when the unified vocabulary lands. Deliberately kept out of PR #420 for that reason,
and because a 240-site public rename mixed into a large functional PR is hard to review.
Related: #422 (which made this dataclass the shared idle vocabulary), #424, #425.
Problem
pecos.qec.surface.NoiseModelcollides conceptually with the simulator-side noisemodels while being a different kind of object:
GeneralNoiseModel/DepolarizingNoiseModel(viageneral_noise(),depolarizing_noise())with_*methodspecos.qec.surface.NoiseModelThe confusion is live rather than theoretical:
docs/workflows/guppy-dem-decoding.mdnow imports
NoiseModelfrompecos.qec.surfacein a section that also discussessimulator noise, and since #422 this dataclass is the shared idle-noise vocabulary for
both the Guppy and native-surface DEM routes — so it is no longer a surface-code detail
either.
NoiseParameters(or similar) would say what it is.Two separable questions
Public, so it needs an alias plus a deprecation ramp rather than a hard rename —
same discipline as Deprecation ramp: align pecos-engines GeneralNoiseModel idle-noise API with the structured vocabulary #424.
with_*setters to mirrorgeneral_noise(). Recommendno: it is a dataclass, so
dataclasses.replace(params, p1=...)already provideswhat
.with_p1(...)would, and 30 setters would restate the field list a third time(fields, docstring, methods) with three places to drift. The conveniences that earn
their place already exist:
uniform(),is_noiseless,physical_error_rate,for_runtime_idle_time_units().Note for whoever picks this up: a "user-facing uses bare setters, low-level uses
with_*" rule does not hold in this repo.sim()'s noise builders are user-facingand use
with_*; the Rust-backedBpOsdBuilderuses bare. The convention is genuinelyinconsistent, so a naming decision here should be made deliberately rather than by
appeal to an existing rule.
Why this belongs with #425
#425 already covers aligning the non-idle
GeneralNoiseModelsurfaces with thestructured vocabulary. The DEM-side and engines-side names should be settled once,
together — otherwise this gets renamed to
NoiseParametersnow and possibly againwhen the unified vocabulary lands. Deliberately kept out of PR #420 for that reason,
and because a 240-site public rename mixed into a large functional PR is hard to review.
Related: #422 (which made this dataclass the shared idle vocabulary), #424, #425.