  The fidelity of certain gates on noisy quantum computers may be improved when
they are implemented using more than two levels of the involved transmons. The
main impediments to achieving this potential are the dynamic gate phase errors
that cannot be corrected via calibration. The standard tool for countering such
phase errors in two-level qubits is the echo protocol, often referred to as the
dynamical decoupling sequence, where the evolution of a qubit is punctuated by
an even number of X gates. We introduce basis cycling, which is a direct
generalization of the qubit echo to general qudits, and provide an analytic
framework for designing gate sequences to produce desired effects using this
technique. We then apply basis cycling to a Toffoli gate decomposition
incorporating a qutrit and obtain CCZ gate fidelity values up to 93.8$\pm$0.1%,
measured by quantum process tomography, on IBM quantum computers. The gate
fidelity remains stable without recalibration even while the resonant frequency
of the qutrit fluctuates, highlighting the dynamical nature of phase error
cancellation through basis cycling. Our results demonstrate that one of the
biggest difficulties in implementing qudit-based gate decompositions on
superconducting quantum computers can be systematically overcome when certain
conditions are met, and thus open a path toward fulfilling the promise of
qudits as circuit optimization agents.
