qiskit_qec.linear.is_stabilizer_group

is_stabilizer_group(matrix)[source]

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

Parameters:

matrix (ndarray) – GF(2) symplectic matrix

Raises:

QiskitError – Input matrix not a GF(2) symplectic matrix

Return type:

bool

Returns:

True is matrix represents a Stabilizer group

Examples

>>> matrix = numpy.array([[1,0,0,0,0,0],
                       [0,1,0,0,0,0],
                       [1,0,0,0,0,1]], dtype=numpy.bool_)
>>> is_stabilizer_group(matrix)
True