Get the backend to use in the computation backend\_used = IBMQ.get\_backend(backend\_code)

if backend\_code! = 'ibmq\_qasm\_simulator':

distributions, # probability distributions

expected\_values = np.dot(distributions,rewards)

backend\_used, # backed to be used
