1
$\begingroup$

I ran my qsvm code on the quantum computer and I'm facing the following error:

FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, **Error code: 3458.**'" 
Job limit reached, waiting for job 5ef1bc3ecd20b1001387fa06 to finish before submitting the next one.
FAILURE: Job id: 5ef1bc4edab6ee0013416233 is cancelled. Re-submit the Qobj.
FAILURE: Job id: 5ef1bc546daf510014814cd8 is cancelled. Re-submit the Qobj.
FAILURE: Job id: 5ef1bc5a13b5f900139e97c5 is cancelled. Re-submit the Qobj.
FAILURE: Job id: 5ef1bc62c7453600138726d0 is cancelled. Re-submit the Qobj.

The last line is repeating every few minutes. The url does not exist. I did run my code on the simulator and it worked. It uses 5 features and hence 5 qubits. Could anyone please help me out? The code:

data = np.genfromtxt('diabetes.csv', delimiter=',', names=True, case_sensitive=True)
data = np.array(data.tolist()) # was an array of arrays earlier
data = np.delete(data, 7, axis = 1)
data = np.delete(data, 3, axis = 1)
data = np.delete(data, 2, axis = 1)
print(data.shape)
x = np.copy(data[:,0:5]) #features
y = np.copy(data[:,5]) #targets
features = 5
from sklearn.model_selection import train_test_split
import qiskit
from qiskit import BasicAer
from qiskit.aqua import QuantumInstance
from qiskit.aqua.algorithms import QSVM
  
from qiskit.aqua.components.multiclass_extensions import one_against_rest, all_pairs
from qiskit.aqua.components.feature_maps import SecondOrderExpansion
provider = qiskit.IBMQ.load_account()
backend = provider.get_backend('ibmq_16_melbourne')
train_x, test_x, train_y, test_y = train_test_split(x[0:101], y[0:101], test_size=0.2)

training_data = {'A':train_x[train_y==0],'B':train_x[train_y==1]}
testing_data = {'A':test_x[test_y==0],'B':test_x[test_y==1]}
feature_map = SecondOrderExpansion(feature_dimension=features,depth=2,entanglement='full')
svm = QSVM(feature_map,training_data,testing_data)
shots = 1 
quantum_instance = QuantumInstance(backend,shots=shots,skip_qobj_validation=False)
%%time
result = svm.run(quantum_instance) 
$\endgroup$
1
$\begingroup$

tldr: this is caused by a change in behavior of the IQX server that needs to be fixed.

Aqua may submit multiple jobs for an experiment under the cover. However, with a public account, you can only have 5 jobs running in parallel at the same time. That's what caused the first error:

FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, **Error code: 3458.**'" 

Aqua then tried to wait for the oldest job to finish before submitting the next one, as indicated by this message:

Job limit reached, waiting for job 5ef1bc3ecd20b1001387fa06 to finish before submitting the next one.

Instead of waiting indefinitely for the oldest, the code retries the submit every 5 minutes, in case a spot frees up for some reason. It looks like there is a behavior change so that instead of getting another 3458 error, the retried submit went through but the job was immediately cancelled, giving the rest of the error messages. Without the 3458 error, Aqua just kept re-submitting the jobs which kept getting cancelled.

| improve this answer | |
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.