  The selective number-dependent arbitrary phase (SNAP) gates form a powerful
class of quantum gates, imparting arbitrarily chosen phases to the Fock modes
of a cavity. However, for short pulses, coherent errors limit the performance.
Here we demonstrate in theory and experiment that such errors can be completely
suppressed, provided that the pulse times exceed a specific limit. The
resulting shorter gate times also reduce incoherent errors. Our approach needs
only a small number of frequency components, the resulting pulses can be
interpreted easily, and it is compatible with fault-tolerant schemes.
