  We present a symbolic algorithm for treating perturbative expansions of
Hamiltonians with general two-body interactions. The method, formally
equivalent to determinant Monte Carlo methods, merges well-known analytics with
the recently developed symbolic integration tool, algorithmic Matsubara
integration (AMI) that allows for the evaluation of the imaginary
frequency/time integrals. By explicitly performing Wick contractions at each
order of the perturbative expansion we order-by-order construct the fully
analytic solution of the Green's function and self energy expansions. A key
component of this process is the assignment of momentum/frequency conserving
labels for each contraction that motivates us to present a fully symbolic
Fourier transform procedure which accomplishes this feat. These solutions can
be applied to a broad class of quantum chemistry problems and are valid at
arbitrary temperatures and on both the real- and Matsubara-frequency axis. To
demonstrate the utility of this approach, we present results for simple
molecular systems as well as model lattice Hamiltonians. We highlight the case
of molecular problems where our results at each order are numerically exact
with no stochastic uncertainty.
