  An intrinsic measure of the quality of a variational wave function is given
by its overlap with the ground state of the system. We derive a general formula
to compute this overlap when quantum dynamics in imaginary time is accessible.
The overlap is simply related to the area under the $E(\tau)$ curve, i.e. the
energy as a function of imaginary time. This has important applications to, for
example, quantum Monte-Carlo algorithms where the overlap becomes as a simple
byproduct of routine simulations. As a result, we find that the practical
definition of a good variational wave function for quantum Monte-Carlo
simulations, {\it i.e.} fast convergence to the ground state, is equivalent to
a good overlap with the actual ground state of the system.
