Teaching optimal control theory to distill robust pulses even under experimental constraints