Ultrafast Quantum State Generation and Measurement in Nonlinear Nanophotonics