openfermion.utils.bch_expand

Compute log[e^{x_1} ... e^{x_N}] using the BCH formula.

This implementation is explained in arXiv:1712.01348.

ops A sequence of operators of the same type for which multiplication and addition are supported. For instance, QubitOperators, FermionOperators, or Scipy sparse matrices. keyword arguments: order(int): The max degree of monomial with respect to X and Y to truncate the BCH expansions. Defaults to 6

The truncated BCH operator.

ValueError invalid order parameter.
TypeError operator types are not all the same.