We study the projection of the left-invariant sub-Riemannian structure on the 3D Heisenberg group $G$ to the Heisenberg 3D nil-manifold~$M$ — the compact homogeneous space of $G$ by the discrete Heisenberg group.
First we describe dynamical properties of the geodesic flow for $M$: periodic and dense orbits, a dynamical characterization of the normal Hamiltonian flow of Pontryagin maximum principle and its integrability properties.
We show that it is Liouville integrable on a nonzero level hypersurface $\Sigma$ of the Hamiltonian outside an appropriate smaller proper hypersurface in $\Sigma$ and has no nontrivial analytic integrals
on all of $\Sigma$. Then we obtain sharp twoside bounds of sub-Riemannian balls and distance in~$G$, and on this basis we estimate the cut time for sub-Riemannian geodesics in $M$.

