Modular and GPU-ready phase-space library
Installation
From PyPI
Pre-compiled packages are available for Linux (x86_64) and MacOS X (Apple silicon), for Python 3.11 to 3.14. The Linux wheels are built with the CUDA and HIP backends included.
pip install madspace
Building from source
MadSpace is developed as part of MadGraph7
and is built with the install.py script in its madspace directory. The script
installs the build dependencies, locates a suitable cmake (3.15 or newer) and runs the
build:
git clone git@github.com:MadGraphTeam/MadGraph7.git
cd MadGraph7
python madspace/install.py --source --system
With --system, MadSpace is installed into the active Python environment and can be
imported like any other package. Without arguments the script is interactive and asks
which backends to enable. The same choices are available as command line flags for
non-interactive use, for example
python madspace/install.py --source --system --cuda --cuda-arch "75;80;86"
python madspace/install.py --source --system --hip --simd --debug
Run python madspace/install.py --help for the full list of options. The options of the
last build are remembered, so --source --system -y rebuilds with the same settings.
The build directory madspace/build is kept between builds, so you can run make there
directly for faster incremental builds during development. Note that this does not update
the Python module itself, for which the install command has to be run again.
Installation for MadGraph7
Without --system, the script installs MadSpace into madspace/install, where MadGraph7
picks it up without touching your Python environment:
python madspace/install.py
This is also what the install madspace command at the MadGraph7 prompt runs, and what
happens automatically the first time you launch a run.
Tests
To run the tests, you need to have the pytest, numpy and torch packages installed.
One test optionally requires the lhapdf package (can be installed via conda or built from
source) and the NNPDF40_nlo_as_01180 PDF set.
To run the tests, go to the root directory of the repository and run
pytest madspace/tests
Citation
If you use this MadSpace or parts of it, please cite:
@article{Heimel:2026hgp,
author = "Heimel, Theo and Mattelaer, Olivier and Winterhalder, Ramon",
title = "{MadSpace -- Event Generation for the Era of GPUs and ML}",
eprint = "2602.06895",
archivePrefix = "arXiv",
primaryClass = "hep-ph",
reportNumber = "MCNET-26-01, IRMP-CP3-26-04, TIF-UNIMI-2026-1",
month = "2",
year = "2026"}
Metadata
Release files for madspace 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| madspace-0.2.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 free-threading | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| madspace-0.2.1-cp314-cp314t-macosx_14_0_arm64.whl | CPython 3.14 | CPython 3.14 free-threading | macOS 14.0+ ARM64 | Details |
| madspace-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| madspace-0.2.1-cp314-cp314-macosx_14_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 14.0+ ARM64 | Details |
| madspace-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| madspace-0.2.1-cp313-cp313-macosx_14_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 14.0+ ARM64 | Details |
| madspace-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| madspace-0.2.1-cp312-cp312-macosx_14_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 14.0+ ARM64 | Details |
| madspace-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| madspace-0.2.1-cp311-cp311-macosx_14_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 14.0+ ARM64 | Details |
Total release size: 214.1 MB
Release files / madspace-0.2.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.2.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 40.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c9837dd10cd30deab58211a94ec5dc9d7617b75f3dfe43573b12b99ba223000
|
|
BLAKE2b-256 checksum How to use checksums |
ef13535effae273d2a9bbc768d68a5e14a19a5d76ceba636346c2115915cf966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp314-cp314t-macosx_14_0_arm64.whl
| Download URL | madspace-0.2.1-cp314-cp314t-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dc5d0669f2c23bb77913ce3fddaa2e67d518efcc0c779f8293b2b144e4d006f0
|
|
BLAKE2b-256 checksum How to use checksums |
ab1ea85298bad07be3577ba40040714a0f36d425d9c785f2cebcc9247dcc8b9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 40.0 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ec1a7e7720ca10d717e4b003902dc4f4642045d31b832a8a35c36bec8512569
|
|
BLAKE2b-256 checksum How to use checksums |
b52a39ef8c69c4f0fb800261012556042123bc4883328e8855e2dafb6de6c71d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | madspace-0.2.1-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9b09517d721135f51c0a6c9e30947616aac638f6f2fb9f44fcf32295467f91f7
|
|
BLAKE2b-256 checksum How to use checksums |
e5d8973a430c00d2ad075753b06b7aa3d89792b478402ee9e980f0f39f1e6966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 40.0 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7a2aebc7e32657b4f746fda7b36c803a93ece0470fec7057e854d3a529c4b322
|
|
BLAKE2b-256 checksum How to use checksums |
e3909f7f3b11a042ad7eee2d2a5958f08b334eaaceb6dcee7fb56ca11ed59f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | madspace-0.2.1-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a8a4064d5e28f91463833ed77a4cb053f5bc99a8c5a21f41489812df1bd282b3
|
|
BLAKE2b-256 checksum How to use checksums |
5e9e0963cdfb8a606a767aac8a504641124a99448302e2d7abdb4d294f2a0683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 40.0 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5047c6c6a3708e7ee75b3c6d8aad9a275adb28f6622bcc2ac3e9bbbc3eff2252
|
|
BLAKE2b-256 checksum How to use checksums |
44c497c79371f09008f9886c7c2d09f341e1ab5e9bf50bf992f2830d92a11007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | madspace-0.2.1-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3b47d5c19cf53c88906405486cb5bad53538dbb211db07d8e47fa51d7fd27a46
|
|
BLAKE2b-256 checksum How to use checksums |
39351f394c9aaea0317991e63a456f42fd23d6a31301a73a82c5a018367d7d90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 40.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7ab8d361468c49da1e841424d80b0e51478d34bc849826b945260167abd914e4
|
|
BLAKE2b-256 checksum How to use checksums |
fb377c7016bc3191e79bffbee6fd3d1275d52b4d63c99dd0f3cfe529ebd329cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / madspace-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | madspace-0.2.1-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
27b9df13e0d9190349fe793588904047fad45e9e57e84fcbf724352a0e7ce129
|
|
BLAKE2b-256 checksum How to use checksums |
647cfbe5a552fb5d25cf9aa91f39ebfac99f33203e7f351efc2d0e20203af6d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency log