This release is a pre-release and may not be stable for production use.
monoprop
because your operators deserve to propagate at escape velocity
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.
Benchmarks
Check out the comparison of monoprop against other open-source Pauli propagation engines in [benches/third_party]!
📖 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:
- A working Docker installation (Docker Desktop on macOS/Windows, Docker Engine on Linux).
- 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/. To build it locally:
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:
AGENTS.mdfor agent/developer workflow instructions.README.mdfor top-level usage and contributor guidance.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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monoprop-0.7.0a2.tar.gz.
File metadata
- Download URL: monoprop-0.7.0a2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1445a9645175481890769ac2744e0ef0d109be48c4a5cd32ce5f96edb24b2e
|
|
| MD5 |
2affa3e2d644f42f2c1e6b892c11a988
|
|
| BLAKE2b-256 |
f2cac0d6a7a87b8941603819de9219c560d700b8fd9b5a4cb1b75b98b84b020e
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2.tar.gz:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2.tar.gz -
Subject digest:
cc1445a9645175481890769ac2744e0ef0d109be48c4a5cd32ce5f96edb24b2e - Sigstore transparency entry: 2268114086
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.12+, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a615424a95a324d41161ec90dd85c371ae86777a96a391db7e96aad691425f47
|
|
| MD5 |
3df787f3fdcdfe5ebbbd56cfe23301a5
|
|
| BLAKE2b-256 |
2754df358dc1ecd02f93fa623dd85b9639e47866f406bbcc690c65e0996dc7a4
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
a615424a95a324d41161ec90dd85c371ae86777a96a391db7e96aad691425f47 - Sigstore transparency entry: 2268114257
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12+, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ccd99989cccb5a3b6465f906f4a650c8cac5d35bd2da4272f0176b2d0cb484
|
|
| MD5 |
f712b202671d2a454807e7ccc49119a1
|
|
| BLAKE2b-256 |
f2c40b6008e3f0b8dfd60c8421bcc2321a6180b1ecf89a2fd1321b0baf992f5d
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
b8ccd99989cccb5a3b6465f906f4a650c8cac5d35bd2da4272f0176b2d0cb484 - Sigstore transparency entry: 2268114171
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp312-abi3-macosx_15_0_arm64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp312-abi3-macosx_15_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12+, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64b115f7c933f88e530fd188f7f4f924c8313e24c476e5921401ad2947331a92
|
|
| MD5 |
a9741314d8ab7ed76ad8c69c0ed586b3
|
|
| BLAKE2b-256 |
e0858528afcf4fbce6591be88debe8b4dff108d857134d26addb61f677f42fce
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp312-abi3-macosx_15_0_arm64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp312-abi3-macosx_15_0_arm64.whl -
Subject digest:
64b115f7c933f88e530fd188f7f4f924c8313e24c476e5921401ad2947331a92 - Sigstore transparency entry: 2268114630
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0323a53b0d97aa7d9b79abf9a2e3d697d466f10e9d3a32a67161f281d3852760
|
|
| MD5 |
2314782e55b7012a214ef3e37ae4adb8
|
|
| BLAKE2b-256 |
e07a3f4149fdcd899c4eee9e4605758556529c1c25871c2cc9b5654282f7a1fb
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
0323a53b0d97aa7d9b79abf9a2e3d697d466f10e9d3a32a67161f281d3852760 - Sigstore transparency entry: 2268114365
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b057591d79d7bf28852347dfa9d6c77818e77d80b230c610f8393606f2c714b0
|
|
| MD5 |
0546089565fe8a93ddaea08f2e5cfb42
|
|
| BLAKE2b-256 |
3213fce8083ced746d052c1b57a773a4ab8ac86dfcce7488b642d6e61555800f
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
b057591d79d7bf28852347dfa9d6c77818e77d80b230c610f8393606f2c714b0 - Sigstore transparency entry: 2268114492
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type:
File details
Details for the file monoprop-0.7.0a2-cp311-cp311-macosx_15_0_arm64.whl.
File metadata
- Download URL: monoprop-0.7.0a2-cp311-cp311-macosx_15_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa41b136f0dd8c7e8577baa3181a253f0b9261566ebf7f09237c8aa577d6eeaa
|
|
| MD5 |
89736ebaa89350bfb191736633a90993
|
|
| BLAKE2b-256 |
ce50d9900608ce1696104062d69e0f07ce7b9492f22f228c70e07fb98ea65537
|
Provenance
The following attestation bundles were made for monoprop-0.7.0a2-cp311-cp311-macosx_15_0_arm64.whl:
Publisher:
deploy.yml on Algorithmiq/monoprop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monoprop-0.7.0a2-cp311-cp311-macosx_15_0_arm64.whl -
Subject digest:
fa41b136f0dd8c7e8577baa3181a253f0b9261566ebf7f09237c8aa577d6eeaa - Sigstore transparency entry: 2268114769
- Sigstore integration time:
-
Permalink:
Algorithmiq/monoprop@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/Algorithmiq
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@6fba9a7bf55df827e0ffbc5ac7bdeeba24a55bab -
Trigger Event:
release
-
Statement type: