  In this paper, an intelligent reflecting surface (IRS) is deployed to assist
the terahertz (THz) communications. The molecular absorption causes path loss
peaks to appear in the THz frequency band, and the fading peak is greatly
affected by the transmission distance. In this paper, we aim to maximize the
sum rate with individual rate constraints, in which the IRS location, IRS phase
shift, the allocation of sub-bands of the THz spectrum, and power control for
UEs are jointly optimized. For the special case of a single user equipment (UE)
with a single sub-band, the globally optimal solution is provided. For the
general case with multiple UEs, the block coordinate searching (BCS) based
algorithm is proposed to solve the non-convex problem. Simulation results show
that the proposed scheme can significantly enhance system performance.
