  We establish inequalities on vertical Littlewood--Paley square functions for
heat flows in the weighted $L^2$ space over metric measure spaces satisfying
the $\RCD^\ast(0,N)$ condition with $N\in [1,\infty)$ and the maximum volume
growth assumption. In the noncompact setting, the later assumption can be
removed by showing that the volume of the ball growths at least linearly. The
estimates are sharp on the growth of the 2-heat weight and the 2-Muckenhoupt
weight considered. The $p$-Muckenhoupt weight and the $p$-heat weight are also
compared for all $p\in(1,\infty)$.
