Skip to main content

Gammaloop computes differential cross-sections using Local Unitarity

Project description

gammaLoop

tests status

Computation of differential cross-sections using Local Unitarity.

See www.alphaloop.ch for details on the theoretical framework and related literature.

See the wiki for more information on the project.

TL;DR: I want to be running γLoop already!

We salute the eagerness of our users.

If you want to jump right in, run the following to immediately start integrating the scalar three-loop mercedes diagram,

git clone https://github.com/alphal00p/gammaloop.git && cd gammaloop
./bin/compile.sh
./bin/gammaloop example/cards/scalar_mercedes.gL

or a one-loop hexagon diagram from the scattering process $\gamma \gamma \rightarrow \gamma \gamma \gamma \gamma$ (through a top-quark loop) with:

./bin/gammaloop examples/cards/physical_1L_AA_AAAA.gL

Installation

> Requirements

  • Rust: v1.77+ You can easily install Rust with this one-liner

  • Python3: v3.11+ (equipped with pip, and the python-devel dependency)

  • GNU gcc: v10+ (not clang!)

  • git

Note: The project has been tested on Linux and MacOS. However, on MacOS, the default clang compiler is not supported due to lack of libquadmath support, and GNU gcc must be installed and setup as default compiler.

Windows users are encouraged to use WSL 2.

> Installation using pip

pip install gammaloop
gammaloop --build_dependencies

> Installation from sources

git clone https://github.com/alphal00p/gammaloop.git
cd gammaloop
./bin/compile.sh --release

The relevant binaries will then be in ./bin/ and the gammaloop python module is located at ./python/gammaloop.

Note: Alternatively, the dependencies can be built within a python virtual environment as follows:

./bin/build_dependencies.sh clean
./bin/build_dependencies.sh with_venv
# From within a `bash` shell, use the command below
source `./bin/gammaloop -venv`
# From within a `fish` shell, use the command below
. (./bin/gammaloop -venv).fish

Tests

> Testing an installation from pip

From within the installation directory of the gammaloop module, which you can cd into with e.g.:

bash -c 'cd `python -c "import os; import gammaloop; print(os.path.dirname(gammaloop.__file__))"`; pwd'

You can test your gammaLoop installation by running (incl. only tests with a maximum runtime of 15 seconds):

python -m pytest --max-runtime 15.0

> Testing an installation from sources

From within the installation directory, run:

/bin/run_tests.sh python
/bin/run_tests.sh rust

Usage

There are three entry points to the GammaLoop functionalities:

  1. Preferred method is through the Python command-line interface gammaloop.

  2. Alternatively, the same functionalities can be accessed programmatically, e.g. in a Jupyter notebook, through the Python API, by importing the gammaloop library.

  3. Finally, expert users may also find it useful to steer some of functionalities directly from the rust binary gammaloop_rust_cli.

Both executables gammaloop and gammaloop_rust_cli are made available as scripts in the bin directory. The gammaloop Python module is also exposed after installation and ready to be imported by custom Python scripts.

1. Usage from the Python command-line interface: ./gammaloop

GammaLoop is typically used through the python command-line interface gammaloop. Place your list of commands in a file named e.g. cmd.gL, for instance:

# Content of file 'cmd.gL'
import_model sm --format ufo
export_model ./sm.yaml --format yaml

and run it with:

./bin/gammaloop cmd.gL

You can find more information on the syntax of the available commands in the wiki and by running:

./bin/gammaloop --help

to get an overview of available commands and:

./bin/gammaloop -c "help import_model"

to get help on any specific command.

You can find example of command files in the <MODULE_PATH>/data/run_cards/ directory.

2. Usage from within a Jupyter notebook: the Python API

Follow the example jupyter notebook given in example to get started with the Python API.

cd <GAMMALOOP_INSTALLATION_DIRECTORY>/examples/jupyter
jupyter notebook steer_gammaloop.ipynb

3. Usage from the rust binary executable: ./gammaloop_rust_cli

All typical usecases of GammaLoop are available through the Python command-line interface mentioned earlier. However, expert users might want to steer the Monte-Carlo integration directly using the gammaloop_rust_cli binary. This is possible throught the gammaloop_rust_cli binary, which can be used as follows:

./bin/gammaloop_rust_cli --config <MODULE_PATH>/gammaloop/data/run_cards/rust_run_config.yaml

Note: You have to manually define your desired external momenta in this default rust_run_config.yaml file.

You will find more information on the content of the run configuration file and steering options in the wiki and by running:

./bin/gammaloop_rust_cli --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gammaloop-0.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

gammaloop-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

gammaloop-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (10.3 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

File details

Details for the file gammaloop-0.2.0.tar.gz.

File metadata

  • Download URL: gammaloop-0.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for gammaloop-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aaa17dfd443f13893f16c4b811a3c7fb0292e773960692170ec891eaabddb24f
MD5 b03f5415b76ea20b0a24ea9cce89ace2
BLAKE2b-256 d580445af1dc0d3c443b4b427fc8e1e83e19b6d4261f3f045f79f36fd27982fb

See more details on using hashes here.

File details

Details for the file gammaloop-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for gammaloop-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 537bb3c15497e5a86cd16535de7286ac3afcb0d3753e28b5b851248c117daff6
MD5 13661029b4154ec0dd6f5c76eccbffbe
BLAKE2b-256 ebe5414ccf6678ccb3ca10d2843f6c88bc28ee9673e164d51f75ba4ff44038e9

See more details on using hashes here.

File details

Details for the file gammaloop-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gammaloop-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00b1a92abbff8b8922e833b6c0f5a5bbfcf272b9728992d10b857c215d3bceba
MD5 d6bb1333228f95d2fae87a5303acfd01
BLAKE2b-256 c7cacbb935965d9a7ae8864d041caf69e61be4e070d595d727712fa6add71f8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page