  The compiling of quantum gates is crucial for the successful quantum
algorithm implementations. The environmental noise as well as the bandwidth of
control pulses pose a challenge to precise and fast qubit control, especially
in a weakly anharmonic system. In this work, we propose an algorithm to
approximately compile single-qubit gates with arbitrary accuracy. Evaluation
results show that the overall rotation distance generated by our algorithm is
significantly shorter than the commonly used $U3$ gate, then the gate time can
be effectively shortened. The requisite number of pulses and the runtime of
scheme design scale up as $\mathcal{O}[\mathrm{Log}(1/\epsilon)]$ with very
small prefactors, indicating low overhead costs. Moreover, we explore the
trade-off between effectiveness and cost, and find a balance point. In short,
our work opens a new avenue for efficient quantum algorithm implementations
with contemporary quantum technology.
