The directional coupler formed by a system of two dual-mode optical waveguides is studied with the aim of being used as a switcher for a nonlinear optical CNOT quantum gate. The paper focuses on simulation of behaviour of electromagnetic radiation in regions of juxtaposition and separation, that surround the main coupling region and are composed of several circularly bent waveguides. The modes of bent waveguides are approximated as linear combinations of the guided and leaky modes in the straight waveguide with the same width and refractive indices. An advanced coupled mode theory is applied to describe the coupling between bent parts of the coupler. The system of differential equations for amplitude coefficients is solved with a finite difference method. The influence of signal distortions is analyzed. The results obtained are applied to correct the geometrical parameters of the coupler. The computational error of the whole device due to waveguide bends distortions is estimated to not exceed 5%.