  We present a theoretical technique for solving the quantum transport problem
of a few photons through a one-dimensional, strongly nonlinear waveguide. We
specifically consider the situation where the evolution of the optical field is
governed by the quantum nonlinear Schr\"odinger equation (NLSE). Although this
kind of nonlinearity is quite general, we focus on a realistic implementation
involving cold atoms loaded in a hollow-core optical fiber, where the atomic
system provides a tunable nonlinearity that can be large even at a
single-photon level. In particular, we show that when the interaction between
photons is effectively repulsive, the transmission of multi-photon components
of the field is suppressed. This leads to anti-bunching of the transmitted
light and indicates that the system acts as a single-photon switch. On the
other hand, in the case of attractive interaction, the system can exhibit
either anti-bunching or bunching, which is in stark contrast to semiclassical
calculations. We show that the bunching behavior is related to the resonant
excitation of bound states of photons inside the system.
