Skip to main content

TeMFpy: Tensor-Network Mean-Field Python

TeMFpy (Tensor Networks for Mean-Field States in Python, suggested pronuncation: ˈtɛmɸ.paɪ) is a TeNPy-based Python library for converting fermionic mean-field states to finite or infinite matrix product state 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. Being built on top of TeNPy, it integrates seamlessly with existing MPS-based algorithms.

Installation

TeMFpy runs on all operating systems and requires Python 3.10 or later. We support installation through pip:

pip install --upgrade pip
pip install --upgrade temfpy

We will set up installation via Conda in the near future.

If you use Windows and want to use the Pfaffian-state functionality, make sure you install the pfapack dependency correctly!. Alternatively, consider using Windows Subsystem for Linux.

Documentation

The documentation is available on this website. In addition, every object in TeMFpy comes with detailed docstrings that are available through the help() function in Python.

Contribute

The most up-to-date version of TeMFpy is available on GitHub. If you find any bugs in the library, please let us know by opening an issue, including a minimal example to reproduce the issue.

We also welcome contributions, whether bug fixes or new features, please see our contributor guidelines for details.

Citing TeMFpy

If you find the TeMFpy project useful for your research, please consider citing the following software paper in order to help us continue devoting time and resources to the TeMFpy development:

@misc{temfpy,
      title={{TeMFpy}: a {Python} library for converting fermionic mean-field states into tensor networks}, 
      author={Simon H. Hille and Attila Szabó},
      year={2025},
      eprint={2510.05227},
      archivePrefix={arXiv},
      primaryClass={cond-mat.str-el},
      url={https://arxiv.org/abs/2510.05227}, 
}

Please consider citing the underlying TeNPy library as well:

@Article{tenpy,
    title={{Tensor network Python (TeNPy) version 1}},
    author={Johannes Hauschild and Jakob Unfried and Sajant Anand and Bartholomew Andrews and Marcus Bintz and Umberto Borla and Stefan Divic and Markus Drescher and Jan Geiger and Martin Hefel and Kévin Hémery and Wilhelm Kadow and Jack Kemp and Nico Kirchner and Vincent S. Liu and Gunnar Möller and Daniel Parker and Michael Rader and Anton Romen and Samuel Scalet and Leon Schoonderwoerd and Maximilian Schulz and Tomohiro Soejima and Philipp Thoma and Yantao Wu and Philip Zechmann and Ludwig Zweng and Roger S. K. Mong and Michael P. Zaletel and Frank Pollmann},
    journal={SciPost Phys. Codebases},
    pages={41},
    year={2024},
    publisher={SciPost},
    doi={10.21468/SciPostPhysCodeb.41},
    url={https://scipost.org/10.21468/SciPostPhysCodeb.41},
}

Licence

MIT Licence

Metadata

Release files for temfpy 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for temfpy 0.3.1
File Interpreter ABI Platform
temfpy-0.3.1-py3-none-any.whl Python 3 none any Details

Release files / temfpy-0.3.1-py3-none-any.whl

Download URL temfpy-0.3.1-py3-none-any.whl
Size 54.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37e0f5ed2bbdaf5ab5025119a15b8f2810f5f3f6b4145e00f8a30a02eb750f9a
BLAKE2b-256 checksum
How to use checksums
125af2e5b585247a204d9b44a6548cd7c24e1c9ab72e061c4f6fb117373e41f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.3

1 release file

0.3.2

1 release file

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page