  The classic self-referenced frequency comb acts as an unrivaled ruler for
precision optical metrology in both time and frequency. Two decades after its
invention, the frequency comb is now used in numerous active sensing
applications. Many of these applications, however, are limited by the tradeoffs
inherent in the rigidity of the comb output and operate far from
quantum-limited sensitivity. Here we demonstrate an agile programmable
frequency comb where the pulse time and phase are digitally controlled with +/-
2 attosecond accuracy. This agility enables quantum-limited sensitivity in
sensing applications since the programmable comb can be configured to
coherently track weak returning pulse trains at the shot-noise limit. To
highlight its capabilities, we use this programmable comb in a ranging system,
reducing the detection threshold by ~5,000-fold to enable nearly
quantum-limited ranging at mean pulse photon number of 1/77 while retaining the
full accuracy and precision of a rigid frequency comb. Beyond ranging and
imaging, applications in time/frequency metrology, comb-based spectroscopy,
pump-probe experiments, and compressive sensing should benefit from coherent
control of the comb-pulse time and phase.
