qecx.algebra.gf2_symplectic_inner_product¶
- qecx.algebra.gf2_symplectic_inner_product(matrix, n)¶
Pairwise F2 symplectic inner products of the rows of a symplectic matrix.
For rows
i,jwith X-block / Z-block decomposition(a_i, b_i)and(a_j, b_j), the(i, j)entry isa_i . b_j + a_j . b_i (mod 2). Two Pauli operators commute iff their symplectic inner product is0; the resulting matrix is therefore the F2 commutator table and is symmetric.- Parameters:
- Returns:
Freshly allocated array of shape
(m, m). Returns the(0, 0)array whenm == 0and the(m, m)zero matrix whenn == 0(every row trivially commutes with every row in the absence of qubits).- Return type: