Novel computational tools in machine learning open new perspectives in quantum information systems. Here we adopt the open-source programming library Tensorflow to design multi-level quantum gates including a computing reservoir represented by a random unitary matrix. In optics, the reservoir is a disordered medium or a multimodal fiber. We show that by using trainable operators at the input and at the readout, it is possible to realize multi-level gates. We study single and qudit gates, including the scaling properties of the algorithms with the size of the reservoir.