The generation of arbitrary single-mode quantum states from the vacuum by a
lternate coherent displacement and photon adding as well as the measurement
of the overlap of a signal with an arbitrarily chosen quantum state are st
udied. With regard to implementations, the transformation of the quantum st
ate of a traveling optical field at an array of beam splitters is considere
d, 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 tw
o-port non-unitary transformation, and the overall non-unitary transformati
on operator is derived. It is shown to be a product of operators, where eac
h 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 bea
m splitter transmittance or reflectance. As an example we discuss the gener
ation of and overlap measurement with Schrodinger-cat-like states.