Ampform

Latest version: v0.15.8

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 10

3.14

Note that, as opposed to the previously used `OrderedDict`, this class prevents users from adding more parameters to the `parameter_defaults`.

</details>

<details>
<summary>Added switch for energy-dependent width (236)</summary>

It's now possible to independently activate energy-dependent width and a form factor in the [`RelativisticBreitWignerBuilder`](https://ampform--236.org.readthedocs.build/en/236/api/ampform.dynamics.builder.html#ampform.dynamics.builder.RelativisticBreitWignerBuilder). Usage example [here](https://ampform--236.org.readthedocs.build/en/236/usage/amplitude.html#set-dynamics). See also 235.

</details>

<details>
<summary>Extracted DynamicsSelector class (240)</summary>

`HelicityAmplitudeBuilder.__dynamics_choices` has been extracted to a new `DynamicsSelector` class. This reduces the responsibilities of the `HelicityAmplitudeBuilder` and makes it easier to implement new implementations for selection of dynamics.

Something similar has been done for 'collector' attributes like `HelicityAmplitudeBuilder.__parameter_defaults` and `__components`. This will be useful when implementing [TR-014](https://compwa-org.readthedocs.io/report/014.html), which will require keeping track of amplitude definitions.

Note: once QRules v0.10 is out, https://github.com/ComPWA/qrules/pull/156 and https://github.com/ComPWA/qrules/pull/157 make it possible to define the dynamics choices as a mapping over topologies and visualize them as graphviz.

</details>

<details>
<summary>Implemented HelicityModel.rename_symbols() (244)</summary>

See use case example [here]() (couple parameters). The method is makes it easier to address [this error](https://github.com/ComPWA/ampform/runs/5320069236?check_suite_focus=true) in #243.

</details>

🐛 Bug fixes

<details>
<summary>Moved angular momentum check to form factor (230)</summary>

Removed the check for integral angular momentum. Instead, AmpForm now checks for angular momentum when formulating a form factor. This allows formulating Breit-Wigner dynamics _without_ form factor on an amplitude model formulated with `formalism="helicity"` if it has with half-spin resonances.

</details>

🔨 Internal maintenance

<details>
<summary>Simplified numpy code of matrix expressions (232)</summary>

Closes 231

Extracted [`NumPyPrintable`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.sympy.html#ampform.sympy.NumPyPrintable) implementation classes from [`BoostZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix), [`RotationYMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.RotationYMatrix) and [`RotationZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.RotationZMatrix), so that the code generated with [`sympy.lambdify()`](https://docs.sympy.org/latest/modules/utilities/lambdify.html#sympy.utilities.lambdify.lambdify) decreases and has a smaller memory footprint (if using `cse=True`). This can best be seen by comparing the [new docstring for `BoostZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix) with [the old one](https://ampform--230.org.readthedocs.build/en/230/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix).

</details>

<details>
<summary>Switched to new import attrs API (237)</summary>

See [`import attrs`](https://hynek.me/articles/import-attrs/#the-last-step-import-attrs) and [`attrs` TNG](https://www.attrs.org/en/21.4.0/names.html#attrs-tng).

</details>

<details>
<summary>Simplified HelicityAdapter class (241)</summary>

Implementation of the [`HelicityAdapter`](https://ampform.readthedocs.io/en/0.12.3/api/ampform.kinematics.html#ampform.kinematics.HelicityAdapter) class was a bit too complicated. This PR makes the class into a simple manager of Topology instances that can create expressions from these topologies. Interface hasn't changed though.

</details>

<details>
<summary>implement_doit_method() can only decorate UnevaluatedExpression classes (224)</summary>

</details>

📝 Documentation

<details>
<summary>Second level in left sidebar is shown by default (221)</summary>

Links to NumPy API are now also embedded correctly in the code examples. Follow-up to 217.

</details>

<details>
<summary>Added Hypothesis and utterances overlay (225)</summary>

Closes https://github.com/ComPWA/compwa-org/issues/109

</details>

<details>
<summary>Added IPython.display import to notebooks (226)</summary>

See "New features" under https://github.com/ComPWA/repo-maintenance/pull/49

</details>

<details>
<summary>Added explanation how to pin dependencies with Conda (233)</summary>

Preview [here](https://ampform--233.org.readthedocs.build/en/233/install.html). See also https://github.com/ComPWA/tensorwaves/pull/411.

</details>

<details>
<summary>Improved signatures in helicity module (242)</summary>

Note: it's not yet possible to abbreviate type aliases in nested type hints. Sphinx will fix this (https://github.com/sphinx-doc/sphinx/pull/10183) in [v4.5.0](https://www.sphinx-doc.org/en/master/changes.html#release-4-5-0-in-development). This will also make it possible to improve the order of definitions in the `helicity` module (makes more sense to define `HelicityModel` first). See also https://github.com/ComPWA/compwa-org/issues/116.

</details>

🖱️ Developer Experience

<details>
<summary>Doctests are now also included in test coverage (222)</summary>

Will increase test coverage.

</details>

<details>
<summary>Upgrade cron job is now run even weeks only (223)</summary>

See https://github.com/ComPWA/repo-maintenance/pull/48

</details>

<details>
<summary>GitHub Actions are now also run on version branches (239)</summary>

This makes it safer to commit or PR patches to older versions.

</details>

0.15.8

_See all documentation for this version [here](https://ampform.rtfd.io/en/0.15.8)._

🐛 Bug fixes

- Make values in mapping hashable in `cache_to_disk()` (470)

_The full changelog as commits can be found [here](https://github.com/ComPWA/ampform/compare/0.15.7...0.15.8)._

0.15.7

_See all documentation for this version [here](https://ampform.rtfd.io/en/0.15.7)._

This version introduces major improvements to the caching functions 🎉 All of them are available through:

python
from ampform.sympy import cached


✨ New features

- Implement `partial_doit()` function (456)
- Collect cached SymPy functions in `cached` module (457)
- Implement `cached.unfold` for amplitude models (458)
- Implement `cached.simplify` etc (467)

⚠️ Enhancements and optimizations

- Improve cache invalidation of `cache_to_disk` (459)
- Use memoization on functions in `cached` module (464)
- Memoize `get_readable_hash()` (466)

🖱️ Developer Experience

- Benchmark results are now stored in a separate repository (460, 461, and 462)

_The full changelog as commits can be found [here](https://github.com/ComPWA/ampform/compare/0.15.6...0.15.7)._

0.15.6

_See all documentation for this version [here](https://ampform.rtfd.io/en/0.15.6)._

✨ New features

- Switch of expression caches with `NO_CACHE` environment variable (454)
- Implement `perform_cached_substitution()` for cached substitution of symbolic expressions (454)
- Set cache directory with `COMPWA_CACHE_DIR` (454)

🐛 Bug fixes

- Fix `is_integer()` bug for QRules v0.10.4 (450)

🔨 Maintenance

- Update lock files (447)

_The full changelog as commits can be found [here](https://github.com/ComPWA/ampform/compare/0.15.5...0.15.6)._

0.15.5

_See all documentation for this version [here](https://ampform.rtfd.io/en/0.15.5)._

⚠️ Enhancements and optimizations

- Compute stable hash without need for `PYTHONHASHSED` (444)

⚠️ API changes

- Change to Apache license (432)
- Drop Python 3.7 & 3.8 support due to EOL (440)
- Define dev dependencies as dependency groups (441)

🔨 Maintenance

- Upgrade implementation to SymPy v1.13 (435)

🖱️ Developer Experience

- Define developer environment with `uv` (439)

_The full changelog as commits can be found [here](https://github.com/ComPWA/ampform/compare/0.15.4...0.15.5)._

0.15.4

_See all documentation for this version [here](https://ampform.rtfd.io/en/0.15.4)._

⚠️ Enhancements and optimizations

- cache Blatt–Weisskopf polynomials (428)

🖱️ Developer Experience

- implement benchmark monitoring (427)

_The full changelog as commits can be found [here](https://github.com/ComPWA/ampform/compare/0.15.3...0.15.4)._

Page 1 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.