Symmetry- and Sector-Aware Mitigation Compiler¶
This page defines the bounded first contract for the mitigation compiler lane. The current implementation is a planner, not a circuit transformer. It decides whether existing primitives are eligible for a Kuramoto/XY experiment descriptor and returns explicit blockers when required evidence is missing.
Public API:
from scpn_quantum_control.mitigation import (
SymmetrySectorProblem,
plan_symmetry_sector_mitigation,
replay_symmetry_sector_counts,
)
Inputs¶
SymmetrySectorProblem records:
n_qubits- symmetric finite
coupling_matrix - finite
omega - computational-basis
initial_state - measurement basis:
z,x,y,xyz, orcounts - whether raw counts are available
- whether noise-scaled symmetry observables are available for GUESS
Outputs¶
SymmetrySectorPlan records:
status:eligibleorblockedexpected_parity- eligible primitives:
parity_postselection,symmetry_expansion,guess_symmetry_decay - blockers
- required evidence
- benchmark gates
- claim boundary
Failure modes¶
The planner blocks rather than guessing when:
- the coupling matrix is not square, finite, and symmetric;
omegalength or finiteness is invalid;initial_stateis not a computational-basis bitstring of lengthn_qubits;- raw counts are absent;
- GUESS is requested without noise-scaled symmetry observables.
Benchmark gates¶
Before this planner is wired into execution paths, every integration must pass:
scpn-bench symmetry-sector-mitigation-gatescpn-bench sync-benchmark-gate- hardware result-pack verifier for any raw-count replay claim
- focused mitigation regression tests for the chosen primitive
Claim boundary¶
Planner output is an eligibility contract only. It does not mutate circuits, submit hardware jobs, prove improved hardware performance, or broaden DLA/GUESS claims without benchmark and raw-count evidence.
Raw-count replay adapter¶
replay_symmetry_sector_counts() is the first bounded execution adapter for
the planner. It consumes an eligible SymmetrySectorProblem and offline raw
computational-basis counts, then:
- validates count keys, count values, bitstring length, and shot total;
- applies parity postselection with explicit rejected-count accounting;
- applies symmetry expansion while preserving the raw shot total;
- reports GUESS as deferred until calibrated noise-scaled symmetry observable rows are wired into the replay contract.
The adapter does not mutate circuits, does not submit hardware jobs, and does not infer GUESS correction from raw counts alone.
The same scpn-bench symmetry-sector-mitigation-gate command now locks both
planner fixtures and replay fixtures. Replay fixture rows cover the applied
postselection/expansion path and the blocked missing-counts path.