Skip to content

Strengthen QEC sizing and distance contracts with Flux #412

Description

@arniber21

What to build

Make QEC sizing helpers express their actual legal domains and successful formulas. Repetition graph construction, surface/repetition atom counts, and ceiling division must not rely on unchecked subtraction or result types with no refined postcondition.

Acceptance criteria

  • Repetition graph construction requires a valid nonzero/minimum distance or returns QldpcError without underflow.
  • Surface-code sizing proves the successful result equals 2*d*d - 1 for valid odd d >= 3 without overflow.
  • Repetition-code sizing proves the successful result equals 2*d - 1 for valid d >= 2 without overflow.
  • Ceiling division proves its successful result is the mathematical ceiling for nonzero denominators.
  • Invalid and overflow inputs return the documented typed errors in stable builds.
  • Flux checks these postconditions without empty Result<_, _> specifications or new trusted bodies.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerFrontend / MLIR passes, type system, language semanticsneutral-atomNeutral-atom backend target (quon_na, quantum.na, AOD/schedule)ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions