Compute log[e^{x_1} ... e^{x_N}] using the BCH formula.
openfermion.utils.bch_expand(
*ops, **kwargs
)
This implementation is explained in arXiv:1712.01348.
Args |
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
|
Returns |
The truncated BCH operator.
|
Raises |
ValueError
|
invalid order parameter.
|
TypeError
|
operator types are not all the same.
|