How to typeset a variable like:

Whether do I write $\hat{A}\vphantom{A}_0$ or simply write $\hat{A}_0$? (I had seen the former in a template).
BTW, what about $f'^2$? Is $f^{\prime2}$ or $f^{\prime\,2}$ or ${f^{\prime}}^2$ or $f^{\prime}\vphantom{f}^2$?