  We propose using nonlinear Mach-Zehnder interferometer (NMZI) to efficiently
prepare photonic quantum states from a classical input. We first analytically
investigate the simple NMZI that can filtrate single photon state from weak
coherent state by preferrentially blocking two-photon component. As a
generalization, we show that the cascaded NMZI can deterministically extract
arbitrary quantum state from a strong coherent state. Finally, we numerically
demonstrate that the cascaded NMZI can be very efficient in both the input
power and the level of cascade. The protocol of quantum state preparation with
NMZI can be extended to various systems of bosonic modes.
