A quantum dot single-photon source is based on a single quantum dot placed in an optical cavity. It is an on-demand single-photon source. A laser pulse can excite a pair of carriers known as an exciton in the quantum dot. The decay of a single exciton due to spontaneous emission leads to the emission of a single photon. Due to interactions between excitons, the emission when the quantum dot contains a single exciton is energetically distinct from that when the quantum dot contains more than one exciton. Therefore, a single exciton can be deterministically created by a laser pulse and the quantum dot becomes a nonclassical light source that emits photons one by one and thus shows photon antibunching. The emission of single photons can be proven by measuring the second order intensity correlation function. The spontaneous emission rate of the emitted photons can be enhanced by integrating the quantum dot in an optical cavity. Additionally, the cavity leads to emission in a well-defined optical mode increasing the efficiency of the photon source.