Interplay and optimization of decoherence mechanisms in the optical control of spin quantum bits implemented on a semiconductor quantum dot