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 PulseQobj passed the validation (validate_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)
%matplotlib inline
import numpy as np
from qiskit.ignis.characterization.calibrations import rabi_schedules, RabiFitter
from qiskit.pulse import DriveChannel
from qiskit.compiler import assemble
from qiskit.qobj.utils import MeasLevel, MeasReturnType
from qiskit import IBMQ
IBMQ.enable_account(APItoken, proxies = ProxyConfig, verify = certPath)
provider = IBMQ.get_provider(hub=hub, group=group, project=project)
backend = provider.get_backend(device)
# qubit list
qubits = [0]
# drive amplitudes to use
num_exps = 64
drive_amps = np.linspace(0, 1.0, num_exps)
# drive shape parameters
drive_duration = 2048
drive_sigma = 256
# list of drive channels
drive_channels = [DriveChannel(0)]
# construct the schedules
rabi_schedules, xdata = rabi_schedules(amp_list=drive_amps,
qubits=qubits,
pulse_width=drive_duration,
pulse_sigma=drive_sigma,
drives=drive_channels,
inst_map=backend.defaults().instruction_schedule_map,
meas_map=backend.configuration().meas_map)
rabi_qobj = assemble(rabi_schedules,
backend=backend,
meas_level=1,
meas_return='avg',
shots=512)
result = backend.run(rabi_qobj).result()
---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
<ipython-input-17-16f293a93614> in <module>
----> 1 result = backend.run(rabi_qobj).result()
JSONDecodeError: Expecting value: line 1 column 1 (char 0)