In the context of atom interferometry, how are $\pi$ and $\frac{\pi}{2}$ pulse generated? First of all, I should probably let you know that my knowledge of Quantum Optics is terribly shallow.
I am studying atom interferometry and I am having trouble understanding what is exactly behind the $\frac{\pi}{2}$ and $\pi$ pulses that commonly appear on diagrams of interferometer setups, as shown below (let's assume that the atoms used are a simple two-level system, the ground being called $\left|\mathrm{red}\right\rangle$ and the excited state $\left| \mathrm{blue} \right\rangle$). 

To be more precise, while I understand (after reading this post How do Rabi oscillations act on the relative phase of state kets) that applying a $r\pi$ pulse means that we apply the following transformation
$$U(r) = e^{-ir\pi X/2} = \begin{pmatrix} \cos(r\pi/2) & -i\sin(r\pi/2) \\ -i\sin(r\pi/2) & \phantom{-i}\cos(r\pi/2)\end{pmatrix}$$
to a statistical ensemble of $\left|\mathrm{red}\right\rangle$ and $\left|\mathrm{blue}\right\rangle$, I do not understand how this is actually done.
Basically, I am searching for a very technical explanation stating how are the lasers operated. Just saying 

We apply a $\frac{\pi}{2}$ pulse to the atomic wave packet, and thus half of the atoms, which were all initially in the $\left| \mathrm{red} \right\rangle$ state, are excited to the $\left|\mathrm{blue} \right\rangle$ state and the two resulting beams are now spatially separated because of the momentum gained when absorbing the photons

doesn't speak to me because I don't understand how you apply a $\frac{\pi}{2}$ pulse, technically speaking.
 A: In general, you apply $r\pi$ pulses by turning on an interaction hamiltonian $H_I$, which couples both states, for long enough (or with a strong enough coupling) to achieve the desired effect.
This builds on the standard representation for the propagator operator under that hamiltonian for a time difference $\Delta t$, which reads $U(\Delta t)=\exp(-i H_I\Delta t/\hbar)$, and which is obviously parallel to the expression $U=e^{-ir\pi X/2}$ you quote. In particular, we use pulses of radiation (lasers or microwaves or whatever is convenient) because they have the hamiltonian
$$\hat H_I=\mathbf E\cdot e\hat{\mathbf r},$$
in the dipole approximation and in the length gauge (and, also, applying the rotating-wave approximation), with $\mathbf E$ the electric field strength and $e\hat{\mathbf r}$ the atomic electric dipole operator. Typically, both eigenstates $\left|\mathrm{red}\right\rangle$ and $\left|\mathrm{blue}\right\rangle$ will have zero intrinsic dipole moment, which means that only the off-diagonal elements of $H_I$ are nonzero, and it is therefore of the form
$$\hat H_I=F\hat X=F\begin{pmatrix}0&1\\1&0\end{pmatrix}.$$
(Note that I'm setting the off-diagonal elements to be real, which I can do (once) by shifting the phase of the basis states. This is what fixes the axis of the $r\pi$ pulse rotation as the $X$ axis, and it can be changed by changing the phase of the laser (which introduces opposite complex phases on the off-diagonal elements, and moves the rotation axis along the $xy$ plane of the Bloch sphere).)
Given the hamiltonian above, you just simply let it run for a set time $\Delta t$, and it gives you a unitary operator
$$
e^{-iF\Delta t X/\hbar} = e^{-ir\pi X/2},
$$
which represents an $r\pi$ pulse with rotation amount
$$
r\pi = \frac{2}{\hbar} F\,\Delta t.
$$
To tune this rotation amount, you can change $\Delta t$ (run the pulse for longer) or $F$ (use a stronger pulse), and depending on experimental conditions you might choose either of them.
A: In the context of atom interferometry, the tool usually (always?) used for these manipulations is simulated Raman transitions*. These are two photon transitions, which are very versatile: one tunes the difference between the two laser frequencies to be resonant to the energy difference between two states to couple them, and the momentum difference between a photon in each beam determines the momentum kick given to the atoms.
So, in your diagram, what actually happens at the $\pi/2$ or $\pi$ pulses is that two lasers are turned on, for the time that corresponds to a partial or full transition as Emilio has described. The lasers will have some nonzero angle between them, which causes a momentum kick, and are tuned to the frequency different between the ground and excited state. As a result, the states $|g,k\rangle$ and $|e, k+\delta k\rangle$ are coupled, where the first quantum number is the internal state of the atom and the second one is its momentum.
Some further reading: a important PRL about the technique, and many papers on Stimulated Raman adiabatic passage (STIRAP), which is a slight variation on the same idea.
*in the case in which the internal state does not change, essentially the same process is called "Bragg scattering."
