We report on experimental implementation of a machine-learned quantum gate driven by a classical control. The gate learns optimal phase-covariant cloning in a reinforcement learning scenario having fidelity of the clones as reward. In our experiment, the gate learns to achieve nearly optimal cloning fidelity allowed for this particular class of states. This makes it a proof of present-day feasibility and practical applicability of the hybrid machine learning approach combining quantum information processing with classical control. Moreover, our experiment can be directly generalized to larger interferometers where the computational cost of classical computer is much lower than the cost of boson sampling.