  This work investigates the application of Beyond Diagonal Intelligent
Reflective Surface (BD-IRS) to enhance THz downlink communication systems,
operating in a hybrid: reflective and transmissive mode, to simultaneously
provide services to indoor and outdoor users. We propose an optimization
framework that jointly optimizes the beamforming vectors and phase shifts in
the hybrid reflective/transmissive mode, aiming to maximize the system sum
rate. To tackle the challenges in solving the joint design problem, we employ
the conjugate gradient method and propose an iterative algorithm that
successively optimizes the hybrid beamforming vectors and the phase shifts.
Through comprehensive numerical simulations, our findings demonstrate a
significant improvement in rate when compared to existing benchmark schemes,
including time- and frequency-divided approaches, by approximately $30.5\%$ and
$69.9\%$ respectively and even outperforms the STAR-IRS system by $76.99\%$.
This underscores the significant influence of IRS elements on system
performance relative to that of base station antennas, highlighting their
pivotal role in advancing the communication system efficacy.
