  We report on the realization of a quantum sensor based on trapped atom
interferometry in an optical lattice for the measurement of atom-surface
interactions, with sub-micrometer-level control of the mean atom-surface
separation distance. The force sensor reaches a short-term sensitivity of 3.4 x
10 --28 N at 1 s and a long-term stability of 4 qN (4 x 10 --30 N). We perform
force measurements in the 0-300 $\mu$m range, and despite significant stray
forces caused by adsorbed atoms on the surface, we obtain evidence of the
Casimir-Polder force. Short-range forces are one of the many frontiers of
modern physics [1, 2]. In the submillimeter scales, quantum electrodynamics
(QED) interactions are dominant, and give rise in the case of atom-surface
interactions to the Casimir-Polder force [3]. Since the first highlight of this
force [4], several different methods [5] have been able to bring out
Casimir-Polder forces, notably by measuring the transmission of an atomic beam
through a micronsized cavity [6], diffracting matter waves on a surface [7] or
performing spectroscopy in vapor cells [8, 9]. However these approaches have
struggled to achieve the high measurement sensitivity required to detect the
very weak forces involved all while maintaining a good understanding of the
setup geometry, particularly the distance separating atoms from the surface.
Few experiments have achieved measuring Casimir-Polder forces while controlling
directly the atom-surface distance. In the range from tens to hundreds of
nanometers, the Casimir-Polder potential was measured directly by reflecting
the atoms on an evanescent field [10, 11]. In
