check_commutativity

check_commutativity(op_1, op_2, anti=False)[source]

Check the (anti-)commutativity between two operators.

Parameters
Returns

whether or not two operators are commuted or anti-commuted.

Return type

bool