Chip-based system for terahertz waves could enable more efficient, sensitive electronics