Optimization of Quantum Universal Detectors