WorksPhysics and Astronomy
PrimordialPy: A Python library for single-field inflation, primordial black holes, and scalar-induced gravitational waves
Abstract
We present PrimordialPy, an open-source Python library designed to compute the cosmological predictions of arbitrary canonical single-field inflationary models. By numerically solving the background dynamics and the curvature perturbation equation, the package evaluates the primordial power spectrum of scalar and tensor perturbations at all relevant scales. Furthermore, it automatically computes the resulting mass fraction and abundance of Primordial Black Holes (PBHs), as well as the associated spectrum of scalar-induced gravitational waves (SIGWs). Users can seamlessly implement any canonical single-field model by simply specifying the inflaton potential and its parameters. Designed to be modular, efficient, and highly accessible, PrimordialPy comes with comprehensive documentation, validation benchmarks, and practical examples, making it a versatile tool for both research and education in early-universe cosmology.
Introduction
Cosmic inflation has established itself as the leading scenario for describing the physics of the early universe. Beyond resolving the classic problems of standard cosmology (horizon, flatness, and magnetic monopoles) [1, 2, 3], it provides a robust framework to explain the origin and evolution of primordial perturbations. These quantum-origin fluctuations are the seeds of large-scale structure (LSS) and the anisotropies observed in the cosmic microwave background (CMB). A fundamental prediction of single-field inflationary models is the generation of a nearly scale-invariant power spectrum of scalar perturbations, which is in excellent agreement with observations from the Planck mission and the ACT DR6 collaboration [4, 5]. In addition to scalar perturbations, inflation predicts a stochastic background of primordial gravitational waves arising from tensor perturbations [6, 7], whose detection remains one of the primary goals of modern observational cosmology [8, 9, 10]. In recent years, there has been growing interest in inflationary scenarios that deviate from the slow-roll condition. In particular, the presence of an Ultra-Slow-Roll (USR) phase, driven by an inflection point or a feature in the inflationary potential, can significantly amplify the power spectrum at small scales (compared to those of the CMB). This amplification enables the formation of Primordial Black Holes (PBHs) [11, 12, 13, 14, 15, 16], which are compelling dark matter candidates and could potentially explain some of the gravitational wave events detected by LIGO-Virgo-KAGRA [17, 18, 19, 20, 21, 22, 23, 24]. Despite the theoretical relevance of these models, the precise calculation of the power spectrum and PBH abundance often requires numerically solving the Mukhanov-Sasaki equations, as slow-roll approximations fail near the USR phase [25].
There are numerous open-source codes that compute inflationary dynamics and primordial perturbations in single-field models for a predefined set of potentials, such as Pyflation [26], the BINGO code [27], Primpy [28], or the tools in [29]. In a more general way, codes using lattice techniques, such as LATTICEEASY and CosmoLattice [30, 31], compute the dynamics of matter fields in the early universe. For multi-field inflation models, robust codes exist, such as PyTransport [32], CppTransport [33], or the Mathematica implementation of the transport method [34]. Regarding PBH formation, there is the Python library PBHStat [35], while for computing scalar-induced gravitational wave (SIGW) signals, review frameworks such as [36] and tools like those in [37, 38, 39] are available.
However, many of these packages are primarily optimized for Cosmic Microwave Background (CMB) scales or require a complex infrastructure to implement new physics models beyond standard slow-roll. In particular, studying PBH formation demands precise numerical resolution at much smaller scales (large values of , on the order of ), where analytical approximations typically break down due to the transition into Ultra-Slow-``` Roll phases. Aiming to provide a versatile, modular tool that easily integrates into the Python scientific ecosystem, we present PrimordialPy.
This library not only allows the exploration of an arbitrary range of single-field potentials but also automates the calculation of the primordial power spectrum by solving the exact dynamics of curvature perturbations. Furthermore, it self-consistently computes the resulting PBH abundance, their mass distribution, and the associated SIGW spectrum, checking their consistency against current observational constraints.
We work with a spatially flat FLRW background,
and use natural units with .
Theoretical framework
In this section, we review the exact non-linear formulations that form the core computational modules of PrimordialPy, bypassing traditional slow-roll approximations which fail in models with features.
Background dynamics
We consider a canonical single-field inflationary model governed by the action
where is the Ricci scalar, is the inflaton field, and is the scalar potential. From this action, we can obtain the field equation for and the Friedmann equation for the scale factor :
where is the Hubble parameter and . We denote the wavelength scale as , and we fixed the CMB pivot scale at , which exits the Hubble horizon during inflation. To describe the inflationary epoch, and taking into account the quasi-de Sitter spacetime, we introduce the slow-roll parameters defined as [40]
where is the number of e-folds during inflation, given by . On one hand, the slow-roll conditions for inflation correspond to the expressions . The condition ensures that the acceleration of the spacetime is nearly exponential. On the other hand, the end of inflation corresponds to a value of .
For numerical stability, PrimordialPy tracks the background evolution using the number of e-folds as the time variable. Substituting , where primes denote derivatives with respect to , the exact background equations become:
where is defined in (5), which in terms of , can be read as .
Primordial perturbations
The dynamics of primordial perturbations have been studied in many theoretical studies [41, 42, 43, 44, 45, 46, 47, 48]; in particular, the dynamics of the curvature primordial perturbation, denoted as (or at ) [49], can be described in the comoving gauge using the ADM form of the metric
where is the lapse function, is the 3-metric of the spatial hypersurfaces, and is the shift vector. By expanding the action (2) to second order in and solving the constraints for and to first order in perturbations, we obtain the following second-order action for the curvature perturbation [50]:
When searching for analytical solutions, it is often useful to introduce the Mukhanov-Sasaki variable, defined as , where in Planck units [45, 47]. This redefinition removes the friction term and casts the equation of motion into the form of a simple harmonic oscillator with a time-dependent mass [48].
However, for numerical evaluations of the background dynamics and the curvature power spectrum, solving for introduces severe stability issues. On super-horizon scales (), the Mukhanov-Sasaki variable grows proportionally to the scale factor (), reaching exponentially large values by the end of inflation. Recovering the power spectrum then requires dividing two astronomically large numbers (), which leaves the computation highly susceptible to floating-point truncation errors. To circumvent this, it is overwhelmingly more convenient to directly evolve the equation for the Fourier modes of using the number of e-folds as the time variable [25]. Since naturally freezes and becomes strictly constant outside the horizon, this approach inherently avoids exponential overflows and guarantees numerical precision.
Expressing the free field in the Fourier space; more precisely, we expand in Fourier modes
the equation of motion of is given by
Deep inside the horizon (), the modes are initialized in the Bunch-Davies vacuum. The initial conditions for at sub-horizon scales in terms of , are given by
where corresponds to the initial value of e-folds during inflation, usually taken 5 e-folds before the horizon crossing . PrimordialPy integrates (11) until the modes freeze out on superhorizon scales (), and then evaluates the exact scalar primordial power spectrum for each -mode:
It can also compute the primordial power spectrum of tensor modes,
whose evolution is described by the equation of motion for each polarization state
with the following initial conditions
The scale-dependent tensor-to-scalar ratio is subsequently computed as:
On the observational front, cosmic microwave background (CMB) measurements impose tight constraints on the primordial scalar and tensor perturbation spectra. In particular, the joint analysis of the BICEP/Keck Array and Planck data, combined with baryon acoustic oscillation (BAO) measurements, yields the upper bound at the 95% confidence level for the tensor-to-scalar ratio at the pivot scale [51, 4]. This stringent bound effectively rules out classic monomial potentials and strongly favors plateau-like inflationary scenarios, such as the Starobinsky model [1] or non-minimally coupled Higgs inflation [52], which naturally predict . Furthermore, it restricts the energy scale of inflation to , placing it around or slightly below the Grand Unified Theory (GUT) scale.
PBH abundance and Induced GWs
The curvature perturbation , besides providing the seeds for the observed anisotropies of the CMB at large scales, the dynamics of this perturbation may also be a key role for PBH formation, provided that cosmological fluctuations present a specific behavior at small scales, namely, at scales . In PBH formation, one assumes that the curvature primordial power spectrum (14) at these scales enhances well above the level required for CMB [4]
After the end of inflation, during reheating, specifically during the radiation dominated universe (RDU), these amplifications of the curvature perturbation become the seeds of the density perturbation ; regions with a density exceeding a threshold collapse into PBHs [11, 14, 16, 23]. This threshold was the first criterion to be consider for PBH formation, and it was formulated by Carr [11] using Jeans instability arguments in Newtonian gravity, and was improved by [53] considering relativistic effects, obtaining the value during RDU. However, in general this value depends on the initial behavior of curvature perturbation [14, 54, 55, 56, 57, 58, 59].
There are multiple ways to enhance the primordial curvature power spectrum at small scales for PBH formation, such as multifield inflation dynamics [21, 60, 61, 62, 63, 64, 65, 66], models of inflation with a characterized shape of the scalar potential [13, 12, 15, 22, 67, 68, 69, 70, 71], models which explore the idea of a time-dependent sound speed based on non-canonical kinetic terms [72], and non-minimal couplings of the inflaton sector with gravity [73]. PrimordialPy is specifically designed to compute the primordial curvature power spectrum for single-field scenarios where this enhancement is driven purely by the shape of . In particular, the library tracks the exact dynamics of models featuring a transient violation of the slow-roll conditions [5] [74, 75, 76].
Such violations typically manifest as an ultra slow-roll (USR) phase—often triggered by an inflection point or a shallow plateau in the potential—during which the inflaton experiences a severe deceleration. It is precisely this USR dynamics that induces the super-horizon growth of the curvature perturbation, ultimately yielding the required peak for PBH production [77, 78, 79]. For more details about the physics of curvature perturbation at small scales, we recommend [14] and the references therein.
Once the amplified curvature perturbations re-enter the Hubble horizon during the RDU, they source large density contrasts . The variance of these density perturbations, smoothed over a comoving scale , is directly determined by the primordial curvature power spectrum:
where is a smoothing window function, typically chosen as a Gaussian or a real-space top-hat. Assuming Gaussian statistics for the primordial fluctuations, the formation fraction —representing the probability that a horizon-sized patch undergoes gravitational collapse—is computed using the Press-Schechter formalism [80]:
where is the critical density threshold for collapse. The mass of the resulting PBH is proportional to the horizon mass at the time of mode re-entry, , which connects the PBH mass to the comoving wavenumber as [76, 71]:
with being the collapse efficiency factor and the effective degrees of freedom for entropy at the time of formation. Finally, the present-day fractional abundance of PBHs relative to the total dark matter density, , is given by [18]:
PrimordialPy streamlines this entire pipeline. By passing the exact numerical power spectrum , the library automatically integrates the variance and outputs both the mass spectrum and the total PBH abundance , allowing users to easily test whether a specific potential can constitute a viable dark matter candidate without violating current observational constraints.
Furthermore, PrimordialPy is designed with modularity and interoperability in mind. While it seamlessly
links its exact background and perturbation solvers to the PBH module, the framework is not strictly monolithic. The PBH and SIGW modules can operate as standalone evaluators, natively accepting external scalar power spectrum data provided as standard numerical arrays. This flexibility allows users to bypass the built-in inflationary solver and readily compute observables for theoretically motivated templates, parametric approximations, or output data imported from other cosmological codes.
The significant enhancement of the primordial curvature power spectrum required for PBH formation inevitably sources a stochastic gravitational wave background (SGWB) due to second-order effects in cosmological perturbation theory [81, 82, 83]. While scalar and tensor perturbations evolve independently at linear order, large scalar fluctuations re-entering the Hubble horizon during the radiation-dominated era induce tensor modes through the non-linear source term in the Einstein equations. In the transverse-traceless gauge, the equation of motion for the Fourier components of the induced tensor perturbations takes the form of a driven harmonic oscillator:
where is the conformal time, is the conformal Hubble parameter, and is the source term strictly quadratic in the first-order scalar perturbations [36]. The observable signature of these induced tensor modes is captured by their present-day spectral energy density,
evaluated at a frequency . Assuming the source modes re-enter the horizon deep inside the radiation-dominated epoch, the present-day GW energy density can be expressed as a double integral over the internal momenta and [84]:
where is the current radiation density parameter, and is the radiation-era transfer function kernel containing the time integration of the Green’s function for the tensor modes. Evaluating the double integral in Eq. (27) over a wide range of frequencies represents a formidable computational challenge due to the highly oscillatory nature of the kernel and the resonances at (the sound speed in the radiation fluid). PrimordialPy tackles this challenge by deploying an optimized numerical integration scheme tailored to navigate the resonances of efficiently. By inheriting the exact evaluated in the inflationary module—or an externally provided numerical spectrum—the SIGW module seamlessly translates the primordial curvature peak into the present-day GW spectrum . This allows for immediate cross-validation of inflationary models against the sensitivity curves of current pulsar timing arrays [85, 86].
Numerical implementation
The PrimordialPy library is structured as a suite of modular, object-oriented Python classes. Its architecture is designed to strictly separate the symbolic manipulation of the theoretical model from the heavy numerical integration, ensuring both user-friendliness and high computational performance.
Solver structure
At the core of PrimordialPy lies the Potential abstract base class. To bridge the gap between arbitrary mathematical models and numerical efficiency, the concrete implementation PotentialFunction leverages the SymPy library [87] to parse the scalar potential provided as a string. It analytically computes the first and second field derivatives ( and ) symbolically, completely avoiding numerical noise from finite-difference schemes. These symbolic expressions are then instantly compiled into fast, vectorized NumPy [88] functions using lambdify.
The evolutionary dynamics are split into sequential modules:
Background Dynamics: The Background class integrates the exact equations of motion (6) and (7) using the explicit Runge-Kutta DOP853 method from SciPy [89]. This high-order solver (8th order with error control) is particularly well-suited for tracking the severe deceleration of the inflaton field USR phases with tolerances down to . The background history is cached using cubic splines to feed the perturbation equations.
Primordial Perturbations: The Perturbations module computes the scalar and tensor spectra. Because solving the Eqs. (11), (16) for an array of independent -modes is an embarrassingly parallel problem, the integration is distributed across multiple CPU cores using joblib. To circumvent Python’s Global Interpreter Lock (GIL) and multiprocessing serialization overhead, the core integration functions (e.g., the right-hand side of the ODEs) are strictly decoupled from the class state. The stiff-aware LSODA solver is employed here to gracefully handle the oscillatory nature of the modes deep inside the horizon.
PBH and SIGWs Evaluators: The PBHAbundance and InducedGW modules handle the post-inflationary observables. Both classes utilize NumPy’s vectorized operations (e.g., meshgrid and trapezoid) for multidimensional integrations. The highly oscillatory double integral for the SIGW spectrum (27) is additionally parallelized, mitigating a well-known computational bottleneck.
Workflow
PrimordialPy relies on a sequential but highly modular workflow. While the modules are designed to feed data into one another natively, users can bypass the inflationary solver and inject custom power spectrum arrays directly into the PBH and SIGW evaluators.
To illustrate the standard end-to-end pipeline, we consider the KKLT inflation [90] with a bump in the potential, which is characterized by its weight , position and width [69]. The workflow requires only a few lines of code to define the model, solve the exact background, compute the perturbations across scales, and output the resultant PBH abundance:
import numpy as np
from primordialpy.model import PotentialFunction
from primordialpy.background import Background
from primordialpy.perturbations import Perturbations
from primordialpy.pbhabundance import PBHAbundance
from primordialpy.pbhconstraints import PBHConstraints
from primordialpy.inducedGW import InducedGW
# 1. Define the potential symbolically
V = ’V_0*phi**2/(phi**2 + m**2)*(1
+ A*exp(-0.5*(phi - phi_0)**2/sigma**2) )’
parameters = {’V_0’ : 0.79e-10, ’m’ : 0.5,
’A’ : 1.17035e-3, ’phi_0’ : 2.188, ’sigma’ : 1.59e-2}
potential = PotentialFunction.function(V,
param_values=parameters)
# 2. Solve background dynamics
background = Background(potential, phi0=6.3)
background.solver()
# 2.1 Save background variables
N, phi, dphiN, H, a, ah,
eps_H, eta_H = background.data().values()
background.save_background(path=’./Data’)
# 3. Compute power spectra and save data
pert = Perturbations(potential, background,
scale=’PBH’, N_CMB=60)
sol_pivot = pert.power_spectra_pivot()
PS, PT = pert.power_spectrum()
pert.save_power_spectra(path=’./Data’)
tilts = pert.spectral_tilts
# 4. Evaluate PBH Abundance and save data
pbh = PBHAbundance(constraints=pert,
delta_c=0.4, gamma=0.2, gstar=107.5)
mPBH, fPBH = pbh.fPBH()
pbh.save_pbh(path=’./Data’)
# 4.1 Plot PBH abundance
constraints = PBHConstraints()
constraints.add_bound(’Evap’, ’Evaporation.txt’)
constraints.add_bound(’HSC’, ’HSC.txt’)
constraints.add_bound(’CMB’, ’CMB.txt’)
constraints.add_bound(’LIGO’, ’LIGO.txt’)
constraints.add_bound(’Accretion’, ’Accretion.txt’)
constraints.add_bound(’Dynamical’, ’Dynamical.txt’)
constraints.add_bound(’EROS’, ’EROS.txt’)
constraints.add_bound(’Kepler’, ’Kepler.txt’)
constraints.add_bound(’Microlensing’, ’Microlensing.txt’)
constraints.plot_constraints(m_pbh=mPBH, f_pbh=fPBH)
# 5. Evaluate SIGWs signal and saved data
gw = InducedGW(perturbations=pert)
f, omega = gw.compute(n_int=1000)
gw.save_gw(path=’./Data’)
The resulting objects natively expose built-in plotting routines, interpolators, and data-saving methods, ensuring the pipeline remains intuitive from theoretical conception to observational comparison. To analyze external datasets without solving the inflationary dynamics from scratch, users can initialize the post-inflationary evaluators either by passing pre-computed arrays or by pointing directly to external files:
from primordialpy.pbhabundance import PBHAbundance
from primordialpy.pbhconstraints
import PBHConstraints
from primordialpy.inducedGW import InducedGW
import numpy as np
#1. Load external data
data = np.loadtx(’my_data.txt’)
k_ext = data[:,0]
P_ext = data[:, 1]
#2. Instance the PBHAbundance class
pbh = PBHAbundance(
delta_c=0.4,
gamma=0.2,
gstar=107.5,
k_modes=k_ext,
Ps=P_ext,
window=’gaussian’ # ’gaussian’ o ’top-hat’
)
# 3. Compute f_PBH and M_PBH
mPBH, fPBH = pbh.fPBH()
# 3.1 Plot PBH abundance
constraints = PBHConstraints()
constraints.add_bound(’Evap’, ’Evaporation.txt’)
constraints.add_bound(’HSC’, ’HSC.txt’)
constraints.add_bound(’CMB’, ’CMB.txt’)
constraints.add_bound(’LIGO’, ’LIGO.txt’)
constraints.add_bound(’Accretion’,
’Accretion.txt’)
constraints.add_bound(’Dynamical’,
’Dynamical.txt’)
constraints.add_bound(’EROS’, ’EROS.txt’)
constraints.add_bound(’Kepler’, ’Kepler.txt’)
constraints.add_bound(’Microlensing’,
’Microlensing.txt’)
constraints.plot_constraints(m_pbh=mPBH,
f_pbh=fPBH)
# 4. Evaluate SIGWs directly from file
gw = InducedGW(filename=’my_data.txt’,
k_col=0, Ps_col=1)
f, omega = gw.compute(n_int=1000)
gw.save_gw(filename=’gw_external.dat’,
path=’./Data’)
Examples
In this section, we present two illustrative physics applications performed with PrimordialPy. Both examples demonstrate how localized features (such as Gaussian or hyperbolic secant bumps) introduced into well-motivated theoretical potentials can briefly interrupt the slow-roll regime, triggering an ultra slow-roll (USR) phase that enhances the primordial scalar power spectrum to generate asteroid-mass primordial black holes (PBHs) and scalar-induced gravitational waves (SIGWs).
In the source code available in the GitHub repository, we present more examples through interactive Jupyter notebooks.
KKLT inflation with a bump
KKLT inflation [92] [90] arises naturally in string compactifications, where D3-brane motion yields a potential of the form . To produce PBHs at small scales, we consider a modified KKLT potential with incorporating a localized Gaussian feature [93]:
We focus in the first parameter space, which is introduced in [69]; using PrimordialPy, we set the benchmark parameters , , , , and . The initial field value is set to in Planck units.
Executing the background, we obtain all background variables: , , , , , , .
PBH abundance and SIGWs signal
Perturbations module yields a scalar spectral index , a curvature power spectrum and a tensor-to-scalar ratio at the CMB pivot scale , in excellent agreement with Planck and BICEP/Keck bounds [4, 51].
At smaller scales, the USR phase driven by the bump (see Figure 1a) generates a localized peak in the curvature spectrum at (see Figure 1b), which the PBHAbundance module converts to a peak PBH mass with an abundance . Simultaneously, the InducedGW module evaluates the secondary gravitational wave background, yielding a peak frequency with an energy density , within the optimal sensitivity curve of LISA [91]. In Table 1, we summarize these values, together with the observables of Starobinsky and -attractor models.
Table 1. Comparison of inflationary models and observables computed with PrimordialPy against current CMB constraints (Planck 2018 / BICEP) and dark matter / LISA sensitivity targets. Both modified single-field scenarios correctly reproduce the baseline CMB parameters while generating a peak in PBH abundance and induced gravitational waves in the asteroid-mass window.
Figure 1. Complete physical pipeline executed by PrimordialPy for the modified KKLT potential (28). (a) Evolution of the Hubble slow-roll parameters and , where the sudden drop in down to signals the ultra slow-roll (USR) phase. (b) The resulting primordial curvature power spectrum , showing a enhancement at while remaining consistent with Planck CMB normalization at large scales. (c) Consequent PBH fractional abundance evaluated against observational constraints. (d) Energy density spectrum of scalar-induced gravitational waves .
-attractor inflation
Conformal -attractor models [94, 95] offer a compelling framework for inflation, naturally predicting and . We analyze a T-model -attractor () modified with a Gaussian-like bump [68, 69, 39]:
For this benchmark, we configure (29) with parameters , , , , and initial field position in Planck units. The Background solver identifies the onset of the USR region near , where drops sharply while (to identify this behavior, see Figure 2a).
Figure 2. Complete physical pipeline executed by PrimordialPy for the -attractor potential (29). (a) Evolution of the Hubble slow-roll parameters and , where the sudden drop in down to signals the ultra slow-roll (USR) phase. (b) The resulting primordial curvature power spectrum , showing a enhancement at while remaining consistent with Planck CMB normalization at large scales. (c) Consequent PBH fractional abundance evaluated against observational constraints. (d) Energy density spectrum of scalar-induced gravitational waves .
PBH abundance and SIGWs signal
At large scales, PrimordialPy calculates , and at the pivot scale . At small scales, the curvature power spectrum has a localized peak with value at the scale the amplified curvature perturbations collapse into an asteroid-mass PBH distribution peaking at with , providing a viable scenario where PBHs constitute the vast majority of dark matter. This agrees within a 5.6% relative difference with the target literature value () [39]. Such minor variance is expected due to the extreme exponential sensitivity of the Press-Schechter mass fraction to numerical grid sampling, interpolation, and quadrature rules. This degree of agreement confirms the physical stability of the Perturbations and PBHAbundance solvers.
The companion SIGW signal reaches a peak amplitude at .
Performance
To assess the computational performance while maintaining high physical precision, we benchmarked the execution of the entire end-to-end pipeline. The tests were conducted on a standard desktop workstation equipped with an AMD Ryzen 5 processor (6 cores / 12 threads at 3.7 GHz) and 16 GB RAM.
Solving the exact background evolution requires essentially instantaneous computation ( ms). Leveraging the joblib-based multiprocessing architecture, the exact integration of the scalar and tensor perturbation equations across 1,000 independent -modes completes in approximately 16 seconds ( modes/s). Furthermore, the InducedGW module—which performs a parallelized 2D integration of the oscillatory kernel over a 1,000 1,000 internal momentum grid—converges in just 19 seconds. In total, the complete physical pipeline from field dynamics to post-inflationary observables evaluates in under 40 seconds with a peak memory footprint below 500 MB. This confirms that PrimordialPy delivers high-performance numerical execution suitable for large-scale parameter sweeps on consumer hardware.
To ensure long-term stability and physical accuracy, PrimordialPy is supported by an automated test suite. Integration tests verify that the background solver correctly identifies the end of inflation () and that the perturbation solver accurately reproduces canonical CMB observables against established benchmarks (e.g., and for -attractor models). The suite additionally validates the mass fractions and frequency peaks generated by the PBHAbundance and InducedGW modules, ensuring numerically reliable outputs and reproducibility across future software updates.
Software availability and installation
The library is compatible with Python and relies on standard core packages from the scientific Python ecosystem (NumPy, SciPy, SymPy, joblib, and matplotlib).
To prevent dependency conflicts with other computational environments, it is recommended to install PrimordialPy within an isolated virtual environment using either Python’s native venv or conda:
# Option A: Using Python’s native virtual environment
python -m venv primordialpy_env
source primordialpy_env/bin/activate
# On Windows: primordialpy_env\Scripts\activate
# Option B: Using Conda
conda create --name primordialpy python=3.10
conda activate primordialpy
Once the virtual environment is activated, the latest development version can be cloned directly from the repository and installed locally in editable mode via pip:
git clone https://github.com/fpineda94/primordialpy.git
cd primordialpy
pip install -e .
To verify the integrity of the installation and run the automated unit test suite, users can execute:
pytest
Summary and future work
In this paper, we have presented PrimordialPy, an open-source, object-oriented Python library designed to automate the numerical pipeline of single-field inflationary dynamics, primordial black hole (PBH) formation, and scalar-induced gravitational wave (SIGW) production. By combining symbolic parsing via SymPy with high-order vectorized solvers and joblib-based multiprocessing, PrimordialPy bridges the gap between theoretical model building and observational cosmological constraints. The entire workflow—from exact background evolution and -mode perturbation spectrum calculation to PBH abundance and secondary GW spectrum .
While the current release provides a fully benchmarked environment canonical single-field models with potential features, several extensions are planned for future major releases:
Preheating and Reheating Dynamics: Integrating post-inflationary preheating modules to model non-perturbative particle production, parametric resonance, and thermalization. This will allow users to precisely constrain the matching parameters and duration of reheating up to the onset of the radiation-dominated era.
Primordial Non-Gaussianities: Extending the PBH-Abundance and InducedGW evaluators to incorporate primordial non-Gaussianities (e.g., local non-linearity parameters and ). Non-Gaussian tails in the curvature perturbation probability distribution function can significantly shift the collapse threshold , altering PBH mass fractions and modifying SIGW peak amplitudes.
Multi-Field Inflationary Scenarios: Expanding the solver architecture to multi-field models defined on curved field-space manifolds. This will enable the automatic handling of multi-field trajectories with sharp turns, heavy-field decoupling, and the non-trivial evolution of non-adiabatic (isocurvature) modes into adiabatic curvature perturbations.
PrimordialPy is actively developed and openly available on GitHub. Community contributions, model implementations, and feedback are warmly encouraged to continue fostering transparent and reproducible research in early-universe cosmology.
Code Availability
The PrimordialPy package is open-source and released under the MIT License. The source code, alongside detailed documentation, interactive Jupyter Notebook tutorials, and observational constraint datasets, is publicly available in the GitHub repository at https://github.com/fpineda94/PrimordialPy.
References
- [1]A. Starobinsky, A new type of isotropic cosmological models without singularity, Physics Letters B 91(1), 99–102 (1980). DOI 10.1016/0370-2693(80)90670-X. URL http://dx.doi.org/10.1016/0370-2693(80)90670-X
- [2]A.H. Guth, Inflationary universe: A possible solution to the horizon and flatness problems, Physical Review D 23(2), 347–356 (1981). DOI 10.1103/physrevd.23.347. URL http://dx.doi.org/10.1103/PhysRevD.23.347
- [3]A. Linde, A new inflationary universe scenario: A possible solution of the horizon, flatness, homogeneity, isotropy and primordial monopole problems, Physics Letters B 108(6), 389–393 (1982). DOI 10.1016/0370-2693(82)91129-9. URL http://dx.doi.org/10.1016/0370-2693(82)91129-9
- [4]Planck Collaboration, Planck2018 results: X. constraints on inflation, Astronomy & Astrophysics 641, A10 (2020). DOI 10.1051/0004-6361/201833887. URL http://dx.doi.org/10.1051/0004-6361/201833887
- [5]A. Collaboration, The atacama cosmology telescope: Dr6 power spectra, likelihoods and λcdm parameters, Journal of Cosmology and Astroparticle Physics 2025(11), 062 (2025). DOI 10.1088/1475-7516/2025/11/062. URL http://dx.doi.org/10.1088/1475-7516/2025/11/062
- [6]A.A. Starobinsky, Spectrum of relic gravitational radiation and the early state of the universe 30, 682
- [7]V. Sahni, Energy density of relic gravity waves from inflation, Physical Review D 42(2), 453–463 (1990). DOI 10.1103/physrevd.42.453. URL http://dx.doi.org/10.1103/PhysRevD.42.453
- [8]P.A.R. Ade, R.W. Aikin, D. Barkats, S.J. Benton, C.A. Bischoff, J.J. Bock, J.A. Brevik, I. Buder, E. Bullock, C.D. Dowell, L. Duband, J.P. Filippini, S. Fliescher, S.R. Golwala, M. Halpern, M. Hasselfield, S.R. Hildebrandt, G.C. Hilton, V.V. Hristov, K.D. Irwin, K.S. Karkare, J.P. Kaufman, B.G. Keating, S.A. Kernasovskiy, J.M. Kovac, C.L. Kuo, E.M. Leitch, M. Lueker, P. Mason, C.B. Netterfield, H.T. Nguyen, R. O’Brien, R.W. Ogburn, A. Orlando, C. Pryke, C.D. Reintsema, S. Richter, R. Schwarz, C.D. Sheehy, Z.K. Staniszewski, R.V. Suidiwala, G.P. Teply, J.E. Tolan, A.D. Turner, A.G. Vieregg, C.L. Wong, K.W. Yoon, Detection of b-mode polarization at degree angular scales by BICEP2, Physical Review Letters 112(24), 241101 (2014). DOI 10.1103/PhysRevLett.112.241101. URL https://doi.org/10.1103/PhysRevLett.112.241101
- [9]P.A.R. Ade, R.W. Aikin, M. Amiri, D. Barkats, S.J. Benton, C.A. Bischoff, J.J. Bock, J.A. Brevik, I. Buder, E. Bullock, C.D. Dowell, L. Duband, J.P. Filippini, S. Fliescher, S.R. Golwala, M. Halpern, M. Hasselfield, S.R. Hildebrandt, G.C. Hilton, K.D. Irwin, K.S. Karkare, J.P. Kaufman, B.G. Keating, S.A. Kernasovskiy, J.M. Kovac, C.L. Kuo, E.M. Leitch, N. Llombart, M. Lueker, C.B. Netterfield, H.T. Nguyen, R. O’Brien, R.W. Ogburn, A. Orlando, C. Pryke, C.D. Reintsema, S. Richter, R. Schwarz, C.D. Sheehy, Z.K. Staniszewski, K.T. Story, R.V. Suidiwala, G.P. Teply, J.E. Tolan, A.D. Turner, A.G. Vieregg, P. Wilson, C.L. Wong, K.W. Yoon, Bicep2 ii. experiment and three-year data set, The Astrophysical Journal 792(1), 62 (2014). DOI 10.1088/0004-637X/792/1/62. URL http://dx.doi.org/10.1088/0004-637X/792/1/62
- [10]P.A.R. Ade et al., Joint analysis of BICEP2/Keck Array and Planck data, Physical Review Letters 114(10), 101301 (2015). DOI 10.1103/PhysRevLett.114.101301. URL https://doi.org/10.1103/PhysRevLett.114.101301
- [11]B.J. Carr, S.W. Hawking, Black holes in the early universe, Monthly Notices of the Royal Astronomical Society 168(2), 399–415 (1974). DOI 10.1093/mnras/168.2.399. URL http://dx.doi.org/10.1093/mnras/168.2.399
- [12]K. Kohri, D.H. Lyth, A. Melchiorri, Black hole formation and slow-roll inflation, Journal of Cosmology and Astroparticle Physics 2008(04), 038 (2008). DOI 10.1088/1475-7516/2008/04/038. URL http://dx.doi.org/10.1088/1475-7516/2008/04/038
- [13]J. García-Bellido, E. Ruiz Morales, Primordial black holes from single field models of inflation, Physics of the Dark Universe 18, 47–54 (2017). DOI 10.1016/j.dark.2017.09.007. URL http://dx.doi.org/10.1016/j.dark.2017.09.007
- [14]O. Özsoy, G. Tasinato, Inflation and primordial black holes, Universe 9(5), 203 (2023). DOI 10.3390/universe9050203. URL http://dx.doi.org/10.3390/universe9050203
- [15]A. Karam, N. Koivunen, E. Tomberg, V. Vaskonen, H. Veermäe, Anatomy of single-field inflationary models for primordial black holes, Journal of Cosmology and Astroparticle Physics 2023(03), 013 (2023). DOI 10.1088/1475-7516/2023/03/013. URL http://dx.doi.org/10.1088/1475-7516/2023/03/013
- [16]A. Escrivà, F. Kühnel, Y. Tada, Primordial black holes (Elsevier, 2024), p. 261–377. DOI 10.1016/b978-0-32-395636-9.00012-8. URL http://dx.doi.org/10.1016/B978-0-32-395636-9.00012-8
- [17]B. Carr, K. Kohri, Y. Sendouda, J. Yokoyama, Constraints on primordial black holes, Reports on Progress in Physics 84(11), 116902 (2021). DOI 10.1088/1361-6633/acle31. URL http://dx.doi.org/10.1088/1361-6633/acle31
- [18]B. Carr, F. Kühnel, Primordial black holes as dark matter candidates, SciPost Physics Lecture Notes (2022). DOI 10.21468/SciPostPhysLectNotes.48. URL http://dx.doi.org/10.21468/SciPostPhysLectNotes.48
- [19]B. Carr, S. Clesse, J. García-Bellido, M. Hawkins, F. Kühnel, Observational evidence for primordial black holes: A positivist perspective, Physics Reports 1054, 1–68 (2024). DOI 10.1016/j.physrep.2023.11.005. URL http://dx.doi.org/10.1016/j.physrep.2023.11.005
- [20]E. Bagui et al., Primordial black holes and their gravitational-wave signatures, Living Rev. Rel. 28(1), 1 (2025). DOI 10.1007/s41114-024-00053-wDOI
- [21]M. Braglia, D.K. Hazra, F. Finelli, G.F. Smoot, L. Sriramkumar, A.A. Starobinsky, Generating pbhs and small- scale gws in two-field models of inflation, Journal of Cosmology and Astroparticle Physics 2020(08), 001–001 (2020). DOI 10.1088/1475-7516/2020/08/001. URL http://dx.doi.org/10.1088/1475-7516/2020/08/001
- [22]G. Ballesteros, M. Taoso, Primordial black hole dark matter from single field inflation, Physical Review D 97(2) (2018). DOI 10.1103/physrevd.97.023501. URL http://dx.doi.org/10.1103/PhysRevD.97.023501
- [23]M. Sasaki, T. Suyama, T. Tanaka, S. Yokoyama, Primordial black holes—perspectives in gravitational wave astronomy, Classical and Quantum Gravity 35(6), 063001 (2018). DOI 10.1088/1361-6382/aaab7b4. URL http://dx.doi.org/10.1088/1361-6382/aaab7b4
- [24]A.M. Green, Primordial black holes as a dark matter candidate - a brief overview, Nuclear Physics B 1003, 116494 (2024). DOI 10.1016/j.nuclphysb.2024.116494. URL http://dx.doi.org/10.1016/j.nuclphysb.2024.116494
- [25]C. Ringeval, The Numerical Treatment of Inflationary Models (Springer Berlin Heidelberg), p. 243–273. DOI 10.1007/978-3-540-74383-8_7. URL http://dx.doi.org/10.1007/978-3-540-74383-8_7
- [26]I. Huston, K.A. Malik, Numerical calculation of second order perturbations, Journal of Cosmology and Astroparticle Physics 2009(09), 019–019 (2009). DOI 10.1088/1475-7516/2009/09/019. URL http://dx.doi.org/10.1088/1475-7516/2009/09/019
- [27]D.K. Hazra, L. Sriramkumar, J. Martin, Bingo: a code for the efficient computation of the scalar bi-spectrum, Journal of Cosmology and Astroparticle Physics 2013(05), 026–026 (2013). DOI 10.1088/1475-7516/2013/05/026. URL http://dx.doi.org/10.1088/1475-7516/2013/05/026
- [28]L. Hergt, F. Agocs, W. Handley, M.P. Hobson, A. Lasenby, Finite inflation in curved space, Physical Review D 106(6) (2022). DOI 10.1103/physrevd.106.063529. URL http://dx.doi.org/10.1103/PhysRevD.106.063529
- [29]S. Bhatt, S.S. Mishra, S. Basak, S.N. Sahoo, Numerical simulations of inflationary dynamics: Slow roll and beyond, SciPost Physics Codebases (2024). DOI 10.21468/scipostphyscodeb.42. URL http://dx.doi.org/10.21468/SciPostPhysCodeb.42
- [30]G. Felder, I. Tkachev, Latticeeasy: A program for lattice simulations of scalar fields in an expanding universe, Computer Physics Communications 178(12), 929–932 (2008). DOI 10.1016/j.cpc.2008.02.009. URL http://dx.doi.org/10.1016/j.cpc.2008.02.009
- [31]D.G. Figueroa, A. Florio, F. Torrenti, W. Valkenburg, CosmoLattice: A modern code for lattice simulations of scalar and gauge field dynamics in an expanding universe, Computer Physics Communications 283, 108586 (2023). DOI 10.1016/j.cpc.2022.108586. URL https://doi.org/10.1016/j.cpc.2022.108586
- [32]D. J. Mulryne, J. W. Ronayne, Pytrans: A python package for the calculation of inflationary correlation functions, Journal of Open Source Software 3(23), 494 (2018). DOI 10.21105/joss.00494. URL http://dx.doi.org/10.21105/joss.00494
- [33]D. Seery, CppTransport: a platform to automate calculation of inflationary correlation functions (2016). DOI 10.5281/zenodo.61239DOI
- [35]P.S. Cole, J. Fumagalli, pbhstat: A python package for calculating the primordial black hole abundance, Universe 11(9), 322 (2025). DOI 10.3390/universe11090322. URL http://dx.doi.org/10.3390/universe11090322
- [36]G. Domenech, Scalar induced gravitational waves review, Universe 7(11), 398 (2021). DOI 10.3390/universe7110398. URL http://dx.doi.org/10.3390/universe7110398
- [37]L.T. Witkowski. Sigwfast: a python package for the computation of scalar-induced gravitational wave spectra (2022). URL https://arxiv.org/abs/2209.05296
- [38]F. Iacovelli, M. Mancarella, S. Foffa, M. Maggiore, Gwfast: A fisher information matrix python code for third-generation gravitational-wave detectors, The Astrophysical Journal Supplement Series 263(1), 2 (2022). DOI 10.3847/1538-4365/ac9129. URL http://dx.doi.org/10.3847/1538-4365/ac9129
- [39]A.I. Renzini, A. Romero-Rodríguez, C. Talbot, M. Lalleman, S. Kandhasamy, K. Turbang, S. Bisovecanu, K. Martinovic, P. Meyers, L. Tuckada, K. Janssens, D. Davis, A. Matas, P. Charlton, G.C. Liu, I. Dvorkin, S. Banagiri, S. Bose, T. Callister, F. De Lillo, L. D’Onofrio, F. Garufi, G. Harry, J. Lawrence, V. Mandic, A. Macquet, I. Michalolakos, S. Mitra, K. Pham, R. Poggiani, T. Regimbau, J.D. Romano, N. van Remortel, H. Zhong, pygwb: A python-based library for gravitational-wave background searches, The Astrophysical Journal 952(1), 25 (2023). DOI 10.3847/1538-4357/acd775. URL http://dx.doi.org/10.3847/1538-4357/acd775
- [40]A.R. Liddle, P. Parsons, J.D. Barrow, Formalizing the slow-roll approximation in inflation, Phys. Rev. D 50, 7222 (1994). DOI 10.1103/PhysRevD.50.7222. URL https://link.aps.org/doi/10.1103/PhysRevD.50.7222DOI
- [41]A. Starobinsky, Dynamics of phase transition in the new inflationary universe scenario and generation of perturbations, Physics Letters B 117(3), 175 (1982). DOI https://doi.org/10.1016/0370-2693(82)90541-X. URL https://www.sciencedirect.com/science/article/pii/037026938290541X
- [42]S. Hawking, The development of irregularities in a single bubble inflationary universe, Physics Letters B 115(4), 295 (1982). DOI https://doi.org/10.1016/0370-2693(82)90373-2. URL https://www.sciencedirect.com/science/article/pii/0370269382903732
- [43]A.H. Guth, S.Y. Pi, Fluctuations in the new inflationary universe, Phys. Rev. Lett. 49, 1110 (1982). DOI 10.1103/PhysRevLett.49.1110. URL https://link.aps.org/doi/10.1103/PhysRevLett.49.1110DOI
- [44]J.M. Bardeen, P.J. Steinhardt, M.S. Turner, Spontaneous creation of almost scale-free density perturbations in an inflationary universe, Phys. Rev. D 28, 679 (1983). DOI 10.1103/PhysRevD.28.679. URL https://link.aps.org/doi/10.1103/PhysRevD.28.679
- [45]V. Mukhanov, H. Feldman, R. Brandenberger, Theory of cosmological perturbations, Physics Reports 215(5), 203 (1992). DOI https://doi.org/10.1016/0370-1573(92)90044-Z. URL https://www.sciencedirect.com/science/article/pii/037015739290044Z
- [46]E.D. Stewart, D.H. Lyth, A more accurate analytic calculation of the spectrum of cosmological perturbations produced during inflation, Physics Letters B 302(2), 171 (1993). DOI https://doi.org/10.1016/0370-2693(93)90379-V. URL https://www.sciencedirect.com/science/article/pii/037026939390379V
- [47]M. Sasaki, E.D. Stewart, A general analytic formula for the spectral index of the density perturbations produced during inflation, Progress of Theoretical Physics 95(1), 71 (1996). DOI 10.1143/PTP.95.71. URL https://doi.org/10.1143/PTP.95.71
- [48]V. Mukhanov, P.J. Steinhardt, Density perturbations in multifield inflationary models, Physics Letters B 422(1), 52 (1998). DOI https://doi.org/10.1016/S0370-2693(98)00032-X. URL https://www.sciencedirect.com/science/article/pii/S037026939800032X
- [49]M. Sasaki, Large scale quantum fluctuations in the inflationary universe, Progress of Theoretical Physics 76(5), 1036–1046 (1986). DOI 10.1143/ptp.76.1036. URL https://dx.doi.org/10.1143/PTP.76.1036
- [50]J. Maldacena, Non-gaussian features of primordial fluctuations in single field inflationary models, Journal of High Energy Physics 2003(05), 013–013 (2003). DOI 10.1088/1126-6708/2003/05/013. URL http://dx.doi.org/10.1088/1126-6708/2003/05/013
- [51]P.A.R. Ade, Z. Ahmed, M. Amiri, D. Barkats, R.B. Thakur, C.A. Bischoff, D. Beck, J.J. Bock, H. Boenish, E. Bullock, V. Buza, J.R. Cheshire, J. Connors, J. Cornelison, M. Crumrine, A. Cukierman, E.V. Denison, M. Dierickx, L. Duband, M. Eiben, S. Fatigoni, J.P. Filippini, S. Fliescher, N. Goeckner-Wald, D.C. Goldfinger, J. Grayson, P. Grimes, G. Hall, G. Halal, M. Halpern, E. Hand, S. Harrison, S. Henderson, S.R. Hildebrandt, G.C. Hilton, J. Hubmayr, H. Hui, K.D. Irwin, J. Kang, K.S. Karkare, E. Karpel, S. Kefeli, S.A. Kernasovskiy, J.M. Kovac, C.L. Kuo, K. Lau, E.M. Leitch, A. Lennox, K.G. Megerian, L. Minutolo, L. Moncelsi, Y. Nakato, T. Namikawa, H.T. Nguyen, R. O’Brien, R.W. Ogburn, S. Palladino, T. Prouve, C. Pryke, B. Racine, C.D. Reintsema, S. Richter, A. Schillaci, R. Schwarz, B.L. Schmitt, C.D. Sheehy, A. Soliman, T.S. Germaine, B. Steinbach, R.V. Sudiwala, G.P. Teply, K.L. Thompson, J.E. Tolan, C. Tucker, A.D. Turner, C. Umiltà, C. Vergès, A.G. Vierregg, A. Wandui, A.C. Weber, D.V. Wiebe, J. Willmert, C.L. Wong, W.L.K. Wu, H. Yang, K.W. Yoon, E. Young, C. Yu, L. Zeng, C. Zhang, S. Zhang, Improved constraints on primordial gravitational waves using planck, wmap, and bicep/keck observations through the 2018 observing season, Phys. Rev. Lett. 127, 151301 (2021). DOI 10.1103/PhysRevLett.127.151301. URL https://link.aps.org/doi/10.1103/PhysRevLett.127.151301DOI
- [52]F. Bezrukov, M. Shaposhnikov, Standard model higgs boson mass from inflation: two loop analysis, Journal of High Energy Physics 2009(07), 089 (2009). DOI 10.1088/1126-6708/2009/07/089. URL https://dx.doi.org/10.1088/1126-6708/2009/07/089
- [53]T. Harada, C.M. Yoo, K. Kohri, Threshold of primordial black hole formation, Physical Review D 88(8) (2013). DOI 10.1103/physrevd.88.084051. URL https://dx.doi.org/10.1103/PhysRevD.88.084051
- [54]I. Hawke, J.M. Stewart, The dynamics of primordial black-hole formation, Classical and Quantum Gravity 19(14), 3687–3707 (2002). DOI 10.1088/0264-9381/19/14/310. URL http://dx.doi.org/10.1088/0264-9381/19/14/310
- [55]T. Nakama, T. Harada, A. Polnarev, J. Yokoyama, Identifying the most crucial parameters of the initial curvature profile for primordial black hole formation, Journal of Cosmology and Astroparticle Physics 2014(01), 037–037 (2014). DOI 10.1088/1475-7516/2014/01/037. URL http://dx.doi.org/10.1088/1475-7516/2014/01/037
- [56]I. Musco, C. Thresheld, Threshold for primordial black holes: Dependence on the shape of the cosmological perturbations, Phys. Rev. D 100, 123524 (2019). DOI 10.1103/PhysRevD.100.123524. URL https://link.aps.org/doi/10.1103/PhysRevD.100.123524DOI
- [57]I. Musco, V. De Luca, G. Franciolini, A. Riotto, Threshold for primordial black holes. ii. a simple analytic prescription, Physical Review D 103(6) (2021). DOI 10.1103/physrevd.103.063538. URL http://dx.doi.org/10.1103/PhysRevD.103.063538
- [58]C. Germani, I. Musco, Abundance of primordial black holes depends on the shape of the inflationary power spectrum, Physical Review Letters 122(14) (2019). DOI 10.1103/physrevlett.122.141302. URL http://dx.doi.org/10.1103/PhysRevLett.122.141302
- [59]A. Escrivà, C. Germani, R.K. Sheth, Universal threshold for primordial black hole formation, Physical Review D 101(4) (2020). DOI 10.1103/physrevd.101.044022. URL http://dx.doi.org/10.1103/PhysRevD.101.044022
- [60]J. Fumagalli, S. Renaux-Petel, J.W. Ronayne, L.T. Witkowski, Turning in the landscape: A new mechanism for generating primordial black holes, Physics Letters B 841, 137921 (2023). DOI 10.1016/j.physletb.2023.137921. URL http://dx.doi.org/10.1016/j.physletb.2023.137921
- [61]G.A. Palma, S. Sypsas, C. Zenteno, Seeding primordial black holes in multifield inflation, Physical Review Letters 125(12) (2020). DOI 10.1103/physrevlett.125.121301. URL http://dx.doi.org/10.1103/PhysRevLett.125.121301
- [62]S.R. Geller, W. Qin, E. McDonough, D.I. Kaiser, Primordial black holes from multifield inflation with nonminimal couplings, Physical Review D 106(6) (2022). DOI 10.1103/physrevd.106.063535. URL http://dx.doi.org/10.1103/PhysRevD.106.063535
- [63]A. Gundhi, S.V. Ketov, C.F. Steinwachs, Primordial black hole dark matter in dilaton-extended two-field starobinsky inflation, Physical Review D 103(8) (2021). DOI 10.1103/physrevd.103.083518. URL http://dx.doi.org/10.1103/PhysRevD.103.083518
- [64]S. Pi, M. Sasaki, Primordial black hole formation in non-minimal curvature scenarios, Physical Review D 108(10) (2023). DOI 10.1103/physrevd.108.1101301. URL http://dx.doi.org/10.1103/PhysRevD.108.L101301
- [65]L. Anguelova, Primordial Black Hole Generation in a Two-Field Inflationary Model (Springer Nature Singapore, 2022), p. 193–202. DOI 10.1007/978-981-19-4751-3_13. URL http://dx.doi.org/10.1007/978-981-19-4751-3_13
- [66]M. Braglia, A. Linde, R. Kallosh, F. Finelli, Hybrid α-attractors, primordial black holes and gravitational wave backgrounds, Journal of Cosmology and Astroparticle Physics 2023(04), 033 (2023). DOI 10.1088/ 1475-7516/2023/04/033. URL http://dx.doi.org/10.1088/1475-7516/2023/04/033
- [67]J.M. Ezquiaga, J. García-Bellido, E. Ruiz Morales, Primordial black hole production in critical higgs inflation, Physics Letters B 776, 345–349 (2018). DOI 10.1016/j.physletb.2017.11.039. URL http://dx.doi.org/10.1016/j.physletb.2017.11.039
- [68]I. Dalianis, A. Kehagias, G. Tringas, Primordial black holes from α-attractors, Journal of Cosmology and Astroparticle Physics 2019(01), 037 (2019). DOI 10.1088/1475-7516/2019/01/037. URL http://dx.doi.org/10.1088/1475-7516/2019/01/037
- [69]S.S. Mishra, V. Sahni, Primordial black holes from a tiny bump/dip in the inflation potential, Journal of Cosmology and Astroparticle Physics 2020(04), 007–007 (2020). DOI 10.1088/1475-7516/2020/04/007. URL http://dx.doi.org/10.1088/1475-7516/2020/04/007
- [70]D. Frolovsky, S.V. Ketov, Production of primordial black holes in improved e-models of inflation, Universe 9(6), 294 (2023). DOI 10.3390/universe9060294. URL http://dx.doi.org/10.3390/universe9060294
- [71]K. Rezazadeh, Z. Teimoori, S. Karimi, K. Karami, Non-gaussianity and secondary gravitational waves from primordial black holes production in α-attractor inflation, The European Physical Journal C 82(8) (2022). DOI 10.1140/epjc/s10052-022-10735-w. URL http://dx.doi.org/10.1140/epjc/s10052-022-10735-w
- [72]Z. Yi, Q. Gao, Y. Gong, Z.h. Zhu, Primordial black holes and scalar-induced secondary gravitational waves from inflationary models with a noncanonical kinetic term, Physical Review D 103(6) (2021). DOI 10.1103/physrevd.103.063534. URL http://dx.doi.org/10.1103/PhysRevD.103.063534
- [73]S. Kawai, J. Kim, Primordial black holes and gravitational waves from nonminimally coupled supergravity inflation, Physical Review D 107(4) (2023). DOI 10.1103/physrevd.107.043523. URL http://dx.doi.org/10.1103/PhysRevD.107.043523
- [74]H. Motohashi, W. Hu, Primordial black holes and slow-roll violation, Physical Review D 96(6) (2017). DOI 10.1103/physrevd.96.063503. URL http://dx.doi.org/10.1103/PhysRevD.96.063503
- [75]H.R. Zhao, Y.C. Liu, J.X. Zhao, N. Li, The evolution of the primordial curvature perturbation in the ultra slow-roll inflation, The European Physical Journal C 83(9) (2023). DOI 10.1140/epjc/s10052-023-11959-0. URL http://dx.doi.org/10.1140/epjc/s10052-023-11959-0
- [76]H. Di, Y. Gong, Primordial black holes and second order gravitational waves from ultra-slow-roll inflation, Journal of Cosmology and Astroparticle Physics 2018(07), 007–007 (2018). DOI 10.1088/1475-7516/2018/07/007. URL http://dx.doi.org/10.1088/1475-7516/2018/07/007
- [77]K. Dimopoulos, Ultra slow-roll inflation demystified, Physics Letters B 775, 262–265 (2017). DOI 10.1016/j.physletb.2017.10.066. URL http://dx.doi.org/10.1016/j.physletb.2017.10.066
- [78]W.H. Kinney, Horizon crossing and inflation with large η, Physical Review D 72(2) (2005). DOI 10.1103/physrevd.72.023515. URL http://dx.doi.org/10.1103/PhysRevD.72.023515
- [79]J. Martin, H. Motohashi, T. Suyama, Ultra slow-roll inflation and the non-gaussianity consistency relation, PhysicalDOI
- [80]W.H. Press, P. Schechter, Formation of galaxies and clusters of galaxies by self-similar gravitational condensation, The Astrophysical Journal 187, 425 (1974). DOI 10.1086/152650. URL http://dx.doi.org/10.1086/152650
- [81]D. Baumann, P. Steinhardt, K. Takahashi, K. Ichiki, Gravitational wave spectrum induced by primordial scalar perturbations, Physical Review D 76(8) (2007). DOI 10.1103/physrevd.76.084019. URL http://dx.doi.org/10.1103/PhysRevD.76.084019
- [82]K.N. Ananda, C. Clarkson, D. Wands, Cosmological gravitational wave background from primordial density perturbations, Physical Review D 75(12) (2007). DOI 10.1103/physrevd.75.123518. URL http://dx.doi.org/10.1103/PhysRevD.75.123518
- [83]K. Inomata, T. Nakama, Gravitational waves induced by scalar perturbations as probes of the small-scale primordial spectrum, Physical Review D 99(4) (2019). DOI 10.1103/physrevd.99.043511. URL http://dx.doi.org/10.1103/PhysRevD.99.043511
- [84]K. Kohri, T. Terada, Semianalytic calculation of gravitational wave spectrum nonlinearly induced from primordial curvature perturbations, Physical Review D 97(12) (2018). DOI 10.1103/physrevd.97.123532. URL http://dx.doi.org/10.1103/PhysRevD.97.123532
- [85]Z.A.e.a. NANOGrav Collaboration, The nanograv 15 yr data set: Evidence for a gravitational-wave background, The Astrophysical Journal Letters 951(1), L8 (2023). DOI 10.3847/2041-8213/acdac6. URL http://dx.doi.org/10.3847/2041-8213/acdac6
- [86]E. Collaboration, I. Collaboration, The second data release from the european pulsar timing array - iii. search for gravitational wave signals, Astronomy & Astrophysics 678, A50 (2023). DOI 10.1051/0004-6361/202346844. URL https://doi.org/10.1051/0004-6361/202346844
- [87]A. Meurer, C.P. Smith, M. Paprocki, O. Čertík, S.B. Kirpichev, M. Rocklin, A. Kumar, S. Ivanov, J.K. Moore, S. Singh, T. Rathnayake, S. Vig, B.E. Granger, R.P. Muller, F. Bonazzi, H. Gupta, S. Vats, F. Johansson, F. Pedregosa, M.J. Curry, A.R. Terrel, v. Roučka, A. Saboo, I. Fernando, S. Kulal, R. Cimmman, A. Scopatz, Sympy: symbolic computing in python, PeerJ Computer Science 3, e103 (2017). DOI 10.7717/peerj-cs.103DOI
- [88]C.R. Harris, K.J. Millman, S.J. van der Walt, R. Gommers, P. Virtanen, D. Cournapeau, E. Burovski, J. Peterson, W. Weckesser, J. Bright, S.J. van der Walt, M. Brett, S. Wilson, J.K. Millman, N. Mayorov, A.R.J. Nelson, E. Jones, R. Kern, E. Larson, C.J. Carey, Í. Polat, Y. Feng, E.W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cîrmmam, I. Henrizen, E.A. Quintero, C.R. Harris, A.M. Archibald, A.H. Ribeiro, F. Pedregosa, P. van Mulbregt, S.. Contributors, Scipy 1.0: fundamental algorithms for scientific computing in python, Nature Methods 17(3), 261 (2020). DOI 10.1038/s41592-019-0686-2
- [89]P. Virtanen, R. Gommers, T.E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S.J. van der Walt, M. Brett, J. Wilson, J.K. Millman, N. Mayorov, A.R.J. Nelson, E. Jones, R. Kern, E. Larson, C.J. Carey, Í. Polat, Y. Feng, E.W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cimrman, I. Henrizen, E.A. Quintero, C.R. Harris, A.M. Archibald, A.H. Ribeiro, F. Pedregosa, P. van Mulbregt, S. Contributors, Scipy 1.0: fundamental algorithms for scientific computing in python, Nature Methods 17(3), 261 (2020). DOI 10.1038/s41592-019-0686-2 S. Kachru, R. Kallosh, A. Linde, S.P. Trivedi, de sitter vacua in string theory, Physical Review D 68(4) (2003). DOI 10.1103/physrevD.68.046005. URL http://dx.doi.org/10.1103/PhysRevD.68.046005
- [91]P.A.S.E.e.a. LISA. Laser interferometer space antenna (2017). URL https://arxiv.org/abs/1702.00786
- [92]R. Kallosh, A. Linde, B-mode targets, Physics Letters B 798, 134970 (2019). DOI 10.1016/j.physletb.2019.134970. URL http://dx.doi.org/10.1016/j.physletb.2019.134970
- [93]V. Atal, J. Garriga, A. Marcos-Caballero, Primordial black hole formation with non-gaussian curvature perturbations, Journal of Cosmology and Astroparticle Physics 2019(09), 073–073 (2019). DOI 10.1088/1475-7516/2019/09/073. URL http://dx.doi.org/10.1088/1475-7516/2019/09/073
- [94]R. Kallosh, A. Linde, Universality class in conformal inflation, Journal of Cosmology and Astroparticle Physics 2013(07), 002–002 (2013). DOI 10.1088/1475-7516/2013/07/002. URL http://dx.doi.org/10.1088/1475-7516/2013/07/002
- [95]R. Kallosh, A. Linde, D. Roest, Superconformal inflationary α-attractors, Journal of High Energy Physics 2013(11) (2013). DOI 10.1007/JHEP11(2013)198. URL http://dx.doi.org/10.1007/JHEP11(2013)198




