High-Fidelity Software-Defined Quantum Logic on a Superconducting Qudit.