In modern optical fiber transmission systems, an important aspect is the temporal multiplexing of channels. Guided-wave optical technologies for creating communication lines with a terahertz repetition rate come to the fore. In this paper, the methods of numerical simulation have illustrated the possibility of forming a sequence of subpulses with any duration and with a terahertz repetition rate as well as to control it considering the discrepancy coefficient. This coefficient is related to the discrepancy between the central frequency of subpulses in the quasidiscrete temporal structure and the central frequency of the spectral lines in the quasidiscrete spectral structure. Its influence on the sequence of subpulses after encoding is shown. The results demonstrate the formation of a controlled sequence with a duration of more than 100 ps and a repetition rate of 0.4 THz, which is difficult to achieve by existing methods.