Generation Of Heralded Single Photons In Pure Quantum States