We describe the first version (v1.0.0) of the code ADG that automatically (1) generates all valid Bogoliubov many-body perturbation theory (BMBPT) diagrams and (2) evaluates their algebraic expression to be implemented for numerical applications. This is achieved at any perturbative order p for a Hamiltonian containing both two-body (four-legs) and three-body (six-legs) interactions (vertices). The automated generation of BMBPT diagrams of order p relies on elements of graph theory, i.e., it is achieved by producing all oriented adjacency matrices of size (p + 1) × (p + 1) satisfying topological Feynman's rules. The automated evaluation of BMBPT diagrams of order p relies both on the application of algebraic Feynman's rules and on the identification of a powerful diagrammatic rule providing the result of the remaining p-tuple time integral. The diagrammatic rule in question constitutes a novel finding allowing for the straight summation of large classes of time-ordered diagrams at play in the time-independent formulation of BMBPT. Correspondingly, the traditional resolvent rule employed to compute time-ordered diagrams happens to be a particular case of the general rule presently identified. The code ADG is written in Python2.7 and uses the graph manipulation package NetworkX. The code is also able to generate and evaluate Hartree-Fock-MBPT (HF-MBPT) diagrams and is made flexible enough to be expanded throughout the years to tackle the diagrammatics at play in various many-body formalisms that already exist or are yet to be formulated.
PROGRAM SUMMARYProgram Title: ADG Licensing provisions: GPLv3 Programming language: Python2.7 Nature of problem: As formal and numerical developments in many-bodyperturbation-theory-based ab initio methods make higher orders reachable, producing and evaluating all the diagrams become rapidly undoable on a handmade basis as both their number and complexity grows quickly, making it prone to mistakes and oversights. Solution method: BMBPT diagrams are encoded as square matrices known as oriented adjacency matrices in graph theory, and then turned into graph objects using the NetworkX package. Checks on the diagrams and evaluation of their time-integrated expression is then done on a purely diagrammatic basis. HF-MBPT diagrams are produced and evaluated as well using the same principle.