Abstract
We present a graph-based algorithm for computing matrix elements of arbitrary second-quantized operators between configuration state functions (CSFs) defined in a genealogical scheme. Unlike Slater determinants, CSFs are spin-adapted and offer a more compact representation of many-electron wave functions, but their use in quantum chemical methods is often hindered by the complexity of evaluating matrix elements. Our approach leverages a graphical representation to efficiently encode the expansion of CSFs in terms of Slater determinants without explicitly constructing the full expansion. The algorithm applies operator sequences directly to the graph and computes overlaps via graph traversal, yielding matrix elements, and is completely general for any operator sequence. Numerical tests demonstrate that the method achieves machine-level precision and outperforms explicit determinant expansion by several orders of magnitude. This framework opens new possibilities for CSF-based implementations in selected and stochastic configuration interaction methods.
Supplementary materials
Title
Implementation and test data
Description
Python implementation of the algorithm and lists of matrix elements tested.
Actions



![Author ORCID: We display the ORCID iD icon alongside authors names on our website to acknowledge that the ORCiD has been authenticated when entered by the user. To view the users ORCiD record click the icon. [opens in a new tab]](https://www.cambridge.org/engage/assets/public/coe/logo/orcid.png)