New quantum device generates single photons and encodes info