Pontryagin's Maximum principle (PMP) [1]}, [2]}, [3]} is an optimal control technique that has been used successfully to find time-optimal [4]}, [5]}, [6]}, [7]} or robust [8]} quantum gates, and to optimize variational quantum algorithms [9]}. The PMP is an analytic principle that gives a set of necessary conditions that optimal pulses have to satisfy, thereby allowing to reduce the infinite dimensional control landscape to a low-dimensional space [8]}. In contrast to GRAPE, which usually uses several hundreds of variational parameters, the PMP can therefore describe optimal pulses with just a handful of parameters. On the downside, the PMP does not provide a universal algorithm to find the parameters leading to the optimal pulse. In Sec.  we will combine GRAPE and the PMP to describe the pulses found by GRAPE using the PMP with just 4 parameters for the CZ and 6 parameters for the C\(_2\) Z gate.
