PVpy-hep 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pvpy_hep-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ChristianVerollet
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: PVpy-hep
3
+ Version: 0.1.0
4
+ Summary: Symbolic and numeric 1-loop Passarino-Veltman reduction in Python
5
+ Author-email: Christian Verollet <c.verollet@ip2i.in2p3.fr>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/ChristianVerollet/PVpy
8
+ Keywords: particle physics,loop integrals,Passarino-Veltman,Feynman diagrams,sympy
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Physics
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: sympy>=1.12
18
+ Requires-Dist: numpy>=1.24
19
+ Requires-Dist: scipy>=1.10
20
+ Requires-Dist: ipython
21
+ Dynamic: license-file
22
+
23
+ # PVpy-hep — Passarino-Veltman Python for HEP
24
+
25
+ A Python package for symbolic and numeric 1-loop computations in quantum field theory.
26
+
27
+ `PVpy-hep` provides two layers:
28
+
29
+ - **Symbolic layer** — write loop integrals, perform tensorial Passarino-Veltman (PV) reduction, simplify and set kinematics, then expand to closed-form analytic expressions via `sympy`.
30
+ - **Numeric layer** — turn any PV expression into a vectorised `numpy` callable with correct handling of all kinematic limits (equal masses, massless propagators, above-threshold imaginary parts).
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install PVpy-hep
36
+ ```
37
+
38
+ ## Quick start
39
+
40
+ ```python
41
+ from pvpy import Propagator, LoopIntegral, ReduceGeneralNumerator
42
+ from pvpy import Gamma, slash, DiracTrace, Project
43
+ from pvpy import PV_simplify, set_kinematics, PV_reduce
44
+ from pvpy.symbols import k, p, m_0, m_1, mu, nu
45
+ import sympy as sp
46
+
47
+ # QED vacuum polarisation
48
+ prop = [Propagator(0, m_0), Propagator(-p, m_1)]
49
+ loop = LoopIntegral(k, prop)
50
+ numerator = DiracTrace(Gamma(mu) * (slash(k) + m_0) * Gamma(nu) * (slash(k - p) + m_1))
51
+ result = ReduceGeneralNumerator(loop, numerator)
52
+
53
+ Pi_T = Project(result, mu, nu, p, 'T') # transverse scalar
54
+
55
+ m_Z = sp.Symbol('m_Z', positive=True)
56
+ Pi_T_kin = set_kinematics(PV_simplify(Pi_T), {p**2: m_Z**2, m_0: m_0, m_1: m_1})
57
+
58
+ # Symbolic: closed form
59
+ Pi_T_red = PV_reduce(Pi_T_kin)
60
+ print(Pi_T_red.doit(part='full'))
61
+
62
+ # Numeric: numpy callable
63
+ from pvpy.numeric import compile
64
+ f = compile(Pi_T_kin)
65
+ print(f(0.511e-3, 91.2)) # m_electron, m_Z in GeV
66
+ ```
67
+
68
+ ## Requirements
69
+
70
+ - Python ≥ 3.9
71
+ - sympy ≥ 1.12
72
+ - numpy ≥ 1.24
73
+ - scipy ≥ 1.10
74
+
75
+ ## Status
76
+
77
+ Version 0.1.0 — alpha release. A, B functions (scalar and tensor) and their $p^2$ derivatives are fully implemented and validated. C functions (3-point) are in progress.
78
+
79
+ ## Reference
80
+
81
+ C. Verollet, *PVpy-hep: a Python package for symbolic and numeric 1-loop computations* (in preparation).
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: PVpy-hep
3
+ Version: 0.1.0
4
+ Summary: Symbolic and numeric 1-loop Passarino-Veltman reduction in Python
5
+ Author-email: Christian Verollet <c.verollet@ip2i.in2p3.fr>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/ChristianVerollet/PVpy
8
+ Keywords: particle physics,loop integrals,Passarino-Veltman,Feynman diagrams,sympy
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Physics
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: sympy>=1.12
18
+ Requires-Dist: numpy>=1.24
19
+ Requires-Dist: scipy>=1.10
20
+ Requires-Dist: ipython
21
+ Dynamic: license-file
22
+
23
+ # PVpy-hep — Passarino-Veltman Python for HEP
24
+
25
+ A Python package for symbolic and numeric 1-loop computations in quantum field theory.
26
+
27
+ `PVpy-hep` provides two layers:
28
+
29
+ - **Symbolic layer** — write loop integrals, perform tensorial Passarino-Veltman (PV) reduction, simplify and set kinematics, then expand to closed-form analytic expressions via `sympy`.
30
+ - **Numeric layer** — turn any PV expression into a vectorised `numpy` callable with correct handling of all kinematic limits (equal masses, massless propagators, above-threshold imaginary parts).
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install PVpy-hep
36
+ ```
37
+
38
+ ## Quick start
39
+
40
+ ```python
41
+ from pvpy import Propagator, LoopIntegral, ReduceGeneralNumerator
42
+ from pvpy import Gamma, slash, DiracTrace, Project
43
+ from pvpy import PV_simplify, set_kinematics, PV_reduce
44
+ from pvpy.symbols import k, p, m_0, m_1, mu, nu
45
+ import sympy as sp
46
+
47
+ # QED vacuum polarisation
48
+ prop = [Propagator(0, m_0), Propagator(-p, m_1)]
49
+ loop = LoopIntegral(k, prop)
50
+ numerator = DiracTrace(Gamma(mu) * (slash(k) + m_0) * Gamma(nu) * (slash(k - p) + m_1))
51
+ result = ReduceGeneralNumerator(loop, numerator)
52
+
53
+ Pi_T = Project(result, mu, nu, p, 'T') # transverse scalar
54
+
55
+ m_Z = sp.Symbol('m_Z', positive=True)
56
+ Pi_T_kin = set_kinematics(PV_simplify(Pi_T), {p**2: m_Z**2, m_0: m_0, m_1: m_1})
57
+
58
+ # Symbolic: closed form
59
+ Pi_T_red = PV_reduce(Pi_T_kin)
60
+ print(Pi_T_red.doit(part='full'))
61
+
62
+ # Numeric: numpy callable
63
+ from pvpy.numeric import compile
64
+ f = compile(Pi_T_kin)
65
+ print(f(0.511e-3, 91.2)) # m_electron, m_Z in GeV
66
+ ```
67
+
68
+ ## Requirements
69
+
70
+ - Python ≥ 3.9
71
+ - sympy ≥ 1.12
72
+ - numpy ≥ 1.24
73
+ - scipy ≥ 1.10
74
+
75
+ ## Status
76
+
77
+ Version 0.1.0 — alpha release. A, B functions (scalar and tensor) and their $p^2$ derivatives are fully implemented and validated. C functions (3-point) are in progress.
78
+
79
+ ## Reference
80
+
81
+ C. Verollet, *PVpy-hep: a Python package for symbolic and numeric 1-loop computations* (in preparation).
@@ -0,0 +1,8 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ PVpy_hep.egg-info/PKG-INFO
5
+ PVpy_hep.egg-info/SOURCES.txt
6
+ PVpy_hep.egg-info/dependency_links.txt
7
+ PVpy_hep.egg-info/requires.txt
8
+ PVpy_hep.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ sympy>=1.12
2
+ numpy>=1.24
3
+ scipy>=1.10
4
+ ipython
@@ -0,0 +1,59 @@
1
+ # PVpy-hep — Passarino-Veltman Python for HEP
2
+
3
+ A Python package for symbolic and numeric 1-loop computations in quantum field theory.
4
+
5
+ `PVpy-hep` provides two layers:
6
+
7
+ - **Symbolic layer** — write loop integrals, perform tensorial Passarino-Veltman (PV) reduction, simplify and set kinematics, then expand to closed-form analytic expressions via `sympy`.
8
+ - **Numeric layer** — turn any PV expression into a vectorised `numpy` callable with correct handling of all kinematic limits (equal masses, massless propagators, above-threshold imaginary parts).
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install PVpy-hep
14
+ ```
15
+
16
+ ## Quick start
17
+
18
+ ```python
19
+ from pvpy import Propagator, LoopIntegral, ReduceGeneralNumerator
20
+ from pvpy import Gamma, slash, DiracTrace, Project
21
+ from pvpy import PV_simplify, set_kinematics, PV_reduce
22
+ from pvpy.symbols import k, p, m_0, m_1, mu, nu
23
+ import sympy as sp
24
+
25
+ # QED vacuum polarisation
26
+ prop = [Propagator(0, m_0), Propagator(-p, m_1)]
27
+ loop = LoopIntegral(k, prop)
28
+ numerator = DiracTrace(Gamma(mu) * (slash(k) + m_0) * Gamma(nu) * (slash(k - p) + m_1))
29
+ result = ReduceGeneralNumerator(loop, numerator)
30
+
31
+ Pi_T = Project(result, mu, nu, p, 'T') # transverse scalar
32
+
33
+ m_Z = sp.Symbol('m_Z', positive=True)
34
+ Pi_T_kin = set_kinematics(PV_simplify(Pi_T), {p**2: m_Z**2, m_0: m_0, m_1: m_1})
35
+
36
+ # Symbolic: closed form
37
+ Pi_T_red = PV_reduce(Pi_T_kin)
38
+ print(Pi_T_red.doit(part='full'))
39
+
40
+ # Numeric: numpy callable
41
+ from pvpy.numeric import compile
42
+ f = compile(Pi_T_kin)
43
+ print(f(0.511e-3, 91.2)) # m_electron, m_Z in GeV
44
+ ```
45
+
46
+ ## Requirements
47
+
48
+ - Python ≥ 3.9
49
+ - sympy ≥ 1.12
50
+ - numpy ≥ 1.24
51
+ - scipy ≥ 1.10
52
+
53
+ ## Status
54
+
55
+ Version 0.1.0 — alpha release. A, B functions (scalar and tensor) and their $p^2$ derivatives are fully implemented and validated. C functions (3-point) are in progress.
56
+
57
+ ## Reference
58
+
59
+ C. Verollet, *PVpy-hep: a Python package for symbolic and numeric 1-loop computations* (in preparation).
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "PVpy-hep"
7
+ version = "0.1.0"
8
+ description = "Symbolic and numeric 1-loop Passarino-Veltman reduction in Python"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Christian Verollet", email = "c.verollet@ip2i.in2p3.fr" }
14
+ ]
15
+ keywords = ["particle physics", "loop integrals", "Passarino-Veltman", "Feynman diagrams", "sympy"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Science/Research",
19
+ "Topic :: Scientific/Engineering :: Physics",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ ]
23
+ dependencies = [
24
+ "sympy>=1.12",
25
+ "numpy>=1.24",
26
+ "scipy>=1.10",
27
+ "ipython",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/ChristianVerollet/PVpy"
32
+
33
+ [tool.setuptools.packages.find]
34
+ where = ["."]
35
+ include = ["pvpy*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+