  We show that the quantum Cram\'er-Rao bound on the precision of measurements
of the optical phase gradient, or the wavefront tilt, with a beam of finite
width is consistent with the Heisenberg uncertainty principle for a
single-photon state, and is a factor of 2 better for the two-photon state that
is maximally entangled. This fundamental bound governs a trade-off between
quantum sensitivity and spatial resolution. Precision bounds based on a
structured configuration using binary projective measurements implemented by an
image-inversion interferometer, are higher, and the two-photon factor of 2
advantage is lost for large beam width or large phase gradient. In all cases,
estimation of the phase gradient is compatible with estimation of the phase,
allowing for optimal joint estimation of both parameters simultaneously.
