  We study the $L^2$ gradient flow of the Yang--Mills functional on the space
of connection 1-forms on a principal $G$-bundle over the sphere $S^2$ from the
perspective of Morse theory. The resulting Morse homology is compared to the
heat flow homology of the space $\Omega G$ of based loops in the compact Lie
group $G$. An isomorphism between these two Morse homologies is obtained by
coupling a perturbed version of the Yang--Mills gradient flow with the $L^2$
gradient flow of the classical action functional on loops. Our result gives a
positive answer to a question due to Atiyah.
