qecx.algebra.gf2_solve_left¶
- qecx.algebra.gf2_solve_left(A, b)¶
Solve the left F2 linear system
c @ A == b (mod 2)for the coefficient rowc.Returns a length-
mrow vectorcsuch that(c @ A) % 2 == bif one exists, orNonewhenblies outsiderowspace(A). The choice between equivalent solutions (whenAhas a non-trivial left null space) is an implementation detail; callers needing a particular representative should compose with the null-space basis themselves.- Parameters:
- Returns:
Freshly allocated length-
mrow vectorcsatisfying(c @ A) % 2 == b, orNoneif no suchcexists. Withn == 0the equationc @ A == bholds trivially for anycand the all-zeros length-mvector is returned. Withm == 0the all-zeros vector of shape(0,)is returned whenbis all zeros, elseNone.- Return type: