We present a theoretical procedure with numerical demonstration of a workable and efficient method to
evaluate the surface Green’s function of semi-infinite leads connected to a device. Such a problem always occurs
in quantum transport calculations but also in the study of surfaces and heterojunctions. We show here that these
semi-infinite leads can be properly described by real-energy Green’s functions obtained analytically by a smart
solution of the Riccatimatrix equation. The performance of our method is demonstrated in the case of a multichain
two-dimensional electron-gas system, composed of a central ribbon connected to two semi-infinite leads, pierced
by two opposite magnetic fields