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.
If nvCOMP 5 is found, the CUDA backend also
gzip-compresses LHE output on the GPU (output.lhe_compression = "auto" in MadGraph7). Point
CMake at an nvCOMP install with nvcomp_ROOT:
nvcomp_ROOT=/path/to/nvcomp python madspace/install.py --source --system --cuda
output.lhe_gzip_algorithm picks the nvCOMP algorithm, from 0 (fastest) to 5 (smallest
output, the default).
Without nvCOMP (logged as info), and on HIP (a warning: hipCOMP has no gzip compressor), MadGraph7 gzips the LHE output on the CPU.
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.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 299.1 MB
Release files / madspace-0.4.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.4.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 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 |
67c0269b6605f062582236975b7135f96a38c7d12e8c89ff77b784060597496c
|
|
BLAKE2b-256 checksum How to use checksums |
12b5cfa63c1a7a45cb13c3484c759e147ba04580c3c2228487b87579eaf5ae3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp314-cp314t-macosx_14_0_arm64.whl
| Download URL | madspace-0.4.0-cp314-cp314t-macosx_14_0_arm64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8d97375b3abdb77e9b161a88f966826ad0795e88b5a685b3e71f66d274a97658
|
|
BLAKE2b-256 checksum How to use checksums |
86c5ef97663cb83ea4877a99dcd037e5367c1c24102e74be6d820a5fcbb1c933
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3b4a479426e901fd5a080a9e390be588187f8796754591c7167494ff815073ed
|
|
BLAKE2b-256 checksum How to use checksums |
350c571595d990d6e0de1c1ca98abb1fc3a6adf9a9b4e909dedd6f19f443b3d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | madspace-0.4.0-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
28c01c2a7c830eee2f8c34fc1172671c43d5067681e4b28cee2c7b1fe7ec1902
|
|
BLAKE2b-256 checksum How to use checksums |
6d4b4171e6030f14a2dbe6bfffbc70f8f4780cafdca18776d920e465b3c35c71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7326cee4d7fea083565b5ae8a71a8a6748c1c335aa855841546461703ec1e5e
|
|
BLAKE2b-256 checksum How to use checksums |
e9f2a6850bc14db2694883923c154fa2a9560e6dbce29d6cfd3bde3a72994a8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | madspace-0.4.0-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e86165f791c95c1216da78842595f30e4f1f2e8fd9afede793a4997e4447e702
|
|
BLAKE2b-256 checksum How to use checksums |
3007db12f0530e271d72f6e265f9ab32b52da64a1b60dbb7ce86b03e81946758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
767a9076570c9a4a95acf04bf3776a00e89242bbb53c37b5429aca725299b8cf
|
|
BLAKE2b-256 checksum How to use checksums |
40a3893ebc295eec2dc15ee27a5e7d84157e80b001d8a8c85d0258943eb19e86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | madspace-0.4.0-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cc978a579f0c99ac14ecf8f2b364335b60c97e03b87401be907a905aeee02d43
|
|
BLAKE2b-256 checksum How to use checksums |
07a02447abca023be137578733a256e2748da24011b2d4c1062f6e323ec7b38f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | madspace-0.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bcb9e1463e8a14f57eda4a93bf8dfccf82c901e279d70c597517a6daed6e3418
|
|
BLAKE2b-256 checksum How to use checksums |
dcf15f2d5fa5dac2a9f2093addc917e3a576253b3f17e06ab0975545f47553c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / madspace-0.4.0-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | madspace-0.4.0-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
baae4b13576d4d01253e69847187f77f8dc14e37ef1f6cbf439cb63264f0350c
|
|
BLAKE2b-256 checksum How to use checksums |
9dd1f3a56b0cf799390902cc9698b20f4e1d607a3b8aa426a674152d23ad074c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logSecurity for madspace 0.4.0
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.
Full provenance
All 10 files in this release have been uploaded with provenance metadata.
Attestation for madspace-0.4.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
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 Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.