  A device being a pinnacle of development of an optical quantum memory should
combine the capabilities of storage, inter-communication and processing of
stored information. In particular, the ability to capture a train of optical
pulses, interfere them in an arbitrary way and finally perform on-demand
release would in a loose sense realize an optical analogue of a Turing Machine.
Here we demonstrate the operation of an optical quantum memory being able to
store optical pulses in the form of collective spin-wave excitations in a
multi-dimensional wavevector space. During storage, we perform complex
beamsplitter operations and demonstrate a variety of protocol implemented as
the processing stage, including interfering a pair of spin-wave modes with 95\%
visibility. By engineering the phase-matching at the readout stage we realize
the on-demand retrieval. The highly multimode structure of the presented
quantum memory lends itself both to enhancing classical optical
telecommunication as well as parallel processing of optical qubits at the
single-photon level.
