Skip to content

DetectorErrorModel.from_circuit mis-propagates F and SY gates #325

@ciaranra

Description

@ciaranra

Stage 4 SZZ review found a latent public-API bug: DetectorErrorModel.from_circuit appears to silently produce different DEMs when a TickCircuit uses F/SY gates versus equivalent decompositions using gates the builder already handles. The shipped SZZ p1 path uses the influence-map DemBuilder and is not affected, but from_circuit is a public API and should not silently emit a wrong DEM.\n\nObserved review reproduction:\n- Build the lowered SZZ abstract surface circuit containing F and SY prefix gates.\n- Replace F with its equivalent [SX, SZ] and SY with [SX, SZ, SXdg].\n- Under DetectorErrorModel.from_circuit with p2-only noise, the DEM changes even though the circuits are unitarily equivalent.\n- The same plain-vs-lowered comparison through the influence-map DemBuilder is byte-identical, so the issue is isolated to from_circuit propagation, not the SZZ prefix lowering itself.\n\nRequired behavior:\n- Prefer fixing from_circuit propagation for F/Fdg/SY/SYdg.\n- If that cannot land immediately, make from_circuit reject these gate types loudly until propagation is correct.\n\nReview reference: pecos-docs/reviews/grug-cliff-def-szz-stage4-review.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions