TeMFpy: a Python library for converting fermionic mean-field states into tensor networks
Simon H. Hille, Attila Szabó
TL;DR
TeMFpy delivers a practical, open-source pipeline to convert fermionic mean-field states into MPS representations, enabling seamless integration with tensor-network techniques and DMRG/VUMPS workflows. By exploiting the Gaussian structure of Slater determinants and Pfaffian/Bogoliubov states, the library computes MPS entries from overlaps of entangled orbitals with favorable scaling, and extends naturally to infinite MPS for gapped, translation-invariant systems. Its core contributions include efficient Slater/Pfaffian Schmidt decompositions, fast overlap computations via determinant/Pfaffian formulas, and a modular design that supports iMPS construction and Gutzwiller projection to spin systems. This combination empowers robust initialization, variational studies, and exploration of spin liquids and other strongly correlated phases by fusing mean-field accuracy with tensor-network flexibility. The work thus provides a scalable, extensible toolkit bridging mean-field theory, VMC, and tensor networks for correlated electron systems.
Abstract
We introduce TeMFpy, a Python library for converting fermionic mean-field states to finite or infinite matrix product state (MPS) form. TeMFpy includes new, efficient, and easy-to-understand algorithms for both Slater determinants and Pfaffian states. Together with Gutzwiller projection, these also allow the user to build variational wave functions for various strongly correlated electron systems, such as quantum spin liquids. We present all implemented algorithms in detail and describe how they can be accessed through TeMFpy, including full example workflows. TeMFpy is built on top of TeNPy and, therefore, integrates seamlessly with existing MPS-based algorithms.
