A method for implementing a unitary quantum gate on one or more qubits, the method comprising: designing, using a classical computer, a control pulse for the unitary quantum gate, comprising: defining a universal quantum control cost function, wherein the control cost function comprises: a qubit leakage penalty term based on a time-dependent Schrieffer Wolff transformation and comprising i) a first leakage bound representing coherent qubit leakage, wherein coherent qubit leakage results from direct coupling between computational energy states and higher energy states of a respective qubit, and ii) a second leakage bound representing incoherent qubit leakage across all frequency components during a time dependent Hamiltonian evolution that realizes the unitary quantum gate, wherein the second leakage bound is formulated through a generalized adiabatic theorem and wherein incoherent leakage results from violation of adiabaticity during a time dependent Hamiltonian evolution; a gate fidelity penalty term; and a total runtime penalty term; and adjusting parameters of the time dependent Hamiltonian evolution using optimization techniques to vary a control cost according to the control cost function such that leakage errors are reduced; generating, by a quantum device comprising one or more qubits, the control pulse using the adjusted parameters; and applying, by the quantum device, the control pulse to the one or more qubits to implement the unitary quantum gate, wherein the one or more qubits comprise a computational subspace and one or more non-computational subspaces, and wherein each qubit energy subspace is separated from other qubit energy subspaces by an energy gap that is larger than intra-subspace couplings. designing, using a classical computer, a control pulse for the unitary quantum gate, comprising: defining a universal quantum control cost function, wherein the control cost function comprises: a qubit leakage penalty term based on a time-dependent Schrieffer Wolff transformation and comprising i) a first leakage bound representing coherent qubit leakage, wherein coherent qubit leakage results from direct coupling between computational energy states and higher energy states of a respective qubit, and ii) a second leakage bound representing incoherent qubit leakage across all frequency components during a time dependent Hamiltonian evolution that realizes the unitary quantum gate, wherein the second leakage bound is formulated through a generalized adiabatic theorem and wherein incoherent leakage results from violation of adiabaticity during a time dependent Hamiltonian evolution; a gate fidelity penalty term; and a total runtime penalty term; and adjusting parameters of the time dependent Hamiltonian evolution using optimization techniques to vary a control cost according to the control cost function such that leakage errors are reduced; defining a universal quantum control cost function, wherein the control cost function comprises: a qubit leakage penalty term based on a time-dependent Schrieffer Wolff transformation and comprising i) a first leakage bound representing coherent qubit leakage, wherein coherent qubit leakage results from direct coupling between computational energy states and higher energy states of a respective qubit, and ii) a second leakage bound representing incoherent qubit leakage across all frequency components during a time dependent Hamiltonian evolution that realizes the unitary quantum gate, wherein the second leakage bound is formulated through a generalized adiabatic theorem and wherein incoherent leakage results from violation of adiabaticity during a time dependent Hamiltonian evolution; a gate fidelity penalty term; and a total runtime penalty term; and a qubit leakage penalty term based on a time-dependent Schrieffer Wolff transformation and comprising i) a first leakage bound representing coherent qubit leakage, wherein coherent qubit leakage results from direct coupling between computational energy states and higher energy states of a respective qubit, and ii) a second leakage bound representing incoherent qubit leakage across all frequency components during a time dependent Hamiltonian evolution that realizes the unitary quantum gate, wherein the second leakage bound is formulated through a generalized adiabatic theorem and wherein incoherent leakage results from violation of adiabaticity during a time dependent Hamiltonian evolution; a gate fidelity penalty term; and a total runtime penalty term; and adjusting parameters of the time dependent Hamiltonian evolution using optimization techniques to vary a control cost according to the control cost function such that leakage errors are reduced; generating, by a quantum device comprising one or more qubits, the control pulse using the adjusted parameters; and applying, by the quantum device, the control pulse to the one or more qubits to implement the unitary quantum gate, wherein the one or more qubits comprise a computational subspace and one or more non-computational subspaces, and wherein each qubit energy subspace is separated from other qubit energy subspaces by an energy gap that is larger than intra-subspace couplings.