Photon-based quantum logic gate has substantial advantages over conventional atom-based designs as a result of a longer coherence time and an inherent compatibility with quantum communication protocol of flying qubits, photons. As a vital logic gate for universal quantum computing, the two-photon controlled-phase gate demands a few-photon nonlinearity, which historically suffers from either an indeterministic nature in the linear optics regime, or a weak nonlinearity within naturally-occurring materials in the nonlinear optics regime. It is intriguing yet challenging to deliver a logic gate design by exploiting a genuine fewphoton nonlinearity. In this dissertation, we study a particular one-dimensional quantum nanophotonic system that offers ...