qecx.algebra.gf2_left_null_space¶
- qecx.algebra.gf2_left_null_space(matrix)¶
Compute a row basis for the left null space of a binary matrix over F2.
The returned basis spans all vectors
cof lengthmsuch thatc @ matrix == 0 (mod 2). Basis rows are produced in the row order yielded bygf2_rref()on the augmented matrix[matrix | I_m].- Parameters:
matrix (NDArray[np.uint8]) – Input binary matrix of shape
(m, n).- Returns:
Freshly allocated array of shape
(k, m)wherek = m - rank(matrix). An input with zero rows or zero columns yields them-by-midentity (every row is in the left null space whenn == 0) or a(0, 0)array whenm == 0.- Return type: