Quantum information processing would greatly benefit from the possibility to deterministically entangle photons. This is currently possible only with very complex systems that typically need to operate at low temperature and in high vacuum (Rydberg atoms for example) and are consequently extremely challenging to scale up to large systems. After nearly two decades of existence, the field of nanophotonics (silicon photonics) has recently seen the development of waveguides displaying a large second order optical nonlinearity. This was a long awaited feature because it allows fast and low-power optical modulation. But it also allows improved all-optical processing via nonlinear phase shifts. We want to explore the use of these newly developed nanophotonic waveguides in this context to push down the amount of light required to impart π-phase shift and to modulate light. If π-phase shift can be induced by as little as two photons, it becomes possible to create the controlled-phase gate and entangle photons deterministically. In addition to exploring the new possibilities offered by nanophotonic waveguides to increase the nonlinear phase effect, we will also play with the light field to boost the nonlinear response even further.