openfermion.transforms.check_commuting_stabilizers

Auxiliary function checking that stabilizers commute.

Main aliases

openfermion.check_commuting_stabilizers, openfermion.transforms.repconversions.check_commuting_stabilizers, openfermion.transforms.repconversions.qubit_tapering_from_stabilizer.check_commuting_stabilizers

If two stabilizers anti-commute their product will have an imaginary coefficient. This function checks the list of stabilizers (QubitOperator) and raises an error if a complex number is found in any of the coefficients.

stabilizer_list list

List of stabilizers as QubitOperators.

msg str

Message for the error.

thres Tolerance value, set to OpenFermion tolerance by default.