  Ultra fast and accurate quantum operations are required in many modern
scientific areas - for instance quantum information, quantum metrology and
magnetometry. However the accuracy is limited if the Rabi frequency is
comparable with the transition frequency due to the breakdown of the rotating
wave approximation (RWA). Here we report the experimental implementation of a
method based on optimal control theory, which does not suffer these
restrictions. We realised the most commonly used quantum gates - the Hadamard
(\pi/2 pulse) and NOT (\pi pulse) gates with fidelities
($F^{\mathrm{exp}}_{\pi/2}=0.9472\pm0.01$ and
$F^{\mathrm{exp}}_{\pi}=0.993\pm0.016$), in an excellent agreement with the
theoretical predictions ($F^{\mathrm{theory}}_{\pi/2}=0.9545$ and
$F^{\mathrm{theory}}_{\pi}=0.9986$). Moreover, we demonstrate magnetic
resonance experiments both in the rotating and lab frames and we can
deliberately "switch" between these two frames. Since our technique is general,
it could find a wide application in magnetic resonance, quantum computing,
quantum optics and broadband magnetometry.
