Linear optics and quantum maps