|View source on GitHub|
Compute the anticommutator of two operators.
openfermion.utils.anticommutator( operator_a, operator_b )
|operator_a, operator_b: Operators in anticommutator. Any operators are accepted so long as implicit addition and multiplication are supported; e.g. QubitOperators, FermionOperators, BosonOperators, or Scipy sparse matrices. 2D Numpy arrays are also supported.|
||operator_a and operator_b are not of the same type.|