  The task of wavefront sensing is to measure the phase of the optical field.
Here, we demonstrate that the widely used Shack-Hartmann wavefront sensor
detects the weak value of transverse momentum, usually achieved by the method
of quantum weak measurement. We extend its input states to partially coherent
states and compare it with the weak measurement wavefront sensor, which has a
higher spatial resolution but a smaller dynamic range. Since weak values are
commonly used in investigating fundamental quantum physics and quantum
metrology, our work would find essential applications in these fields.
