  Unlike well-established parameter estimation, function estimation faces
conceptual and mathematical difficulties despite its enormous potential
utility. We establish the fundamental error bounds on function estimation in
quantum metrology for a spatially varying phase operator, where various degrees
of smooth functions are considered. The error bounds are identified in both
cases of absence and presence of interparticle entanglement, which correspond
to the standard quantum limit and the Heisenberg limit, respectively. Notably,
these error bounds can be reached by either position-localized states or
wavenumber-localized ones. In fact, we show that these error bounds are
theoretically optimal for any type of probe states, indicating that quantum
metrology on functions is also subject to the Nyquist-Shannon sampling theorem,
even if classical detection is replaced by quantum measurement.
