Skip to main content

Python package Documentation Status

PyQMC

PyQMC is a Python package for real-space quantum Monte Carlo (QMC) electronic structure calculations, designed to interoperate closely with PySCF.

Full documentation is available at pyqmc.readthedocs.io.

Features

  • Variational Monte Carlo (VMC) and Diffusion Monte Carlo (DMC)
  • Wavefunction optimization via stochastic reconfiguration
  • Ensemble wave function optimization for excited state computation
  • Trial wavefunctions: Slater-Jastrow, multi-determinant (CASSCF/selected CI), geminal, and three-body Jastrow
  • Observables: energy, one- and two-body density matrices, extensible to your problem.
  • Periodic boundary conditions with twist averaging and supercell support
  • Parallel execution via MPI (mpi4py) or Dask
  • GPU and JAX backends for high-performance evaluation
  • HDF5-based checkpointing for restartable workflows

Installation

pip install pyqmc

to get the latest development version,

pip install git+https://github.com/WagnerGroup/pyqmc.git

Requirements: Python >= 3.10, PySCF >= 2.8, SciPy, h5py, pandas.

Quick Start

The high-level recipes interface handles a complete optimize -> VMC -> DMC workflow:

import pyscf
import pyqmc.recipes

# 1. Run a DFT/HF calculation with PySCF and save a checkpoint
mol = pyscf.gto.M(atom="He 0. 0. 0.", basis="ccECP_cc-pVDZ", ecp="ccecp", unit="bohr")
mf = pyscf.scf.RHF(mol)
mf.chkfile = "he_dft.hdf5"
mf.kernel()

# 2. Optimize the Slater-Jastrow wavefunction
pyqmc.recipes.OPTIMIZE("he_dft.hdf5", "he_sj.hdf5", slater_kws={"optimize_orbitals": True})

# 3. Run VMC
pyqmc.recipes.VMC("he_dft.hdf5", "he_sj_vmc.hdf5", load_parameters="he_sj.hdf5", nblocks=40)

# 4. Run DMC
pyqmc.recipes.DMC("he_dft.hdf5", "he_sj_dmc.hdf5", load_parameters="he_sj.hdf5",
                  nblocks=4000, tstep=0.02)

Results are saved as HDF5 files and can be read back with pyqmc.recipes.read_mc_output.

Parallel Execution

PyQMC supports parallelism via MPI using mpi4py.futures or any other futures object such as dask or concurrent:

import mpi4py.futures
import pyqmc.recipes

if __name__ == "__main___":
    npartitions = 4
    with mpi4py.futures.MPIPoolExecutor(max_workers=npartitions) as client:
        pyqmc.recipes.OPTIMIZE("he_dft.hdf5", "he_sj.hdf5", client=client, npartitions=npartitions)

Run with: mpiexec -n 5 python -m mpi4py.futures script.py

Package Structure

Module Description
pyqmc.recipes High-level OPTIMIZE, VMC, DMC functions
pyqmc.wf Wavefunctions: Slater, JastrowSpin, MultiplyWF, AddWF, geminal
pyqmc.method Core algorithms: VMC, DMC, line minimization, variance optimization
pyqmc.observables Energy, one body density matrix, two body density matrix, ECP
pyqmc.pbc Periodic boundary conditions, supercell construction, twist averaging
pyqmc.wf.jax JAX-based wavefunction and GTO evaluation

Citation

If you use PyQMC in your research, please cite the relevant papers listed in the documentation.

License

MIT License. Copyright (c) 2019-2026 The PyQMC Developers.

Metadata

Release files for pyqmc 0.8.1

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

Source distribution (sdist)

Source distribution for pyqmc 0.8.1
File Size Uploaded
pyqmc-0.8.1.tar.gz 118.5 kB Details

Built distribution (wheel)

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

Total release size: 274.8 kB

Release files / pyqmc-0.8.1.tar.gz

Download URL pyqmc-0.8.1.tar.gz
Size 118.5 kB
Tags Source
SHA-256 checksum
How to use checksums
db26df517ca85eea0ea34e049fd0db5c95f2b7bb07369d3c7b15cdf0506dfe2d
BLAKE2b-256 checksum
How to use checksums
c8bdcd0296fbeb27f38c9f7421a5a4265ded3e83adce5d1ba28c6efe89ca1db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 2, 2026.

Transparency log

Release files / pyqmc-0.8.1-py3-none-any.whl

Download URL pyqmc-0.8.1-py3-none-any.whl
Size 156.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffc2728754e2a032c2850988139584ee87e7e1e3e219e6dc863ce08746620dfc
BLAKE2b-256 checksum
How to use checksums
4a9bd701615a05d78b7de4cf82c31f1619cb3744f051131b59537855203ecccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1

2 release files

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