  We suggest a tunable optical device to synthesize Fock states and their
superpositions starting from a coherent source. The scheme involves an
avalanche triggering photodetector and a ring cavity coupled to a traveling
wave through a cross-Kerr medium. Low quantum efficiency at the photodetector
improves the synthesizing quality at the expense of reducing the synthesizing
rate.
