2
$\begingroup$

I'm running tomography job like I have done many times before. I send the job, and the job.status() is 'DONE'. But when I ask for job.results() I get the following traceback.

I'm using version 0.18.0.

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/providers/ibmq/api/clients/account.py in job_result(self, job_id, use_object_storage)
    245         try:
--> 246             return self.job_get(job_id)['qObjectResult']
    247         except KeyError as err:

KeyError: 'qObjectResult'

The above exception was the direct cause of the following exception:

ApiIBMQProtocolError                      Traceback (most recent call last)
/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/providers/ibmq/job/ibmqjob.py in _retrieve_result(self, refresh)
    675             try:
--> 676                 result_response = self._api.job_result(self.job_id(), self._use_object_storage)
    677                 self._result = Result.from_dict(result_response)

/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/providers/ibmq/api/clients/account.py in job_result(self, job_id, use_object_storage)
    248             raise ApiIBMQProtocolError(
--> 249                 'Unexpected return value received from the server: {}'.format(str(err))) from err
    250 

ApiIBMQProtocolError: "Unexpected return value received from the server: 'qObjectResult'"

The above exception was the direct cause of the following exception:

IBMQJobApiError                           Traceback (most recent call last)
<ipython-input-50-0a8321076fbb> in <module>
----> 1 experimental_state = StateTomographyFitter(best_full_tomography_job.result(), best_full_tomography_transpiled).fit()
      2 plot_state_hinton(experimental_state)

/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/providers/ibmq/job/ibmqjob.py in result(self, timeout, wait, partial, refresh)
    253                     'Use job.error_message() to get more details.'.format(self.job_id()))
    254 
--> 255         return self._retrieve_result(refresh=refresh)
    256 
    257     def cancel(self) -> bool:

/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/providers/ibmq/job/ibmqjob.py in _retrieve_result(self, refresh)
    687                 raise IBMQJobApiError(
    688                     'Unable to retrieve result for '
--> 689                     'job {}: {}'.format(self.job_id(), str(err))) from err
    690             finally:
    691                 # In case partial results are returned or job failure, an error message is cached.

IBMQJobApiError: 'Unable to retrieve result for job 5e984c5e6ad41d00184b12c1: "Unexpected return value received from the server: \'qObjectResult\'"'

What does it mean, and what went

EDIT:

I now see that when I retrieve a previously ran job, I get a warning message:

/anaconda3/envs/quantum/lib/python3.7/site-packages/qiskit/qobj/qasm_qobj.py:497: DeprecationWarning: qiskit.qobj.Qobj is deprecated use either QasmQobj or PulseQobj depending on your application instead.
  experiments=experiments, header=header)
$\endgroup$
  • $\begingroup$ Hi :) What qiskit versions are you using? $\endgroup$ – met927 Apr 16 at 13:22
  • $\begingroup$ qiskit 0.11.0, I haven't updated in a while $\endgroup$ – Andrea Apr 16 at 13:43
  • $\begingroup$ I have updated to 0.18.0 and I get a longer traceback. I'll update the question. $\endgroup$ – Andrea Apr 16 at 13:53
  • $\begingroup$ nice! What version of qiskit-ibmq-provider do you have? $\endgroup$ – met927 Apr 16 at 14:11
  • $\begingroup$ i've got qiskit-ibmq-provider 0.6.0 $\endgroup$ – Andrea Apr 16 at 14:17

Your Answer

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

Browse other questions tagged or ask your own question.