Skip to main content

MadSpace

Modular and GPU-ready phase-space library

Arxiv Code style: black

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for madspace 0.2.0
File
madspace-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
madspace-0.2.0-cp314-cp314t-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 14.0+ ARM64 Details
madspace-0.2.0-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.0-cp314-cp314-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 macOS 14.0+ ARM64 Details
madspace-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
madspace-0.2.0-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
madspace-0.2.0-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.0-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
madspace-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
madspace-0.2.0-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details

Total release size: 209.1 MB

Release files / madspace-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL madspace-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 39.2 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
7e02cf96a2580f2d9b982ecf074616c5f695159615f772b589a5b28b36062d77
BLAKE2b-256 checksum
How to use checksums
26cc3042cff3b632eccbea2aab019d05b91c10a4563d3b09804750dc0f5d1fd0
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp314-cp314t-macosx_14_0_arm64.whl

Download URL madspace-0.2.0-cp314-cp314t-macosx_14_0_arm64.whl
Size 2.7 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
1f0a76fee82ecf131a7b3e3cb945bd1b7ca7aab5458fe1f3c35317c756eeb202
BLAKE2b-256 checksum
How to use checksums
223521c2f64b7ead84638da6d6fb8a0aae53bd8c05908a1eb411dc1db0bb249a
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL madspace-0.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 39.2 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
649d61fa6206de895c0e9c3049a11d1e432b80994143cfee8af7ae099b532a2d
BLAKE2b-256 checksum
How to use checksums
4abdb046c79d67edab6fa748d4e503ac264fab6f48d67ceb5f3fa3974778e763
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp314-cp314-macosx_14_0_arm64.whl

Download URL madspace-0.2.0-cp314-cp314-macosx_14_0_arm64.whl
Size 2.6 MB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
28a6fcbe79292912122771d37c9ebbacd76c599f2074eaf0d4212ecf79992afb
BLAKE2b-256 checksum
How to use checksums
6e614f369be502dea58b9b3ccd8c044d7e1ae0fa39b0c9eb5fb55fd035487757
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL madspace-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 39.2 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c3efbc9e937bbfddbf4d16e82bbda31e8a4cfcf09f8a710bd5055538c3dca834
BLAKE2b-256 checksum
How to use checksums
65f2a79caeb1d0579dbdf9b135ea611b0796a462811592813aa761441c0b41c8
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp313-cp313-macosx_14_0_arm64.whl

Download URL madspace-0.2.0-cp313-cp313-macosx_14_0_arm64.whl
Size 2.6 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
34fe8e991e0eb08d04e9b1481e077fb0c85e377cec4fbba73f2f587f53d8f15a
BLAKE2b-256 checksum
How to use checksums
2fc9a6fc1b8f135327484192a144e08843141018cef7cd411e0eba69f12a0c2f
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL madspace-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 39.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c2f802bc824bbd225aa68b4bcb924e8b9ef3102ce6e28af1697090675ae28e86
BLAKE2b-256 checksum
How to use checksums
c33bd2babaf4b02d3920aa0c782ec46ee78ca377e99a4936db3530c2460cbe82
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp312-cp312-macosx_14_0_arm64.whl

Download URL madspace-0.2.0-cp312-cp312-macosx_14_0_arm64.whl
Size 2.6 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c756345a6d683ef510e778e59c326e4c9e16f3dad9d6ef33da407109376c3e18
BLAKE2b-256 checksum
How to use checksums
cbfc80a3debe3c804505a6d2a5e2c2dd93b3e46f35cc8a599d9f3a2d1211c7d9
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL madspace-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 39.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a2ef866c5758131749ceb587e0c18651a0ce11f8ceb1d7f7d148fdc980a19c74
BLAKE2b-256 checksum
How to use checksums
ec02afd16225cbdee40c6e61f17454460ea35383da691f9ed4f45884a9fae50e
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 14, 2026.

Transparency log

Release files / madspace-0.2.0-cp311-cp311-macosx_14_0_arm64.whl

Download URL madspace-0.2.0-cp311-cp311-macosx_14_0_arm64.whl
Size 2.6 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
9b70030a624d698c0b7086b54292b8379c4127a62a7e5178f3f67289e421b97a
BLAKE2b-256 checksum
How to use checksums
4f48e45d2ca9da5b770feb4d6834df9e4149af4d221b5044ad8c0f5ad452aac9
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

10 release files

This release

0.2.0 This release

10 release files

0.1.3

10 release files

0.1.2

10 release files

0.1.1

10 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page