Terahertz integrated electronic and hybrid electronic-photonic systems