  Atoms are ideal quantum sensors and quantum light emitters. Interfacing atoms
with nanophotonic devices promises novel nanoscale sensing and quantum optical
functionalities. But precise optical control of atomic states in these devices
is challenged by the spatially varying light-atom coupling strength, generic to
nanophotonic. We demonstrate numerically that despite the inhomogenuity,
composite picosecond optical pulses with optimally tailored phases are able to
evanescently control the atomic electric dipole transitions nearly perfectly,
with $f>99\%$ fidelity across large enough volumes for {\it e.g.} controlling
cold atoms confined in near-field optical lattices. Our proposal is followed by
a proof-of-principle demonstration with a $^{85}$Rb vapor -- optical nanofiber
interface, where the excitation by an $N=3$ sequence of guided picosecond D1
control reduces the absorption of a co-guided nanosecond D2 probe by up to
$\sim70\%$. The close-to-ideal performance is corroborated by comparing the
absorption data across the parameter space with first-principle modeling of the
mesoscopic atomic vapor response. Extension of the composite technique to
$N\geq 5$ appears highly feasible to support arbitrary local control of atomic
dipoles with exquisite precision. This unprecedented ability would allow
error-resilient atomic spectroscopy and open up novel nonlinear quantum optical
research with atom-nanophotonic interfaces.
