use the Friedman-Lemaître-Robertson-Walker (FLRW) metric $ds^2 = a^2(\tau)\eta_{\mu\nu}dx^\mu dx^\nu$ as the background metric.

Gravitational waves {#sec:Inflation}
===================

A tensor-perturbed FLRW metric can be written as $$\begin{aligned}
ds^2=a^2(\tau) \left[d\tau^2-\left(\delta_{ij}+h_{ij}\right)dx^idx^j\right]\,, \label{perturbedmetric}\end{aligned}$$ where we assume the perturbations to be transverse and traceless $\partial_j h_{ij} = h^i_i = 0$, so that they can be identified with gravitational waves (GWs). Expanding the Einstein equations to linear order $O(h)$ gives $$\begin{aligned}
h_{ij}^{\prime\prime}+2\frac{a^{\prime}}{a}h_{ij}^{\prime}-\nabla^2 h_{ij} = 0\,,\label{eomspatial}\end{aligned}$$ where primes denote derivatives with respect to the conformal time $\tau$. To bring to a more useful form, we perform a spatial Fourier- and polarization-mode decomposition $$\begin{aligned}
h_{ij}(\tau,\mathbf{x})&=\sum_{\lambda}\int \frac{d^3\textbf{k}}{(2\pi)^3} e^{i\mathbf{k}.\mathbf{x}} \epsilon_{ij}^\lambda(\mathbf{k})h^\lambda_{\mathbf{k}}(\tau)\,,\end{aligned}$$ where $\lambda = +, \times$ stands for the polarization states and $\epsilon_{ij}^\lambda(\mathbf{k})$ are a basis of polarization tensors satisfying $\epsilon_{ij}^\lambda(\mathbf{k})=\epsilon_{ji}^\lambda(\mathbf{k})$, $\epsilon_{ii}^\lambda(\mathbf{k})=0$, $k_i\epsilon_{ij}^\lambda(\mathbf{k})=0$, $\epsilon_{ij}^\lambda(\mathbf{k})=\epsilon_{ij}^{\lambda^*}(-\mathbf{k})$, and $\epsilon_{ij}^\lambda(\mathbf{k})\epsilon_{ij}^{\sigma^*}(\mathbf{k})=2\delta^{\lambda\sigma}$. These bring us to the GW equation of motion $$\begin{aligned}
h_{k}^{\prime\prime}+2\frac{a^\prime}{a}h_{k}^\prime+k^2h_{k}=0\,, \label{eom}\end{aligned}$$ where we have suppressed the polarization indices $\lambda$, as we assume that the GW spectrum is unpolarized $\left<|h_{\mathbf{k}}^{+}|\right>=\left<|h_{\mathbf{k}}^{\times}|\right> \equiv \left<|h_{\mathbf{k}}|\right>$. Assuming that the background metric is isotropic, we also write $h_k = h_{\mathbf{k}}$, with $k\equiv|\mathbf{k}|$.

A useful quantity to characterize a GW background is the tensor power spectrum $\Delta_h(\tau, k)$, defined through the following relation $$\begin{aligned}
\left<h_{ij}(\tau,\mathbf{x})h^{ij}(\tau,\mathbf{x})\right>&\equiv\int \frac{dk}{k} \Delta_h^2(\tau,k) ~~~~ \Longleftrightarrow ~~~~  
\Delta_h^2(\tau,k)=\frac{2k^3}{\pi^2} 