Almost periodic function vs quasi periodic function I am doing some work regarding quasiperiodic functions but I am not able to figure out the difference between almost periodic and quasiperiodic functions. Can anyone let me know about it?
 A: I am just a master student writing a thesis in that direction, but maybe you find it helpful nonetheless.
One can show that the Bohr almost-periodic functions are the closure of the trigonometric functions in the supremum norm, i.e.
$$ \mathcal{A}:= \overline{\{ \sum_{1\leq j \leq n} a_i e^{i \nu_j x} : n \in \mathbb{N}, a_i\in \mathbb{R}\}}^{(C_b(\mathbb{R}, \mathbb{C}), \Vert \cdot\Vert_{sup})} .$$
Intuitively the difference is that the "Fourier series of a quasi-periodic function contains less independent frequencies than a general almost-periodic function".
On the space of Bohr almost-periodic function we have the following sesquilinear form:
$$ \langle f, g\rangle = \lim_{x\rightarrow \infty} \frac{1}{x} \int_{0}^x f(t)\overline{g(t)}dt. $$
The frequency module $M(f)$  (the $\mathbb{Z}$-module of all frequencies that may appear in the formal Fourier series of $f$) is defined the $\mathbb{Z}$-module generated by
$$ \{ \nu\in \mathbb{R} : \langle f, e^{i\nu x}\rangle\neq 0\}.$$
We call $f$ quasi-periodic if its frequency module is finitely generated over $\mathbb{Z}$. For example, a function is periodic iff its frequency module is generated by single frequency.
There is an alternative characterization of quasi-periodic functions. Namely, $f$ is quasi-periodic if there exist a continuous map $Q:\mathbb{T}^n \rightarrow \mathbb{C}$ and a "frequency vector" $\omega=(\omega_j)_{j=1}^n$ such that $f(x)=Q(x\cdot \omega)=Q(x\omega_1, \dots, x\cdot \omega_n)$. Hence, the motion of the quasi-periodic function "lives on a finite dimensional torus".
E.g.
$$ f(x)= \sin\left(\frac{2}{7}2\pi x\right) + \sin(\sqrt{2}\cdot 2\pi x) $$
has frequency module $\{ \frac{7}{2}k + \frac{1}{\sqrt{2}}l : k, l \in \mathbb{Z} \}$ and "lives on a 2-dimensional torus". Where a general almost-periodic function can be thought of "living on an infinite-dimension torus".
