  Let $\Theta=(\theta_{jk})_{n\times n}$ be a real skew-symmetric $n\times n$
matrix for $n\geq 2$. Under some mild non-integrality conditions on $\Theta,$
we construct Rieffel-type projections as higher dimensional Bott classes in the
$n$-dimensional noncommutative torus $\mathcal{A}_{\Theta}.$ These projections
generate $\operatorname{K}_0(\mathcal{A}_\Theta)$ when $\Theta$ is strongly
totally irrational. As an application, when $\Theta$ is strongly totally
irrational, we show that: For any $\varepsilon>0,$ there exists $\delta>0$
(depending only on $\varepsilon$ and $\Theta$) satisfying the following: For
any unital simple separable $C^*$-algebra $\mathcal{A}$ with tracial rank at
most one, and for any $n$-tuple of unitaries $u_1,u_2,\dots,u_n$ in
$\mathcal{A}$, if $u_1,u_2,\dots,u_n$ satisfy certain trace conditions and
  \begin{eqnarray*}\|u_ku_j-e^{2\pi
i\theta_{jk}}u_ju_k\|<\delta,\,j,k=1,2,\dots,n,
  \end{eqnarray*} then there exists an $n$-tuple of unitaries
$\tilde{u}_1,\tilde{u}_2,\dots,\tilde{u}_n$ in $\mathcal{A}$ such that
  \begin{eqnarray*}\tilde{u}_k\tilde{u}_j=e^{2\pi
i\theta_{jk}}\tilde{u}_j\tilde{u}_k\, {\rm and}\,
\|\tilde{u}_j-u_j\|<\varepsilon,\, j,k=1,2,\dots,n.
  \end{eqnarray*}
  We also show that these trace conditions are also necessary in the above
application.
