Real-Time GPU Particle Physics Simulation with PDG-accurate particle catalog
Project description
Real-Time GPU Particle Physics Simulation with PDG-accurate particle catalog. 40 observable particles, real masses, lifetimes, decay channels, and proper relativistic kinematics.
Documentation: https://ml3m.github.io/quantum-collider-sandbox/
Quick Start
Clone and run in four steps:
git clone https://github.com/ml3m/quantum-collider-sandbox.git
cd quantum-collider-sandbox
python -m venv .venv && source .venv/bin/activate # Linux/macOS
make install && make run
On Windows, activate with .venv\Scripts\activate instead.
Requirements
System
Python 3.10 to 3.12 (3.12.2 recommended)
GPU with Vulkan support (NVIDIA, AMD, Intel)
Vulkan drivers installed and working
Python dependencies (installed via make install):
numpy ≥ 1.24
scipy ≥ 1.10
taichi ≥ 1.7.0
h5py ≥ 3.8
Installation
Clone the repository
git clone https://github.com/ml3m/quantum-collider-sandbox.git cd quantum-collider-sandboxCreate and activate a virtual environment (recommended)
python -m venv .venv source .venv/bin/activate # Linux / macOS # .venv\Scripts\activate # WindowsInstall the package in editable mode with dev tools
make installOr manually:
pip install -e ".[dev]"Run the simulation
make run
Makefile Targets
Target |
Description |
|---|---|
run |
Start the particle physics simulation |
install |
Install package in editable mode with dev dependencies |
lint |
Run pylint on the source code |
test |
Run pytest test suite |
test-cov |
Run pytest with coverage report |
format-check |
Check code formatting (ruff + black) |
format |
Auto-fix formatting (ruff + black) |
docs |
Build Sphinx documentation (output in docs/build/) |
Command-Line Usage
make run # Default demo
python -m quantum_collider_sandbox --particles 100 # Start with N random particles
python -m quantum_collider_sandbox --data event.h5 # Load from HDF5 file
python -m quantum_collider_sandbox --log-physics # Log physics to data/logs/
Keyboard Controls
Key |
Action |
|---|---|
SPACE |
Pause / Resume |
R |
Reset to selected preset (or default if none selected) |
C |
Spawn proton–antiproton collision |
T |
Toggle trails |
F |
Toggle collision flashes |
Y |
Toggle photon visibility |
E |
Export state and time series to HDF5 |
B |
Toggle black hole |
G |
Toggle particle gun |
TAB |
Cycle inspector to next particle |
P |
Pin / freeze selected particle |
1–9, 0 |
Presets (1=Default, 2=Rutherford, 3=Cyclotron, …, 0=N-body) |
RMB |
Orbit camera (drag) |
Scroll |
Zoom |
ESC |
Quit |
Vulkan / GPU Troubleshooting
The simulation uses Taichi with the Vulkan backend. If you see Vulkan-related errors:
NVIDIA: Install the latest proprietary drivers; Vulkan is usually included.
AMD: Use Mesa (Linux) or AMD Adrenalin (Windows) with Vulkan support.
Intel: Ensure Mesa or Intel drivers with Vulkan are installed.
Verify Vulkan with:
vulkaninfo
If Vulkan is unavailable, use the QUANTUM_COLLIDER_ARCH environment variable:
QUANTUM_COLLIDER_ARCH=cpu python -m quantum_collider_sandbox # CPU fallback QUANTUM_COLLIDER_ARCH=gpu python -m quantum_collider_sandbox # Auto-detect GPU
Supported values: vulkan (default), cuda, cpu, gpu.
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 quantum_collider_sandbox-1.1.0.tar.gz.
File metadata
- Download URL: quantum_collider_sandbox-1.1.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e9e7940fbe5a63a7aca957c53373a55302e81f515ba2bf86b055d47e7c06f43
|
|
| MD5 |
6c522bc9f2cf82f0139fbbfe0581ec54
|
|
| BLAKE2b-256 |
683208625303a6c54a952fddbf185ac17c21969390793556ef6b0d8ab8ead7b4
|
Provenance
The following attestation bundles were made for quantum_collider_sandbox-1.1.0.tar.gz:
Publisher:
python-publish.yml on ml3m/quantum-collider-sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantum_collider_sandbox-1.1.0.tar.gz -
Subject digest:
3e9e7940fbe5a63a7aca957c53373a55302e81f515ba2bf86b055d47e7c06f43 - Sigstore transparency entry: 1151325744
- Sigstore integration time:
-
Permalink:
ml3m/quantum-collider-sandbox@38bfa7209c10995f03cc31dee56b0614ac01e5da -
Branch / Tag:
refs/tags/1.1.0b1 - Owner: https://github.com/ml3m
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@38bfa7209c10995f03cc31dee56b0614ac01e5da -
Trigger Event:
release
-
Statement type:
File details
Details for the file quantum_collider_sandbox-1.1.0-py3-none-any.whl.
File metadata
- Download URL: quantum_collider_sandbox-1.1.0-py3-none-any.whl
- Upload date:
- Size: 38.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75ba07f3036f7cd9f7b8397e00e3ad3dc2b8a41a2e18fced0a7d090fb94ccc4b
|
|
| MD5 |
abac988e405117c007a900235cf8d94b
|
|
| BLAKE2b-256 |
ee86b7711919a6a676a598456ffb9552138986f9424cee89e1dfc7a4a7c8e8bc
|
Provenance
The following attestation bundles were made for quantum_collider_sandbox-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ml3m/quantum-collider-sandbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantum_collider_sandbox-1.1.0-py3-none-any.whl -
Subject digest:
75ba07f3036f7cd9f7b8397e00e3ad3dc2b8a41a2e18fced0a7d090fb94ccc4b - Sigstore transparency entry: 1151325975
- Sigstore integration time:
-
Permalink:
ml3m/quantum-collider-sandbox@38bfa7209c10995f03cc31dee56b0614ac01e5da -
Branch / Tag:
refs/tags/1.1.0b1 - Owner: https://github.com/ml3m
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@38bfa7209c10995f03cc31dee56b0614ac01e5da -
Trigger Event:
release
-
Statement type: