Abstract
Efficient optimization of quantum systems is a necessity for reaching fault tolerant thresholds. A standard tool for optimizing simulated quantum dynamics is the gradient-based \textsc{grape} algorithm, which has been successfully applied in a wide range of different branches of quantum physics. In this work, we derive and implement exact order analytical derivatives of the coherent dynamics and find improvements compared to the standard of optimizing with the approximate order \textsc{bfgs}. We demonstrate performance improvements for both the best and average errors of constrained unitary gate synthesis on a circuit-\textsc{qed} system over a broad range of different gate durations.