Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

monoprop

because your operators deserve to propagate at escape velocity

Documentation Test monoprop codecov

monoprop is a high-performance C++ library with Python bindings for Majorana and Pauli propagation — a backend for classically simulating and variationally optimising quantum circuits. Rather than storing the full quantum state, it expands an operator in the Majorana basis and propagates it through a circuit, truncating terms that contribute little. It scales to large systems by partitioning the operator across cores and across nodes with MPI.

[!WARNING] This package is under active development. This project follows Semantic Versioning. While in 0.x.y, breaking changes may occur in minor releases. Pin your version if you depend on it. If you have feedback, please open an issue.

Benchmarks

Check out the comparison of monoprop against other open-source Pauli propagation engines in [benches/third_party]! Runtime Benchmark Memory Benchmark

📖 Full documentation: https://docs.algorithmiq.fi/monoprop

Installation

pip install monoprop      # or: uv add monoprop

The prebuilt PyPI wheels are single-process (built without MPI). For multi-rank runs, or to build the C++ library and executables, build from source (see below).

Quick example

Back-propagate a Majorana observable through a one-gate circuit:

from monoprop import MajoranaPropagator, ExpGate, Circuit, MajoranaOperator

# Observable m_0 m_1 m_2 m_4, evolved under one Majorana rotation exp(-i θ/2 · M_γ),
# generated by M_γ = i*m_4 m_5.
observable = MajoranaOperator({(0, 1, 2, 4): 1.0}, num_modes=8)
gate = ExpGate(MajoranaOperator({(4, 5): 1j}, num_modes=8))  # Hermitian generator: weight-2 => imaginary coeff
circuit = Circuit(gates=[gate], parameters=[0.5])  # one angle value per gate

mp = MajoranaPropagator.from_circuit(circuit, observable, cutoff=16)
print(mp.evolved_operator())  # the gate splits the monomial into two terms

Qubit (Pauli) operators are simulated with PauliPropagator. Here we back-propagate Z ⊗ Z through one exp(-i θ/2 · X_0) rotation:

from monoprop import PauliPropagator, ExpGate, Circuit, PauliOperator, Pauli

observable = PauliOperator({"ZZ": 1.0}, num_qubits=2)  # num_qubits lives on the observable
gate = ExpGate(PauliOperator({Pauli("X", 0): 1.0}, num_qubits=2))  # exp(-i θ/2 · X_0)
circuit = Circuit(gates=[gate], parameters=[0.5])  # one angle value per gate

mp = PauliPropagator.from_circuit(circuit, observable, cutoff=16)  # construct + evolve
print(mp.evolved_operator())  # the gate splits Z ⊗ Z into two terms

See the getting-started guide for fermionic operators and more.

Building from source

A from-source build gives you the editable Python bindings and the standalone C++ library and executables. MPI is off by default in every build path; enable it explicitly.

Python bindings (via uv):

uv sync --all-extras -v
# with MPI:
uv sync --all-extras -v --config-settings=cmake.define.monoprop_ENABLE_MPI=ON

C++ library and executables (via CMake presets — the same ones CI configures with):

cmake --preset release-gcc        # release-gcc-mpi to enable MPI
cmake --build --preset release-gcc

Full instructions — prerequisites, MPI options, and running the example executable — are in the building guide.

Running the tests

uv run python -m pytest -m "not mpi"   # Python tests (serial)
just test-py-mpi                       # Python tests under MPI
ctest --preset release-gcc             # C++ unit tests (release-gcc-mpi for MPI)
just test-cpp-wide                     # C++ unit tests with a 64-bit TermIndex

See the building guide for the with/without-MPI details and the rank matrix.

Development environment

The repository ships a DevContainer that installs every dependency (including the MPI toolchain and pre-commit hooks) and configures the editor. To use it you need:

  1. A working Docker installation (Docker Desktop on macOS/Windows, Docker Engine on Linux).
  2. Visual Studio Code with the Dev Containers extension.

Clone the repository and open the folder in VS Code; it will build the container and run the setup automatically (this takes a few minutes the first time):

git clone https://github.com/Algorithmiq/monoprop.git

Without a DevContainer, install the prerequisites from the building guide by hand.

Contributing

Please read CONTRIBUTING.md before opening a pull request. All contributions require accepting the Individual CLA through CLA Assistant. If you are contributing on behalf of your employer, contact cla@algorithmiq.fi to arrange a Corporate CLA.

Documentation

The documentation is built with Fumadocs and hosted at https://docs.algorithmiq.fi/monoprop. The Python API reference is generated from docstrings (griffe) and the tutorials are executed from the notebooks in docs/notebooks/. Building the documentation locally requires npm, the Node.js package manager. Once that is available, you can run:

just build-docs   # output: docs/out/
just serve-docs   # live-reloading dev server

Keeping documentation up to date

Any PR that changes behavior, public APIs, build/test commands, or repository paths must update the relevant docs in the same change:

  1. AGENTS.md for agent/developer workflow instructions.
  2. README.md for top-level usage and contributor guidance.
  3. docs/ pages for user-facing and in-depth technical documentation.

Citation

If you use monoprop in your research, please cite:

@ARTICLE{Miller2025-aj,
  title         = "{Simulation of Fermionic circuits using Majorana Propagation}",
  author        = "Miller, Aaron and Holmes, Zoë and Salehi, Özlem and
                   Chakraborty, Rahul and Nykänen, Anton and Zimborás, Zoltán
                   and Glos, Adam and García-Pérez, Guillermo",
  journal       = "arXiv [quant-ph]",
  year          =  2025,
  eprint        = "2503.18939",
  archivePrefix = "arXiv",
  primaryClass  = "quant-ph",
  url           = "https://arxiv.org/abs/2503.18939"
}

License

monoprop is released under the Apache License 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monoprop-0.8.0a0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

monoprop-0.8.0a0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

monoprop-0.8.0a0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

monoprop-0.8.0a0-cp312-abi3-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12+macOS 15.0+ ARM64

monoprop-0.8.0a0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

monoprop-0.8.0a0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

monoprop-0.8.0a0-cp311-cp311-macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file monoprop-0.8.0a0.tar.gz.

File metadata

  • Download URL: monoprop-0.8.0a0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for monoprop-0.8.0a0.tar.gz
Algorithm Hash digest
SHA256 30c8d1aa80ae6d86b4a4f0e681446764be21026d0e94c75afc35e57ba6007c1c
MD5 667f31c3ec9dea15916dc57753e8db0d
BLAKE2b-256 5333600b9d6bcb97266fc5c684af6edccb7cfa99d2cd9b8ac0f058e1a6edf593

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0.tar.gz:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9eb1d80b8a22c5f09be15962480b3b537aed3836954176c3f2d1b375d704c0e5
MD5 075ff31a54fdb91ca58b6574c35e0dfd
BLAKE2b-256 16452e713f699e795a04e25804a0284548bdf447b19bf5db1f8c5e782c2d1116

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 51959541e5d6651c7c7e6ed7f461a05e9e964030eb9885eefce0d7c1e139158c
MD5 3d4125c42135f5a7ca7479e10302b0d6
BLAKE2b-256 603327da05d48856ef6b94b5d84eb9c6bf2b9fdf09985f43c33c0b4bef993a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp312-abi3-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp312-abi3-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eeba3eeb6b66a23707b673bb75dee14a4b4d6834917bc1abff979aa8386a9adf
MD5 d3eca6984ba63cf28850839dc65c6545
BLAKE2b-256 f62d665e1fdb0d561041ddbe95a35b05bf14edb0f7f4fd0b93d2326da4186b74

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp312-abi3-macosx_15_0_arm64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6c7c845151bd8312c69190a7ef7adbfe3aa35c3ab84af7fc4291cac900a66c6f
MD5 464a38d472d28a51f2504d8d638bde7f
BLAKE2b-256 24f3a59d16b085be625cebcd47a81507769acfef80a4b0a6c2fce7ac35282dba

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a5e890abd4f03d01fe97026e9fbc3bafa08ab2407686561d3f846262ad4f1cd5
MD5 96965c7c71fa3378bf3db7f106bd1c00
BLAKE2b-256 e41c300a75166760a35d92e1bbc9eb7280dec03e32d6e7c56d36a02c4321b59b

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop-0.8.0a0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for monoprop-0.8.0a0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 89e08e9691bf2b3fe2f59364c00d0ba0cf52987f4514ad6d6d3817903e74a95e
MD5 f77e7abba7415b7076d8791c4f4063ca
BLAKE2b-256 2f7bf7c11750c48e8b52a82490e9fb0202995f9f309aeea881749144ec4496c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.8.0a0-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.0

7 files

This release

0.8.0a0 This release

7 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page