Quantum Optical Realization of Arbitrary Linear Transformation Allowing for Loss and Gain The article is now published in PRX Nora Tischler, Carsten Rockstuhl & Karolina Słowik Phys. Rev. X 8, 021017 (2018) arxiv.org/abs/1712.01413