Free-time and fixed end-point multi-target optimal control theory: Application to quantum computing