First of all, its helpful to appreciate what the induvial parts of the Fourier transform expression do. One important thing to realise is that for a single Fourier coefficient (F(Q) evaluated at one value (frequency) of Q) we must evaluate the entire real space function that we wish to sample (in this case the electron density p(r), at all possible values of r) .