  We develop a general method for incentive-based programming of hybrid
quantum-classical computing systems using reinforcement learning, and apply
this to solve combinatorial optimization problems on both simulated and real
gate-based quantum computers. Relative to a set of randomly generated problem
instances, agents trained through reinforcement learning techniques are capable
of producing short quantum programs which generate high quality solutions on
both types of quantum resources. We observe generalization to problems outside
of the training set, as well as generalization from the simulated quantum
resource to the physical quantum resource.
