  The generation of arbitrary single-mode quantum states from the vacuum by
alternate coherent displacement and photon adding as well as the measurement of
the overlap of a signal with an arbitrarily chosen quantum state are studied.
With regard to implementations, the transformation of the quantum state of a
traveling optical field at an array of beam splitters is considered, using
conditional measurement. Allowing for arbitrary quantum states of both the
input reference modes and the output reference modes on which the measurements
are performed, the setup is described within the concept of two-port
non-unitary transformation, and the overall non-unitary transformation operator
is derived. It is shown to be a product of operators, where each operator is
assigned to one of the beam splitters and can be expressed in terms of an
s-ordered operator product, with s being determined by the beam splitter
transmittance or reflectance. As an example we discuss the generation of and
overlap measurement with Schroedinger-cat-like states.
