Automatic derivation of many-body theories based on general Fermi vacua
This paper describes Wick&D, an implementation of the algebra of second-quantized operators normal ordered with respect to general correlated references and the corresponding Wick theorem [D. Mukherjee, Chem. Phys. Lett. 274, 561 (1997) and W. Kutzelnigg and D. Mukherjee, J. Chem. Phys. 107, 432 (1997)]. Wick&D employs a compact representation of operators and a backtracking algorithm to efficiently evaluate Wick contractions. Since Wick&D can handle both fully and partially contracted terms, it can be applied to both projective and Fock-space many-body formalisms. To demonstrate the usefulness of Wick&D, here we use it to evaluate the single-reference coupled cluster equations up to octuple excitations and report an automated derivation and implementation of the second-order driven similarity renormalization group multireference perturbation theory.