  Reaching high speed, high fidelity qubit operations requires precise control
over the shape of the underlying pulses. For weakly anharmonic systems, such as
superconducting transmon qubits, short gates lead to leakage to states outside
of the computational subspace. Control pulses designed with open-loop optimal
control may reduce such leakage. However, model inaccuracies can severely limit
the usability of such pulses. We implemented a closed-loop optimization that
simultaneously adapts all control parameters based on measurements of a cost
function built from Clifford gates. By parameterizing pulses with a
piecewise-constant representation that matches the capabilities of the control
hardware we create a $4.16~\rm{ns}$ single-qubit pulse with $99.76\,\%$
fidelity and $0.044\,\%$ leakage. This is a seven-fold reduction of the leakage
rate of the best DRAG pulse we have calibrated at such short durations on the
same system.
