First-principles methods help explain how semiconductor defects can function as qubits and single-photon emitters. Their predictive value depends on accurately modeling electronic states, spin interactions, structural effects and the limits of each computational approach.