## 2 Concept and Principles  
The key to effectively reshape the wavefront is a complete range of phase control from 0 to 2N\(\pi\) by using the unit elements. For this purpose, a phase shifter was designed and composed of a radiation patch and a feeding line, which were connected through a via with a radius of 0.005 mm as schematically shown in Figure 1. The radiation patch and feeding line were printed on the top and bottom surfaces, respectively, of a polyethylene layer with permittivity of \(\varepsilon_{r}=2.25\) and thickness of 0.05 mm. A ground plane was placed in the middle of the polyethylene layer. Therefore, the radiation patch and the feeding line were well separated, providing higher gain and reduced spurious effect. In order to achieve a different phase from the radiation patch, the feeding line should be tunable. As shown in Figure 1b, the phase shift was obtained by changing the length of the transmission line. The design shows four transmission lines with different lengths connected to the via and can be switched to provide different phase shifts. Here, four diode switches were placed in the gaps connecting the transmission line and the via, the parameters for the diodes were chosen to work at 300 GHz (3 DSF5 Quasi-vertical Schottky diode) [34]. The current could pass through the diode when a forward voltage within 80 mV was applied, turning the switch on. In contrast, the diode was off if a reverse voltage was applied. Note that, this diode will be broken down when a forward voltage over 80 mV is applied. In addition, these diode switches can be turned on and off individually [35]. When the switch was turned on in one arm of the transmission line and the others were turned off, the electromagnetic wave traveled along the 'on' arm of the transmission line to the radiation patch. In this way, the desired phase shift could be obtained by controlling the diode switch in each arm of the transmission line. In the simulation, these gaps were filled with a lumped component to provide the effect of a diode switch. We designed seven elements and Table 1 summarizes the dimension parameters of these elements which have been optimized to resonate at the required frequency of \(f=300\) GHz with a broad spectral range. The lengths of the transmission lines in the feeding lines correspond to different phase orders. Here, the parameters of elements 2-7 are given since element 1 provides a fixed phase, which could be satisfied by each of the elements. To show their ability to manipulate the radiation wavefront, we performed numerical simulations for each element using a home-built program based on the finite-difference time-domain (FDTD) method [36]. Figure 2 shows the S-parameters of each element on different arms, which could be obtained by turning on/off of the diode switch. For example, the S-parameters of arm1 were obtained when the diode switch at arm1 was on and the other three diode switches were off. The S-parameters in Figure 2a-f correspond to elements 2, 3, 4, 5, 6, 7 in Table 1, respectively. The return loss of four arms in each element indicate that the resonant frequency of these designed elements was around \(f=300\) GHz and all the return losses were lower than \(-10\) dB. In addition, the transmission coefficient of each arm had similar values and was higher than \(-4\) dB at \(f=300\) GHz. Figure 3 shows the radiation phase of each element on different arms. It can be seen that the radiation phases can be actively tuned with a shift of \(2\pi\)/7 rad, \(2\times 2\pi\)/7 rad, \(3\times 2\pi\)/7 rad, \(4\times 2\pi\)/7 rad,