Compute the fermionic swap network Trotter error of a diagonal two-body Hamiltonian.

hamiltonian FermionOperator

The diagonal Coulomb Hamiltonian to compute the Trotter error for.

error_operator The second-order Trotter error operator.

Follows Eq 9 of Poulin et al., arXiv:1406.4920, applied to the Trotter step detailed in Kivlichan et al., arxiv:1711.04789.