C++ implementation of the 3-point function transport framework for inflationary cosmology
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Build Status: experimental


CppTransport is an automated platform that can be used to solve for the 2- and 3-point functions of the perturbations produced during an inflationary epoch in the very early universe. The present version can accommodate models with an arbitrary field-space metric and arbitrary potential, including models with canonical kinetic terms as a special case. It does not yet support more general models where the Lagrangian is an arbitrary function of the kinetic energies and field values. For example, the well-studied Dirac-Born-Infeld model is of this type.

Future versions of CppTransport may include support for these generalizations. If you would like to contribute to this effort then any patches, corrections or enhancements are very welcome. The best way to start is to fork this repository and submit enhancements via pull requests.

The numerical results produced by CppTransport are accurate to tree-level, including all quantum effects. In particular this includes:

  • effects generated by interference between growing and decaying modes near horizon exit
  • effects generated by a nontrivial mass hierarchy, correctly accounting for modes that are heavy or light compared to the inflationary scale
  • particle production due to time-varying masses
  • effects from trajectory bending and species correlation near horizon exit
  • superhorizon evolution of the perturbations

The limitations of the tree-level calculation are discussed more explicitly in the technical methods paper referenced below. If you are studying a non-standard scenario, particularly one where the curvature perturbation is generated by decay of other particles, then it is advisable to check that your scenario can be handled by tree-level methods. This is not the same as checking that each relevant S-matrix process is individually well-described by a tree-level calculation.

The present version of CppTransport has been written by David Seery at the University of Sussex with contributions from Sean Butchers. It implements a formalism developed by Mafalda Dias, Jonathan Frazer, David Mulryne and David Seery.

A number of different tools implementing the same formalism, but with slightly different design goals, have been developed. These include a Python platform and a Mathematica platform. These tools can be obtained from their respective GitHub repositories, or are available from transportmethod.com.


The current release of CppTransport is 2018.1 (23 February 2018). This release can be identified via a DOI linking to a deposit at zenodo.org. The same .tar.gz archives for each release are also available directly from GitHub, but for citations please use the zenodo.org versions.

Upgrading repositories from 2016.3 and earlier

Version 2018.1 introduces a small change in the repository database. This is backwards compatible: it is generally possible to use repositories from <= 2016.3 with >= 2018.1, and vice-versa, except for generating HTML reports. In this case, CppTransport versions 2018.1 and above will produce an error:

SQLite error: no such column: cpu_brand

To fix this you should upgrade your repositories to the new format. As explained above, they will remain compatible with older versions of CppTransport. To upgrade, simply run a CppTransport with the --upgrade flag:

./dquad -v -r <repo name> --upgrade

This is a one-time operation; it does not need to be done again. If you enabled verbose output using -v then you will see a list of notifications when CppTransport finds a data container that requires conversion:

Upgrading data container '.../20160421T020324/data.sqlite'


CppTransport is distributed under the GNU General Public License version 2, or (at your option) any later version. This license is bundled with the source code as LICENSE.txt.

The CppTransport platform depends on, or incorporates, portions of other open source projects. For details, see the file NOTICE.txt.

Examples and cookbook

An extensive worked example of double-quadratic inflation is included in the user guide.

Alternatively, the C++ codes and model description files required to reproduce the plots in Dias et al. (2016) are available in a separate GitHub repository.

Some examples and cookbook-style snippets for common tasks are collected on the Wiki.

How to cite CppTransport

Further development of CppTransport depends on demonstrating its usefulness to funding agencies. If you use CppTransport to produce numerical results supporting your research, then we would appreciate a citation to the main technical reference:

  • Numerical evaluation of the bispectrum in multiple-field inflation, Mafalda Dias, Jonathan Frazer, David Mulryne and David Seery. arXiv:1609.00379

The CppTransport platform itself can be cited using the DOI for the 2016.3 user guide:

Original literature

The use of evolution equations to compute n-point functions synthesized during an inflationary epoch (including all quantum effects) was described in:

Concrete numerical details are described in the paper Numerical evaluation of the bispectrum in multiple-field inflation listed above, or were first given for the two-point function in:

A full list of references is given in the CppTransport documentation, or can be found at transportmethod.com.


Development of the CppTransport platform was supported between October 2012 and September 2017 by the grant Precision tests of the inflationary scenario, funded by the European Union’s Seventh Framework Programme (FP/2007–2013) and ERC Grant Agreement No. 308082.

Some development has been supported by other sources, including:

  • The UK Science and Technology Facilities Council via grants ST/I000976/1, ST/L000652/1 and ST/P000525/1 which funded the science programme at the University of Sussex Astronomy Centre between April 2011 abd March 2020.

  • The Leverhulme Trust via a Philip Leverhulme Prize.

  • The National Science Foundation Grant No. PHYS-1066293 and the hospitality of the Aspen Center for Physics.

  • The hospitality of the Higgs Centre for Theoretical Physics at the University of Edinburgh, and the Centre for Astronomy & Particle Physics at the University of Nottingham.