I'm trying to follow tutorial on pulse simulation described in qiskit.org.
The generated PulseQobj is well executed with AER simulator, but it throws JSONDecodeError when using real backends (ex. ibmq-armonk).
The The PulseQobj passed the validation (validate_qobj_against_schemavalidate_qobj_against_schema
), so I'm struggling to find the reason. Qobj, generated by QuantumCircuit
command, does not raise this error.
I connected to real device with APItoken, and qiskit version is up to date (qiskit 0.22.0).
Below is the trial code with real device, and log after backend.run(PulseQobj)
---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call%matplotlib last)inline
<ipython-input-17-16f293a93614> in <module>
---->import 1numpy arm_resultas =np
from backendqiskit.run(rabi_qobj)ignis.result()
D:\Anaconda3\lib\site-packages\qiskit\providers\ibmq\ibmqbackendcharacterization.py in run(self, qobj, job_name,calibrations job_share_level,import job_tagsrabi_schedules, validate_qobj)RabiFitter
175 from qiskit.pulse ifimport validate_qobj:DriveChannel
176 from qiskit.compiler import validate_qobj_against_schema(qobj)assemble
--> 177 returnfrom selfqiskit._submit_job(qobj,.utils job_name,import api_job_share_levelMeasLevel, job_tags)
178 MeasReturnType
179 from qiskit defimport _submit_job(IBMQ
D:\Anaconda3\lib\site-packages\qiskit\providers\ibmq\ibmqbackendIBMQ.py in _submit_jobenable_account(selfAPItoken, qobj,proxies job_name,= job_share_levelProxyConfig, job_tags)
213 try:
214 qobj_dictverify = qobj.to_dict(certPath)
--> 215 submit_infoprovider = self._api_clientIBMQ.job_submitget_provider(
216 hub=hub, group=group, backend_name=self.name(project=project),
217 backend = qobj_dict=qobj_dict,
D:\Anaconda3\lib\site-packages\qiskit\providers\ibmq\api\clients\accountprovider.py in job_submitget_backend(self, backend_name, qobj_dict, job_name, job_share_level, job_tagsdevice)
217
218 # Upload the Qobj to objectqubit storage.list
--> 219 _qubits = job_api.put_object_storage(upload_url, qobj_dict)[0]
220
221 # Notify the APIdrive viaamplitudes theto callback.
use
D:\Anaconda3\lib\site-packages\qiskit\providers\ibmq\api\rest\job.py in put_object_storage(self,num_exps url,= qobj_dict)64
188 datadrive_amps = jsonnp.dumpslinspace(qobj_dict0, cls=json_encoder1.IQXJsonEncoder0, num_exps)
# drive shape parameters
drive_duration 189= 2048
drive_sigma = 256
# list of drive channels
drive_channels = logger.debug[DriveChannel('Uploading to object storage.'0)]
--> 190
# construct the schedules
rabi_schedules, responsexdata = self.session.putrabi_schedules(url, data=data, bare=Trueamp_list=drive_amps, timeout=600,
191 headers={'Content-Type':qubits=qubits, 'application/json'})
192 return response.text
D:\Anaconda3\lib\site-packages\requests\sessions.py in put(self, url, data, **kwargs)
588 """
589
--> 590 return self.request('PUT', url, data=datapulse_width=drive_duration, **kwargs)
591
592 def patch(self, url, data=None, **kwargs):
D:\Anaconda3\lib\site-packages\qiskit\providers\ibmq\api\session.py in request(self, method, url, bare, **kwargs)
284 except (ValueErrorpulse_sigma=drive_sigma, KeyError):
285 # the response did not contain the expected json.
--> 286 drives=drive_channels,
message += ". {}".format(ex.response.json())
287
288 if self.access_token:
D:\Anaconda3\lib\site-packages\requests\modelsinst_map=backend.py in jsondefaults(self).instruction_schedule_map, **kwargs)
896 # used.
897 pass
--> 898 return complexjsonmeas_map=backend.loadsconfiguration(self).text, **kwargsmeas_map)
899
900 @property
D:\Anaconda3\lib\json\__init__.pyrabi_qobj in= loadsassemble(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hookrabi_schedules, **kw)
355 parse_int is None and parse_float is None andbackend=backend,
356 parse_constant is None and object_pairs_hook is None and notmeas_level=1, kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:meas_return='avg',
359 cls = JSONDecoder
D:\Anaconda3\lib\json\decoder.py in decode(self, s, _w)
335 shots=512)
336 """
--> 337 obj, endresult = selfbackend.raw_decode(s, idx=_wrun(s, 0rabi_qobj).endresult())
338 end = _w(s, end).end()
339
---------------------------------------------------------------------------
JSONDecodeError if end != len(s):
D:\Anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj,Traceback end(most =recent self.scan_once(s,call idxlast)
354 except StopIteration<ipython-input-17-16f293a93614> asin err:<module>
----> 355 1 arm_result raise= JSONDecodeErrorbackend.run("Expecting value", s, errrabi_qobj).valueresult() from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)