Phonon engineered quantum cascade terahertz emission