Framework for implementing high-performance numerical consistency conditions for multifield inflation models.
Project description
Inflatox - multifield inflation consistency conditions in python
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 withnumpy
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
orC
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for inflatox-0.7.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dccbf4e618c4e19c854661fb584e50da8aca6eba27d6f7c0b06467bedffabcf3 |
|
MD5 | 2f42913f257f64f419d3f738d83d78ba |
|
BLAKE2b-256 | 6049577aa444c80cdc0f7072cd371699f1441a53c3317c17bcab3fbebdf26c34 |
Hashes for inflatox-0.7.0-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7011b038be7bc26a0352b6a3bf63d5ef7ccd99cf56aec5746f91b30529083859 |
|
MD5 | bda7bd4329533da74b0d4b940c1172d3 |
|
BLAKE2b-256 | a872b9fbe804f2e312d20f9f7638539e93649bb24c75edf9a0b06f2b19c857c3 |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be279e9f962f06b5d063154456fee0935937772986b73b100dc48f9e5e3f1282 |
|
MD5 | 6e52cfaa6baf1d29f40fdf3f3105bcfe |
|
BLAKE2b-256 | 96ea0660683267a9ae0db8169a3ba9c37394e6e77670c689f6a3db13d774632a |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1020ea48765a56773bfdb3f8890f9472fc49e9247308fbe94b6b4753596bd0b2 |
|
MD5 | 59b752f6a66b4cd1675826de7b77eed1 |
|
BLAKE2b-256 | 08690e867a606d09d05ec5b058384ddcf3834adf20a2f2125712cb2cb6bf761f |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c470924761f853139f4f1667028f9c5a27f6a9748d374a7d6dd89e403218b80 |
|
MD5 | 34de334a45af87536bd5166d5a959062 |
|
BLAKE2b-256 | e19b82f48581edacd783104f8226500c0baa2cc5c0f265f61cce4bec8f52e52a |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94edf9684964b8f2124879ab1be41e06f4a59091249db72c5362067638fb3196 |
|
MD5 | ae0c6ece0bd14cf47e467364fadc3ea5 |
|
BLAKE2b-256 | c1906fdfcc56417be61a8bd2353ca180585d071320cc5b544a216feda27648fd |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aa124f24b446987d9267cf63ef4b8e84f45d8f5df1bd7f6c14ecc866bf733ec |
|
MD5 | 34b16e4a8755339d7a5866fe4cad5a9d |
|
BLAKE2b-256 | 4e7ed1a6e824b948eed86feec06d2fa6bd981f62f07d16f22fc68ad310192e7b |
Hashes for inflatox-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d581288e500feaf256596e70bd5adf392ba81114bbdec21beb670346e21bbe9 |
|
MD5 | 3a7e00121d5643cde608bedb05c8c37e |
|
BLAKE2b-256 | c9cb5bb56c408b32cd39d3aecf6da5a69f24df32508a545c7fb14bfb87477bf7 |
Hashes for inflatox-0.7.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7b28321b5658d15900e2d3df6f34c9cae51daaf896da5993feb10a77a2d636c |
|
MD5 | 8f01d20faa8e3f983136e005e7eb9fa3 |
|
BLAKE2b-256 | c0425b634bc284cd77d7d57ad893f4d7790f8d145f4dcce0813889a53327e722 |
Hashes for inflatox-0.7.0-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b69fd3ed49c6440319bccc9b5fa0f8437445b47cefc5ac8c099cb29cdba89601 |
|
MD5 | 812a6243508d0ac3ab56e082da812f50 |
|
BLAKE2b-256 | e77a6b1bedc92dbcd59b9179562e0a41dca02e62fa3985f590e137e3863e271f |