Terahertz rectification by plasmons and hot carriers in gated 2D electron gases