  The quantum anomalous Hall effect (QAHE) and magnetic Weyl semimetals (WSMs)
are topological states induced by intrinsic magnetic moments and spin-orbit
coupling. Their similarity suggests the possibility of achieving the QAHE by
dimensional confinement of a magnetic WSM along one direction. In this study,
we investigate the emergence of the QAHE in the two-dimensional (2D) limit of
magnetic WSMs due to finite size effects in thin films and step-edges. We
demonstrate the feasibility of this approach with effective models and real
materials. To this end, we have chosen the layered magnetic WSM
Co$_3$Sn$_2$S$_2$, which features a large anomalous Hall conductivity and
anomalous Hall angle in its 3D bulk, as our material candidate. In the 2D limit
of Co$_3$Sn$_2$S$_2$ two QAHE states exist depending on the stoichiometry of
the 2D layer. One is a semimetal with a Chern number of 6, and the other is an
insulator with a Chern number of 3. The latter has a band gap of 0.05 eV, which
is much larger than that in magnetically doped topological insulators. Our
findings naturally explain the existence of chiral states in step edges of bulk
Co$_3$Sn$_2$S$_2$ which habe been reported in a recent experiment at $T = 4K$
and present a realistic avenue to realize QAH states in thin films of magnetic
WSMs.
