Three-stage layered selection that keeps shots outside the calibration window out of your application
Redundant syndrome check
--
Errors Caught
--
Agreement
Correlated error detection
--
Errors Caught
--
Suspicion
Real-time early abort
--
Errors Caught
--
Failure Risk
Each stabilizer measurement is repeated 3 times. If any copy disagrees, the entire shot is flagged as corrupted and discarded. First line of defense.
Surviving shots are checked for correlated errors (crosstalk, leakage, cosmic rays). Suspect shots are vetoed.
Real-time session monitor tracks shot quality round-by-round. When the signal says recovery is unlikely, it flags the session and triggers early abort.
from sdk import (
ShotValidator, SafetyGateV3, ExecutionMonitor,
ValidationLayout, MonitoringSession, AbortPolicy,
)
# Stage 1: ShotValidator
layout = ValidationLayout.for_repetition_code(distance=5, fan_out=3, n_rounds=4)
validator = ShotValidator(layout, enabled=True)
# Stage 2: SafetyGate
gate = SafetyGateV3.from_calibration("ibm_fez", distance=5)
# Stage 3: LiveGate (via ExecutionMonitor)
monitor = ExecutionMonitor(
session=MonitoringSession(backend="ibm_fez"),
abort_policy=AbortPolicy(), # abort sustained out-of-window runs
)
# Run pipeline
with monitor.track() as session:
for shot in hardware_shots:
# Stage 1: validate shot integrity
sv_result = validator.score_shot(shot)
if not sv_result.clean:
continue
# Stage 2: check for correlated errors
sg_result = gate.evaluate(shot)
if sg_result.vetoed:
continue
# Stage 3: real-time quality monitoring
session.record(shot)
print(f"Pipeline efficiency: {session.efficiency:.1%}")
print(f"Errors caught: {session.total_errors_caught}")Full pipeline available in QubitBoost SDK v2.7.0, pip install qubitboost-sdk