I'm trying to run a PegasosQSVC on one of the IBMQ Quantum computers though the code just throws errors once we reach the training phase ie: PegasosQSVC().fit

IBMQ.enable_account(token = 'MY TOKEN')
provider = IBMQ.get_provider('ibm-q')
num_qubits = 2

Using these lines we get the least busy possible device as a backend

possible_devices = provider.backends(filters=lambda x: x.configuration().n_qubits >= num_qubits and x.configuration().simulator == False)
deviceBackend = least_busy(possible_devices)

Then we set up the QSVC

pegasos_backend = QuantumInstance(backend = deviceBackend)
feature_map =  ZZFeatureMap(feature_dimension=2, reps=int(reps), entanglement=ent)
qkernel = QuantumKernel(feature_map=feature_map, quantum_instance=pegasos_backend)
pegasos_qsvc = PegasosQSVC(quantum_kernel=qkernel, C=int(C), num_steps=int(tau))


pegasos_qsvc.fit(train_features, train_labels)

It hangs then throws this error

FAILURE: job id:XXXXXXXXXXXX, status: 'FAIL_TO_GET_STATUS' Terra job error: '\' 530 Server Error....

The QSVC runs fine locally using

deviceBackend = BasicAer.get_backend('qasm_simulator')

I have also tried directly using the backend as a quantum instance though this makes the process hang

pegasos_backend = deviceBackend

Any help getting the QSVC to run on an IBM system would be greatly appreciated



Your Answer

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

Browse other questions tagged or ask your own question.