Skip to main content

A Python Interface to PentagonFunctions++

Requirements

The following Python packages are required (automatically installed by pip)

numpy, mpmath, lips, whichcraft

The following C++ library is required, pip will attempt to install it automatically if pentagon_functions_evaluator_python is not found. To attempt this automatic installation pass [with-cpp] to ensure ninja and meson are present

PentagonFunctions-cpp

How It Works

The interface communicates using string-based input/output via the terminal. The script pentagon_functions_evaluator_python is searched for in the system path. If it is not found, ~/local/bin/ is checked as an alternative location.

Installation

In this folder do

pip install -e .[with-cpp]

Quick Start

import numpy
from lips import Particles
from pentagon_functions import evaluate_pentagon_functions, fix_parity_odd

# Phase space point given in 2010.15834, pass it to lips.Particles
oPsBenchmark = Particles(5, real_momenta=True)
oPsBenchmark[1].four_mom = numpy.array([(-0.575 + 0j), (-0.575 + 0j), 0j, 0j])
oPsBenchmark[2].four_mom = numpy.array([(-0.575 + 0j), (0.575 + 0j), 0j, 0j])
oPsBenchmark[3].four_mom = numpy.array([(0.4588582395652173 + 0j), (0.405584802173913 + 0j), (0.20777834301052356 + 0j), (-0.05366574734632376 + 0j)])
oPsBenchmark[4].four_mom = numpy.array([(0.23112940869565216 + 0j), (-0.09707956260869566 + 0j), (0.009377939347234585 + 0j), (-0.20954335193774518 + 0j)])
oPsBenchmark[5].four_mom = numpy.array([(0.46001235173913047 + 0j), (-0.3085052395652174 + 0j), (-0.2171562823577582 + 0j), (0.263209099284069 + 0j)])

numerical_pentagon_dict = evaluate_pentagon_functions(
    ['F[3,25]', 'F[4,347]', 'F[3,22]', 'F[4,115]', 'F[3,1]', 'F[4,122]', 'F[4,365]'],
    oPsBenchmark, precision="d", verbose=False)

# if 'str5' is explicitly given in the basis of pentagon functions skip this step
numerical_pentagon_dict = fix_parity_odd(numerical_pentagon_dict, oPsBenchmark)

print(numerical_pentagon_dict)
>> {'F[3,25]': mpc(real='-1.690898346368268995', imag='2.52880034356816602'), 
    'F[4,347]': mpc(real='29.09482723195550014', imag='110.0170381265092008'), 
    'F[3,22]': mpc(real='-14.08863918406784999', imag='14.47902381510688996'), 
    'F[4,115]': mpc(real='-2.971610560487019992', imag='-15.43365955947793999'), 
    'F[3,1]': ... }

Metadata

Release files for pentagon-functions 0.0.6

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

Source distribution (sdist)

Source distribution for pentagon-functions 0.0.6
File Size Uploaded Provenance Actions
pentagon_functions-0.0.6.tar.gz 8.7 kB Without provenance Details for pentagon_functions-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pentagon-functions 0.0.6
File Interpreter ABI Platform Actions
pentagon_functions-0.0.6-py3-none-any.whl Python 3 none any Details for pentagon_functions-0.0.6-py3-none-any.whl

Total release size: 16.8 kB

Release files / pentagon_functions-0.0.6.tar.gz

Download URL pentagon_functions-0.0.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d95f49aa9ae2d0d2e55174d909758df422fc8d09b74ec8dd7a44a054fd4acce8
BLAKE2b-256 checksum
How to use checksums
5d392b6a7ff55b56407aa0d068094a22194934249c6169de0e061c6082f873da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / pentagon_functions-0.0.6-py3-none-any.whl

Download URL pentagon_functions-0.0.6-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3738b41fefc31d990d7bf377ed34a305292cd5ef28776a862afd998bf9b7f1da
BLAKE2b-256 checksum
How to use checksums
10624e41b2b33f60d37e85fbf1ef76677b283bd3137ea6566f1cd7f572603396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for pentagon-functions 0.0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

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