I am submitting a job to ibmq_qasm_simulator and after the validation I repeatedly get the error "Error running job on a simulator. [5204]" The site with error descriptions https://quantum-computing.ibm.com/docs/manage/errors does not have an entry for the error code 5204, so it is impossible to know what causes the error and how to fix it. Can anybody help with this?

  • 1
    $\begingroup$ do you have an example of the code that you are running so we can try to reproduce the error that you get? $\endgroup$ – KAJ226 Oct 31 '20 at 6:56
  • $\begingroup$ It is an implementation of the one-hot encoding presented in this paper arxiv.org/abs/1904.09314 using 30 qubits. The same code works for 20 qubits without any problems. $\endgroup$ – TheFox Oct 31 '20 at 18:22
  • $\begingroup$ Does job.error_message() give you more information? $\endgroup$ – jyu00 Nov 2 '20 at 13:19
  • $\begingroup$ This is the error message: Traceback (most recent call last):print("error message = ", job.error_message()) File ".conda/envs/qiskit_env/lib/python3.6/site-packages/qiskit/providers/ibmq/job/ibmqjob.py", line 524, in error_message self._retrieve_result() File "..../job/ibmqjob.py", line 914, in _retrieve_result self._set_result(result_response) File "...../job/ibmqjob.py", line 956, in _set_result 'job {}: {}'.format(self.job_id(), str(err))) from err qiskit.providers.ibmq.job.exceptions.IBMQJobApiError: "Unable to retrieve result for job ....: 'results'" $\endgroup$ – TheFox Nov 3 '20 at 10:08
  • $\begingroup$ Unfortunately 5204 is a generic error that basically just says something went wrong. It's usually a network error somewhere in the cloud. Since it's been a few days, you can try again and see if it works now. If not, you'll need to contact an IQX admin either through slack or the "feedback" button on IQX to look up your particular job. $\endgroup$ – jyu00 Nov 3 '20 at 12:49

Thank you all for your help tracking this down. For future reference, the culprit was the usage of the function QuantumCircuit.initialize(params, qubits), which triggered an error out of some reason. Not sure why it fails in this case but not in others. The solution was to implement what the initialize function was supposed to do with basis gates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.