Hello! I’m testing a quantum-classical classifier that uses a parameterized circuit on IBMQ hardware. I was under the impression that my code was only sending small circuits at a time to IBM, but when I I use the pennylane adam optimizer with my cost function (set up to send one circuit at a time) it sends a large job (3600 circuits). Is there a way I can split this job up without having to modify the pennylane source code?
My error message:
Traceback (most recent call last):
File “/home/plbrown5/QMLAgave.py”, line 450, in
params, _, , w, = opt.step(cost, params, Xbatch, ybatch, w, state_labels)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/optimize/gradient_descent.py”, line 129, in step
g, _ = self.compute_grad(objective_fn, args, kwargs, grad_fn=grad_fn)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/optimize/gradient_descent.py”, line 158, in compute_grad
grad = g(*args, **kwargs)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/_grad.py”, line 113, in call
grad_value, ans = grad_fn(*args, **kwargs)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/autograd/wrap_util.py”, line 20, in nary_f
return unary_operator(unary_f, x, *nary_op_args, **nary_op_kwargs)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/_grad.py”, line 139, in _grad_with_forward
grad_value = vjp(vspace(ans).ones())
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/autograd/core.py”, line 14, in vjp
def vjp(g): return backward_pass(g, end_node)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/autograd/core.py”, line 21, in backward_pass
ingrads = node.vjp(outgrad[0])
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/autograd/core.py”, line 67, in
return lambda g: (vjp(g),)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/interfaces/batch/autograd.py”, line 196, in grad_fn
vjps = processing_fn(execute_fn(vjp_tapes)[0])
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/interfaces/batch/init.py”, line 173, in wrapper
res = fn(execution_tapes.values(), **kwargs)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane/interfaces/batch/init.py”, line 125, in fn
return original_fn(tapes, **kwargs)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/contextlib.py”, line 79, in inner
return func(*args, **kwds)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane_qiskit/ibmq.py”, line 78, in batch_execute
res = super().batch_execute(circuits)
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/pennylane_qiskit/qiskit_device.py”, line 429, in batch_execute
result = self._current_job.result()
File “/home/plbrown5/.conda/envs/qml/lib/python3.9/site-packages/qiskit/providers/ibmq/job/ibmqjob.py”, line 290, in result
raise IBMQJobFailureError(
qiskit.providers.ibmq.job.exceptions.IBMQJobFailureError: ‘Unable to retrieve result for job 6260fedfd0d73f7cc6baef08. Job has failed: The number of experiments in the Qobj (3600) is higher than the number of experiments supported by the device (100). Error code: 1102.’