openfermion.circuits.error_operator

Determine the difference between the exact generator of unitary

evolution and the approximate generator given by Trotter-Suzuki to the given order.

terms a list of QubitTerms in the Hamiltonian to be simulated.
series_order the order at which to compute the BCH expansion. Only the second order formula is currently implemented (corresponding to Equation 9 of the paper).

The difference between the true and effective generators of time evolution for a single Trotter step.

Notes: follows Equation 9 of Poulin et al.'s work in "The Trotter Step Size Required for Accurate Quantum Simulation of Quantum Chemistry".