openfermion.transforms.check_stabilizer_linearity

Auxiliary function checking that stabilizers are linearly independent.

If two stabilizer are linearly dependent the result after some of their products will be the identity. This function checks the list of stabilizers (QubitOperator) and raises an error if the identity is found.

stabilizer_list (list): List of stabilizers (QubitOperator). msg (str): Message for the error.