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 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)[^3] arXiv:2405.11628. The consistency conditions can be used in a parameter sweep of a two-field model to find possible inflation trajectories.

[!NOTE] If this software has proven useful to your research, please consider citing JCAP07(2024)079[^3]

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

[!IMPORTANT] Inflatox requires at least python version 3.8.

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
from IPython.display import display
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(fields, g, V)
hesse = calc.execute()

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

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

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

extent = [-1., 1., -1., 1.]
consistency_condition, epsilon_V, epsilon_H, eta_H, delta, omega = anguelova.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+

[!TIP] Apple silicon M-series chips are supported (aarch64)*

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]: 32-bit windows is no longer considered a tier-1 target by the rust project, and unsupported by some of Inflatox's dependencies. [^3]: 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

Project details


Download files

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

Source Distribution

inflatox-0.10.1.tar.gz (674.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

inflatox-0.10.1-cp37-abi3-win_amd64.whl (580.1 kB view details)

Uploaded CPython 3.7+Windows x86-64

inflatox-0.10.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (703.2 kB view details)

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

inflatox-0.10.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (683.9 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

inflatox-0.10.1-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl (719.4 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.12+ i686

inflatox-0.10.1-cp37-abi3-macosx_11_0_arm64.whl (644.3 kB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

inflatox-0.10.1-cp37-abi3-macosx_10_12_x86_64.whl (676.2 kB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

File details

Details for the file inflatox-0.10.1.tar.gz.

File metadata

  • Download URL: inflatox-0.10.1.tar.gz
  • Upload date:
  • Size: 674.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for inflatox-0.10.1.tar.gz
Algorithm Hash digest
SHA256 cbf15a8ee941b582a30d6a8ca57cb4d7406aacf535fb7dee0b533c5eddbdf0dc
MD5 34e8b4feba7ed34cd5389c212ca01e68
BLAKE2b-256 c753a8f297031f9b847009455854e032b0de6d9f35bcf0d33b28080a35df754b

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: inflatox-0.10.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 580.1 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 728c6707a2bb52247403be2536d7be00fa13d2ae5defb88812c2b2e5de7113e6
MD5 de3d7ec38e1657a6104d7e89665cc0bf
BLAKE2b-256 640a34bd6480d4ffe79e01124a0202ab2bfcd3480aa487b7453acdbeef5a0e2f

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd925f7ed65909a344c81c29b9688047be1f8e42e3aab694cc1fd9d307abe0eb
MD5 501f881e56fdbc927a3edc1b8e6be210
BLAKE2b-256 39571f344b6b4d1edd4c585b4b987c7a60c1aea3689f31445eb178766b06d3bc

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a36fd272b483a2234b22dcc4db71539807c0e15eccd1a8f87b133098c149297
MD5 7b153d3bd48887b444d325feb278c569
BLAKE2b-256 c18d1df5953e0200991fc68fcb0647d81af711707d77f9a313b6871002b6959d

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 097f30e386d281ceeaee2297a9f06be63266ec4498f010dbd5eb3e99eb712341
MD5 7c281021f2da6b5242fd8550b729a55a
BLAKE2b-256 d949eb31d1d9cd2a1354b3bc1df98e68acb76d1cbb0e1de99173b95575c6ca47

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 28977fd677e193db493934ddca215ee868ddeaabadac39af03dba255377b8689
MD5 abb90239988fc25e6b99afe3c50bbe03
BLAKE2b-256 a91b367ee720129cbb4faa5c82a1298b85c08b5710161eb9bd3837d6a1e42da0

See more details on using hashes here.

File details

Details for the file inflatox-0.10.1-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for inflatox-0.10.1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2fac162d879cd79c2cfd98fb0d86243024b96c449ed1da902ab5a437b1adf302
MD5 8869ad317f99df860ddf394a76311fe6
BLAKE2b-256 9b0f3a6987f138313f31a13dfe24dfa954f0223d9c072880f15b1dd4559ea4dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page