Towards Universality of Terahertz Electromagnetic Synthesis and Sensing with Chip-scale Systems