Skip to main content

inflatox_banner

Inflatox - multifield inflation consistency conditions in python

License: EUPL v1.2 arXiv PyPi CI

Inflatox provides utilities to compute slow-roll parameters and turn-rates for two-field inflation models, based on the consistency condition from Generalised consistency condition first presented in Anguelova & Lazaroiu (2023)1 and later generalised for the purposes of this package in Wolters, Iarygina & Achúcarro (2024)2 arXiv:2405.11628. The consistency conditions can be used in a parameter sweep of a two-field model to find possible inflation trajectories.

Features

  • symbolic solver for components of the Hesse matrix of an inflationary model with non-canonical kinetic terms, powered by sympy.
  • transpiler to transform sympy expressions into executable compiled (C) code.
  • (experimental) support for special function transpilation using the GSL
  • built-in multithreaded rust module for high-performance calculations of consistency conditions that interfaces directly with numpy and python.
  • utilities for performing parameter sweeps.
  • extendability: inflatox' exposes a python interface to calculate any intermediate quantity, which can be used to extend it with additional consistency conditions.
  • no need to read, write or compile any rust or C code manually (this is all done automatically behind the scenes).
  • no system dependencies, everything needed to run the package can be automatically installed by pip.

Installation and Dependencies

The latest version of inflatox can be installed using pip:

pip install inflatox

Inflatox can be updated using:

pip install --upgrade inflatox

Example programme

The following code example shows how inflatox can be used to calculate the potential and components of the Hesse matrix for a two-field hyperinflation model.

import inflatox
import numpy as np
import sympy as sp

# define model
r, θ, m = sp.symbols("r θ m")
fields = [r, θ]

V = (1 / 2 * m**2 * (θ**2 - 2 / (3 * r**2))).nsimplify()
g = [[0.5, 0], [0, 0.5 * r**2]]

# symbolic calculation
model = inflatox.InflationModelBuilder.new(fields, g, V).build()

# run the compiler
compiled_model = inflatox.Compiler(model).compile()
compiled_model.print_sym_lookup_table()

# evaluate the compiled potential and Hesse matrix at the point x
from inflatox.consistency_conditions import GeneralisedAL

params = np.array([1.0])
x = np.array([2.0, -2.0])

anguelova_condition = GeneralisedAL(compiled_model)

potential = anguelova_condition.calc_V(x, params)
hesse_mtrx = anguelova_condition.calc_H(x, params)
print(potential, hesse_mtrx)

# evaluate the consistency condition over a range of field-space coords (extent)
extent = [0.0, 2.5, 0.0, np.pi]
consistency_condition, epsilon_V, epsilon_H, eta_H, delta, omega = (
    anguelova_condition.complete_analysis(params, *extent)
)

Special function support

Inflatox features (experimental) support for transpiling special functions from scipy to C using the GSL library. The GSL (GNU Scientific Library) is not packaged together with inflatox due to its conflicting license. Inflatox merely generates code that calls GSL functions, you must still provide the headers and compiled shared libraries (libgsl and libgslcblas) yourself.

If you intend on using this feature, make sure that:

  • The GSL is installed and can be found
  • GSLCBLAS is installed and can be found
  • The GSL headers are installed and can be found

Check out the documentation of the Compiler class for a list of currently supported special functions, and the docs.md file for more technical details. If you are experiencing any issues with the gsl feature (or if a special function you need is missing), please open an issue on github or contact the authors.

Supported Architectures

The combinations of OS and CPU architecture listed down below have pre-compiled binary distributions of inflatox available via PiPy. If your arch is not listed here, you will have to compile inflatox manually.

  • Intel/AMD x86/i686 (32 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2)
  • Intel/AMD x86_64/amd64 (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2)
    • windows 10+
    • macOS 10.12+ / Sierra+
  • ARM aarch64 (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 4.1)
    • macOS 11.0+ / Big Sur+

License

License: EUPL v1.2

[!CAUTION] Inflatox is explicitly not licensed under the dual Apache/MIT license common to the Rust ecosystem. Instead it is licensed under the terms of the European Union Public License v1.2.

Inflatox is a science project and embraces the values of open science and free and open software. Closed and paid scientific software suites hinder the development of new technologies and research methods, as well as diverting much- needed public funds away from researchers to large publishing and software companies.

See the LICENSE.md file for the EUPL text in all 22 official languages of the EU, and LICENSE-EN.txt for a plain text English version of the license.

References and footnotes

  1. Anguelova, L., & Lazaroiu, C. (2023). Dynamical consistency conditions for rapid-turn inflation. Journal of Cosmology and Astroparticle Physics, May 2023(20). https://doi.org/10.1088/1475-7516/2023/ 05/020 ↩

  2. Wolters, R, Iarygina & O. Achúcarro, A (2024). Generalised conditions for rapid-turn inflation. Journal of Cosmology and Astroparticle Physics, July 2024(79). https://doi.org/10.1088/1475-7516/2024/07/079 ↩ ↩2

Metadata

Release files for inflatox 0.10.2

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

Source distribution (sdist)

Source distribution for inflatox 0.10.2
File Size Uploaded
inflatox-0.10.2.tar.gz 741.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for inflatox 0.10.2
File
inflatox-0.10.2-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
inflatox-0.10.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
inflatox-0.10.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details
inflatox-0.10.2-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details

Total release size: 3.4 MB

Release files / inflatox-0.10.2.tar.gz

Download URL inflatox-0.10.2.tar.gz
Size 741.8 kB
Tags Source
SHA-256 checksum
How to use checksums
af304db128e6f427599cbd52730aa1c55174e1190045470c540a6740ca981df4
BLAKE2b-256 checksum
How to use checksums
1cf60e187cbb616cdb3c36dd62c9a650ff66f5076078be71f23358dd7fdaee98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release files / inflatox-0.10.2-cp37-abi3-win_amd64.whl

Download URL inflatox-0.10.2-cp37-abi3-win_amd64.whl
Size 594.7 kB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4c9c3812e53acf77f1d9a1f21462d52eeb225df406bbfd6009521496237032ad
BLAKE2b-256 checksum
How to use checksums
439d9d0a1f08192d4a9ba1b5b03631a23bcfc3eba1810dfa90f0afd1e033b4b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release files / inflatox-0.10.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL inflatox-0.10.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 704.9 kB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
30396dbec3c70f19cce6c4b383c3b5e792d601a67e5f29d747ff7d2d23190233
BLAKE2b-256 checksum
How to use checksums
db27653f47cdc2ee0e10c64ec2b95ce70887fa4f58470b7ec9d0f2ca57dc3ba9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release files / inflatox-0.10.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL inflatox-0.10.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 690.8 kB
Tags CPython 3.7 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0d907f148c1feec2588b0dca6f3a1641fe9e9536b50e496d2a5cc9eb5e8971b1
BLAKE2b-256 checksum
How to use checksums
045fadcbd3d76c366fe0f41e472aad3b16b382f860a162ed7e49f31385c5a9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release files / inflatox-0.10.2-cp37-abi3-macosx_11_0_arm64.whl

Download URL inflatox-0.10.2-cp37-abi3-macosx_11_0_arm64.whl
Size 655.2 kB
Tags CPython 3.7 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c657193ba37b3b7d4000f0ee13cd37bf5c39b5a0a827d5f6e12b6b9689b68d8a
BLAKE2b-256 checksum
How to use checksums
ddd5377c1e70dc464601a13d781a8be092018c93a922b2f4daaef52adcaef6a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

This release

0.10.2 This release

5 release files

0.10.1

7 release files

0.9.1

7 release files

0.9.0

8 release files

0.8.2

8 release files

0.8.1

8 release files

0.8.0

10 release files

0.7.0

10 release files

0.4.0

10 release files

0.3.0

10 release files

0.2.0

10 release files

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