Linear (qiskit_qec.linear)

Linear module classes and functions

Linear matrix functions

create_lambda_matrix(n)

Creates the GF(2) Lambda matrix

augment_mat(matrix[, pos])

Augments a given matrix with the identify matrix.

rref(matrix)

Computes the Row Reduced Echelon Form for a GF(2) matrix.

rank(matrix)

Computes the rank of the GF(2) matrix

rref_complete(matrix)

Computes the Row Reduced Echelon Form for a GF(2) matrix as well as pivots, transformation matrix and rank.

Linear symplectic functions

all_commute(matrix)

Determines if each possible pair of different rows of the GF(2) symplectic matrix have zero symplectic product.

symplectic_product(mat1, mat2)

Returns the symplectic product of two GF(2) symplectic matrices.

make_commute_hyper(a, x, z[, arange, ...])

Makes an element(s) commute with hyperbolic pair(s)

locate_hyper_partner(matrix, vector)

Locate a hyperbolic/noncommutative parter

build_hyper_partner(matrix, index)

Builds an independent hyperbolic partner for the input vector indexed

symplectic_gram_schmidt(a[, x, z])

Applies the sympletic Gram-Schmidt process to the input matrix

is_symplectic_matrix_form(matrix[, dtype])

Is the input matrix GF(2) symplectic

is_symplectic_vector_form(vector[, dtype])

Is the input vector GF(2) symplectic

is_symplectic_form(a[, dtype])

Is the input a GF(2) symplectic matrix or vector

is_hyper_form(x, z)

Do the input matrices form a hyperbolic/symplectic basis?

is_center(cntr, matrix)

Does the input center matrix represent the center of the supplied matrix?

is_same_span(matrix1, matrix2)

Does span(rows of matrix1) = span(rows of matrix2)?

is_stabilizer_group(matrix)

Do the rows of the input matrix represent the generators of an abelian Pauli subgroup?