pygsti.tools.matrixmod2#
General matrix utilities. Some, but not all, are specific to matrices over the ints modulo 2.
Functions
|
Solves Ax = b over GF(2) |
|
Returns a matrix M such that d = M M.T for symmetric d, where d and M are matrices over [0,1] mod 2. |
|
Returns the determinant of a matrix over the integers modulo 2 (GL(n,2)). |
Returns a diagonal matrix containing the diagonal of m. |
|
Returns a 1D array containing the diagonal of the input square 2D array m. |
|
|
Returns the product over the integers modulo 2 of two matrices. |
|
Computes the permutation matrix P such that the [1:t,1:t] submatrix of P a P is invertible. |
Gaussian elimination mod2 of a. |
|
|
Finds the inverse of a matrix over GL(n,2) |
|
Returns the direct sum of two square matrices of integers. |
|
Returns the product over the integers modulo 2 of a list of matrices. |
|
Returns M such that M a M.T has ones along the main diagonal |
|
Permutes the first row & col with the i'th row & col |
Computes the permutation matrix P such that all [n:t,n:t] submatrices of P a P are invertible. |
|
|
Constructs a random bitstring of length n with parity p |
|
Finds a random invertable matrix M over GL(n,2) |
|
Creates a random, symmetric, invertible matrix from GL(n,2) |
Returns a matrix containing the strictly upper triangle of m and zeros elsewhere. |