Skip to content

Stuartferguson00/QeMCMC

Repository files navigation

Quantum-enhanced Markov Chain Monte Carlo Simulator

Python 3.13+ Qiskit 2.2 PennyLane 0.44 License: MIT

This is a lightweight research package for Quantum-enhanced Markov Chain Monte Carlo (QeMCMC) sampling over discrete spin/bitstring configurations.

The implementation is inspired by the numerics in Layden et al's paper on QeMCMC and builds upon the foundations of the pafloxy/quMCMC repository.

Documentation

Documentation and examples can be found here.

Features

  • Arbitrary Energy Models: Define any classical Ising or QUBO-like model using a simple list of coupling tensors (example: 2D Ising h, J etc). A universal energy calculator handles arbitrary-order interactions
  • Hamiltonian Evolution: Build the corresponding quantum Hamiltonian based on the given couplings and run Trotterised time evolution with PennyLane's lightning qubit simulator
  • Coarse Graining: Optionally use local updates on chosen subgroups of spins to scale proposals
  • Constraining: Implementation of hard and soft constraints for a given model

Installation

Install the latest release from PyPI (requires Python 3.13+):

pip install qemcmc

From source

The example notebooks live in this repo, not the published package. To run them or to develop QeMCMC, clone the repo and install with uv:

cd QeMCMC
uv sync

uv sync creates a local environment .venv and installs the locked dependencies from pyproject.toml and uv.lock.

License

Distributed under the MIT License. See LICENSE for more information.

Authors

This project was created and maintained by Stuart Ferguson & Feroz Hassan.

For questions, suggestions, or collaboration, please feel free to contact the authors:

Acknowledgements


alt text

About

Code to run the Quantum-enhanced Markov Chain monte Carlo (QeMCMC) of Layden et al.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors