You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
I explained in this comment #649 (comment) but I believe the issue is that you have the simplejson package installed in your environment. Uninstalling this package should resolve the issue.
Hi @kt474 thank you fo finding the solution. I believe @YongsooHWANG also reported this issue with relating to simplejson and solved this by letting qiskit use simple json. I'll let him know as well.
Information
What is the current behavior?
On the jupyter notebook, when retrieving a job from a dynamic circuit, following error pops up:
TypeError Traceback (most recent call last)
in
10
11
---> 12 job = provider.backend.retrieve_job('cfu4j33mcdu7bt2gj250')
13
14
~\anaconda3\lib\site-packages\qiskit_ibm_provider\ibm_backend_service.py in retrieve_job(self, job_id)
591 job_info = self._default_hgp._api_client.job_get(job_id)
592 else:
--> 593 job_info = self._provider._runtime_client.job_get(job_id)
594 if job_info.get("program", {}).get("id") not in [
595 "circuit-runner",
~\anaconda3\lib\site-packages\qiskit_ibm_provider\api\clients\runtime.py in job_get(self, job_id)
157 JSON response.
158 """
--> 159 response = self._api.program_job(job_id).get()
160 logger.debug("Runtime job get response: %s", response)
161 return response
~\anaconda3\lib\site-packages\qiskit_ibm_provider\api\rest\program_job.py in get(self)
54 JSON response.
55 """
---> 56 return self.session.get(self.get_url("self")).json(cls=RuntimeDecoder)
57
58 def job_type(self) -> str:
~\anaconda3\lib\site-packages\requests\models.py in json(self, **kwargs)
896 # used.
897 pass
--> 898 return complexjson.loads(self.text, **kwargs)
899
900 @Property
~\anaconda3\lib\site-packages\simplejson_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, use_decimal, **kw)
540 raise TypeError("use_decimal=True implies parse_float=Decimal")
541 kw['parse_float'] = Decimal
--> 542 return cls(encoding=encoding, **kw).decode(s)
543
544
~\anaconda3\lib\site-packages\qiskit_ibm_provider\utils\json.py in init(self, *args, **kwargs)
266
267 def init(self, *args: Any, **kwargs: Any):
--> 268 super().init(object_hook=self.object_hook, *args, **kwargs)
269 self.__parameter_vectors: Dict[str, Tuple[ParameterVector, set]] = {}
270 self.__read_parameter_expression = (
TypeError: init() got an unexpected keyword argument 'encoding'
Steps to reproduce the problem
I first import the IBMProvider and get the backend
(Note the account was already saved here)
then I retrieve the job:
job = provider.backend.retrieve_job('cfu4j33mcdu7bt2gj250')
At this step, the error occured
What is the expected behavior?
Job object should be stored in
job
and no error should occurSuggested solutions
According to the qiksit API references https://qiskit.org/documentation/partners/qiskit_ibm_provider/stubs/qiskit_ibm_provider.IBMProvider.html#qiskit_ibm_provider.IBMProvider
provider.backend
should returns aIBMBackendService
which has theretrieve_job
method, and according to the file it should also work if I useprovider.retrieve_job
directly. However I test both none of them worked and both pops same error listed above.The text was updated successfully, but these errors were encountered: