  The single-particle Green's function (GF) of mesoscopic structures plays a
central role in mesoscopic quantum transport. The recursive GF technique is a
standard tool to compute this quantity numerically, but it lacks physical
transparency and is limited to relatively small systems. Here we present a
numerically efficient and physically transparent GF formalism for a general
layered structure. In contrast to the recursive GF that directly calculates the
GF through the Dyson equations, our approach converts the calculation of the GF
to the generation and subsequent propagation of a scattering wave function
emanating from a local excitation. This viewpoint not only allows us to
reproduce existing results in a concise and physically intuitive manner, but
also provides analytical expressions of the GF in terms of a generalized
scattering matrix. This identifies the contributions from each individual
scattering channel to the GF and hence allows this information to be extracted
quantitatively from dual-probe STM experiments. The simplicity and physical
transparency of the formalism further allows us to treat the multiple
reflection analytically and derive an analytical rule to construct the GF of a
general layered system. This could significantly reduce the computational time
and enable quantum transport calculations for large samples. We apply this
formalism to perform both analytical analysis and numerical simulation for the
two-dimensional conductance map of a realistic graphene p-n junction. The
results demonstrate the possibility of observing the spatially-resolved
interference pattern caused by negative refraction and further reveal a few
interesting features, such as the distance-independent conductance and its
quadratic dependence on the carrier concentration, as opposed to the linear
dependence in uniform graphene.
