Skip to main content

Framework for implementing high-performance numerical consistency conditions for multifield inflation models.

Project description

inflatox_banner

Inflatox - multifield inflation consistency conditions in python

License: EUPL v1.2 PyPi CI

Inflatox provides utilities to compute slow-roll parameters and turn-rates for two-field inflation models, based on the consistency condition from Anguelova & Lazaroiu (2023)[^1]. These can be used in a parameter sweep of a two-field model to find possible inflation trajectories.

If this software has proven useful to your research, please consider citing (paper in preparation).

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

Inflatox requires at least python (ABI) version 3.7. 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 inflatox
import sympy as sp
import numpy as np
sp.init_printing()

#define model
φ, θ, L, m, φ0 = sp.symbols('φ θ L m φ0')
fields = [φ, θ]

V = (1/2*m**2*(φ-φ0)**2).nsimplify()
g = [
  [1, 0],
  [0, L**2 * sp.sinh(φ/L)**2]
]

#print metric and potential
display(g, V)

#symbolic calculation
calc = inflatox.SymbolicCalculation.new_from_list(fields, g, V)
hesse = calc.execute([[0,1]])

#run the compiler
out = inflatox.Compiler(hesse).compile()

#evaluate the compiled potential and Hesse matrix
from inflatox.consistency_conditions import AnguelovaLazaroiuCondition
anguelova = AnguelovaLazaroiuCondition(out)

p = np.array([1.0, 1.0, 1.0])
x = np.array([2.0, 2.0])
print(anguelova.calc_V(x, p))
print(anguelova.calc_H(x, p))

extent = (-1, 1, -1, 1)
consistency_condition, epsilon_V, epsilon_H, eta_H, delta, omega =
    anguelova.full_analysis(p, *extent)

Supported Architectures

  • Intel/AMD x86/i686 (32 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2)
    • windows 7+ [^2]
  • ARM armv7 (32 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2, hard float)
  • Intel/AMD x86_64/amd64 (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2)
    • windows 7+ [^2]
    • macOS 10.12+ / Sierra+
  • ARM aarch64 (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 4.1)
    • macOS 11.0+ / Big Sur+
  • PowerPC ppc64le (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.10)
  • IBM s390x (64 bit)
    • linux/gnu (glibc >= 2.17, kernel >= 3.2) Note: Apple silicon M-series chips are supported (aarch64)

Citing

If this software package contributed meaningfully to your research, please consider citing the following papers:

  • (in preparation)

License

License: EUPL v1.2

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]: Windows 7 is no longer considered a tier-1 target by the rust project. Usage of Windows 10+ is recommended.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

inflatox-0.8.0-cp37-abi3-win_amd64.whl (495.6 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

inflatox-0.8.0-cp37-abi3-win32.whl (466.6 kB view hashes)

Uploaded CPython 3.7+ Windows x86

inflatox-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (572.8 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

inflatox-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (813.2 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

inflatox-0.8.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (610.6 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

inflatox-0.8.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (589.3 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686

inflatox-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (558.1 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

inflatox-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (553.6 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

inflatox-0.8.0-cp37-abi3-macosx_11_0_arm64.whl (560.1 kB view hashes)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

inflatox-0.8.0-cp37-abi3-macosx_10_12_x86_64.whl (578.5 kB view hashes)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

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