Skip to main content

solve_output_correction_symbolic

Function solve_output_correction_symbolic 

Source
pub fn solve_output_correction_symbolic(
    outputs: &[IVec3],
    constraints: &[OutputCorrectionRow],
) -> Result<SymbolicOutputCorrection, OutputCorrectionError>
Expand description

Solve the joint output-correction system once, symbolically.

Variables are two frame bits per output: the X bit at column 2*i (constrained by the Z part of a surface’s Pauli at output i) and the Z bit at column 2*i + 1 (constrained by the X part). Each constraint row’s RHS is tracked as a singleton constraint-index set and XOR-combined through the elimination; free variables solve to the constant false (empty set).

§Errors

Returns OutputCorrectionError::UnknownOutput if a row names an absent output.