Summary
DagFaultAnalyzer is publicly re-exported (crates/pecos-qec/src/fault_tolerance/propagator.rs:102), and its public propagation methods walk a circuit without checking whether each gate can actually be Pauli-propagated. A gate that cannot -- T, Tdg, U, CCX, a non-Clifford rotation -- is silently treated as the identity, and the caller receives a plausible-looking result with no diagnostic.
Affected public entry points:
propagate_from_measurement_generic (crates/pecos-qec/src/fault_tolerance/propagator/dag.rs:2090)
propagate_all and propagate_all_parallel (dag.rs:2566, dag.rs:2590)
- the forest path reaching
dag.rs:2306, :2376, :2439
Relationship to the DEM work
PR #600 makes the DEM builders reject such gates, because faults inserted around a gate that propagation ignores produce a silently wrong detector error model. That change covers the DEM entry points: build_influence_map preflights the circuit and returns early, so every DEM consumer is protected.
It does not cover direct callers of the raw propagation API above, which behave as they always have. This is therefore not a regression from that PR -- it is the remaining, unfixed part of the same class of defect, and worth closing separately.
The Python analyzer wrapper likewise returns the marked influence map infallibly (python/pecos-rslib/src/fault_tolerance_bindings.rs:946), so a Python caller can hold a map that is flagged internally as unsupported without ever being told.
Proposed resolution
Either make the public propagation methods preflight and return Result, or restrict them so that unchecked propagation is reachable only behind a validated path. The Python analyzer should raise, or at minimum expose the retained diagnostic so a caller can check it.
Summary
DagFaultAnalyzeris publicly re-exported (crates/pecos-qec/src/fault_tolerance/propagator.rs:102), and its public propagation methods walk a circuit without checking whether each gate can actually be Pauli-propagated. A gate that cannot --T,Tdg,U,CCX, a non-Clifford rotation -- is silently treated as the identity, and the caller receives a plausible-looking result with no diagnostic.Affected public entry points:
propagate_from_measurement_generic(crates/pecos-qec/src/fault_tolerance/propagator/dag.rs:2090)propagate_allandpropagate_all_parallel(dag.rs:2566,dag.rs:2590)dag.rs:2306,:2376,:2439Relationship to the DEM work
PR #600 makes the DEM builders reject such gates, because faults inserted around a gate that propagation ignores produce a silently wrong detector error model. That change covers the DEM entry points:
build_influence_mappreflights the circuit and returns early, so every DEM consumer is protected.It does not cover direct callers of the raw propagation API above, which behave as they always have. This is therefore not a regression from that PR -- it is the remaining, unfixed part of the same class of defect, and worth closing separately.
The Python analyzer wrapper likewise returns the marked influence map infallibly (
python/pecos-rslib/src/fault_tolerance_bindings.rs:946), so a Python caller can hold a map that is flagged internally as unsupported without ever being told.Proposed resolution
Either make the public propagation methods preflight and return
Result, or restrict them so that unchecked propagation is reachable only behind a validated path. The Python analyzer should raise, or at minimum expose the retained diagnostic so a caller can check it.