Coherent control of nuclear and electron spins for quantum information processing