  We present a quantum Monte Carlo study of a Heisenberg antiferromagnet on a
spatially anisotropic square lattice, where the coupling strength in the
x-direction ($J_x$) is different from that in the y-direction ($J_y$). By
varying the anisotropy $\alpha$ from 0 to 1, we interpolate between the
one-dimensional chain and the two-dimensional isotropic square lattice. Both
$S=1/2$ and S=1 systems are considered separately in order to facilitate
comparison. The temperature dependence of the uniform susceptibility and the
spin-spin correlation length are computed down to very low temperatures for
various values of $\alpha$. For S=1, the existence of a quantum critical point
at $\alpha^{S=1}_c=0.040(5)$ as well as the scaling of the spin gap is
confirmed. Universal quantities predicted from the ${\cal O}(3)$ nonlinear
$\sigma$ model agree with our results at $\alpha=0.04$ without any adjustable
parameters. On the other hand, the $S=1/2$ results are consistent with
$\alpha^{S=1/2}_c=0$, as discussed by a number of previous theoretical studies.
Experimental implications for $S=1/2$ compounds such as Sr$_2$CuO$_3$ are also
discussed.
