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

Quality Gate Status Coverage

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 through shared-memory threading (oneTBB) and multi-node 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.

📖 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):

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)

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. Contribution workflow and standards are in the contributing guide.

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/. To build it locally:

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

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.7.0a1.tar.gz (1.3 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.7.0a1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.5 MB view details)

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

monoprop-0.7.0a1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.0 MB view details)

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

monoprop-0.7.0a1-cp312-abi3-macosx_15_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.12+macOS 15.0+ ARM64

monoprop-0.7.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.5 MB view details)

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

monoprop-0.7.0a1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (1.1 MB view details)

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

monoprop-0.7.0a1-cp311-cp311-macosx_15_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file monoprop-0.7.0a1.tar.gz.

File metadata

  • Download URL: monoprop-0.7.0a1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for monoprop-0.7.0a1.tar.gz
Algorithm Hash digest
SHA256 4af8d1866003b65337fffd569135216cfd083ef4c3d41aa33cadb91e5ab8d229
MD5 4f4d3f4fae91d38b23903c67f532ab4c
BLAKE2b-256 bce99bc8b05f3c291b1ef934cc8e9cd0e5a8661ad7bc80f4c1c74b673974b035

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1.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.7.0a1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b91130ec0ef4db2a83d467979085aa0102e3a3c5ae83eab822d4e88c8369e066
MD5 22326bba3191642d01b5535784491593
BLAKE2b-256 b2a59ff9827bc82e69d0d3aa19f2dfb5686cddf45807c0faaa70d645495cb1e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a04bb1fd5ac470f0a78d896a51283108768c876e770707a10f0ac389f965241b
MD5 2b112a169b99f5c3bb6aadd6e9f1c530
BLAKE2b-256 36999ba80d0432b7cdd323f8e636811c8db2bf16694b79a699b3dfb0c8d8b376

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1-cp312-abi3-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp312-abi3-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 66a85f0a690195eef61d2e6723a8dba86a6410334a016394c404bb1e2f1aa2bb
MD5 afc134e9a9c61e97b0f30fa857d20745
BLAKE2b-256 9f8265abbb1a14d9bc1cc4cef706f635e457c452d15c0ca407842685e71325f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2cd4cd20f528c39712821e8530ba155bedef345bfdaf8208f598121917a22ce
MD5 bf79bad42bb68e8ed7c85ca8270ba84d
BLAKE2b-256 71f01e8dc608596dc413be14f3a8f271bfd312e20651399c4a154a0a060250e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93b0ed2cda7eb445d43098233abf61f7d64cd2b1edbcab96ce9ef08520777773
MD5 e8eeae0680c2bc00409722c238f91d74
BLAKE2b-256 0079a47ab5b8094b4bb0825e038438f707a03a07949e8ee2978d5d18492a951d

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for monoprop-0.7.0a1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 312cf32b6ed920c8a881f2324dad43d9b843d2eb7f12e827b5dc51c3c2548e2d
MD5 1c3cc4d93105c57a916866ed2e5b0851
BLAKE2b-256 7411975b3f8c8ac3cc7b6e88231d7025f9d5f60f331b296b14879e253efd0a59

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop-0.7.0a1-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.7.0a1 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