  This paper gives a systematic study of Sobolev, Besov and Triebel-Lizorkin
spaces on a noncommutative $d$-torus $\mathbb{T}^d_\theta$ (with $\theta$ a
skew symmetric real $d\times d$-matrix). These spaces share many properties
with their classical counterparts. We prove, among other basic properties, the
lifting theorem for all these spaces and a Poincar\'e type inequality for
Sobolev spaces. We also show that the Sobolev space
$W^k_\infty(\mathbb{T}^d_\theta)$ coincides with the Lipschitz space of order
$k$, already studied by Weaver in the case $k=1$. We establish the embedding
inequalities of all these spaces, including the Besov and Sobolev embedding
theorems. We obtain Littlewood-Paley type characterizations for Besov and
Triebel-Lizorkin spaces in a general way, as well as the concrete ones in terms
of the Poisson, heat semigroups and differences. Some of them are new even in
the commutative case, for instance, our Poisson semigroup characterizations
improve the classical ones. As a consequence of the characterization of the
Besov spaces by differences, we extend to the quantum setting the recent
results of Bourgain-Br\'ezis -Mironescu and Maz'ya-Shaposhnikova on the limits
of Besov norms. The same characterization implies that the Besov space
$B^\alpha_{\infty,\infty}(\mathbb{T}^d_\theta)$ for $\alpha>0$ is the quantum
analogue of the usual Zygmund class of order $\alpha$. We investigate the
interpolation of all these spaces, in particular, determine explicitly the
K-functional of the couple $(L_p(\mathbb{T}^d_\theta), \,
W^k_p(\mathbb{T}^d_\theta))$, which is the quantum analogue of a classical
result due to Johnen and Scherer. Finally, we show that the completely bounded
Fourier multipliers on all these spaces do not depend on the matrix $\theta$,
so coincide with those on the corresponding spaces on the usual $d$-torus.
