qiskit-jku-provider icon indicating copy to clipboard operation
qiskit-jku-provider copied to clipboard

job.cancel() does not seem to be working.

Open jaygambetta opened this issue 6 years ago • 3 comments

If i run

qubits_num = 30
qr = QuantumRegister(qubits_num)
cr = ClassicalRegister(qubits_num)

qc = QuantumCircuit(qr, cr)
qc.h(qr[0])
qc.cx(qr[0], qr[1])
qc.measure(qr[0], cr[0])
qc.measure(qr[1], cr[1])
qc.measure(qr[2], cr[2])
jku_backend = JKUProvider().get_backend('local_statevector_simulator_jku')

job = execute(qc, backend=jku_backend, shots=100, seed=42)

then

job.cancel()

it does not seem to cancel the job.

jaygambetta avatar Feb 19 '19 01:02 jaygambetta

I'm not sure if we really want to consider "cancellability" essential for the release - our other local simulators do not implement .cancel() either (as it is a bit tricky to cancel an already running process in python and other technical aspects). Maybe the priority can be lowered?

diego-plan9 avatar Feb 19 '19 10:02 diego-plan9

ok. I am good with that but we should either work towards having this or remove cancel from the basejob.

jaygambetta avatar Feb 19 '19 11:02 jaygambetta

It should be possible to cancel the JKU process, but it will require some code changes and careful testing. Let's see if we decide we want local simulators to implement .cancel() in general.

gadial avatar Feb 19 '19 11:02 gadial