  We provide a new quantum algorithm that efficiently determines the quality of
a least-squares fit over an exponentially large data set by building upon an
algorithm for solving systems of linear equations efficiently (Harrow et al.,
Phys. Rev. Lett. {\bf 103}, 150502 (2009)). In many cases, our algorithm can
also efficiently find a concise function that approximates the data to be
fitted and bound the approximation error. In cases where the input data is a
pure quantum state, the algorithm can be used to provide an efficient
parametric estimation of the quantum state and therefore can be applied as an
alternative to full quantum state tomography given a fault tolerant quantum
computer.
