  We give an algorithm for $\ell_2/\ell_2$ sparse recovery from Fourier
measurements using $O(k\log N)$ samples, matching the lower bound of
\cite{DIPW} for non-adaptive algorithms up to constant factors for any $k\leq
N^{1-\delta}$. The algorithm runs in $\tilde O(N)$ time. Our algorithm extends
to higher dimensions, leading to sample complexity of $O_d(k\log N)$, which is
optimal up to constant factors for any $d=O(1)$. These are the first sample
optimal algorithms for these problems.
  A preliminary experimental evaluation indicates that our algorithm has
empirical sampling complexity comparable to that of other recovery methods
known in the literature, while providing strong provable guarantees on the
recovery quality.
