Quantum Engineering of Optical Nonlinearities