Quantum model unlocks new approach to single-photon detection