Novel machine learning computational tools open new perspectives for quantum information systems. Here we adopt the open-source programming library TensorFlowTM 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 trainable operators at the input and the readout enable to realize multi-level gates. We study single and qudit gates, including the
scaling properties of the algorithms with the size of the reservoir.