# How to delete pending jobs on IBM Quantum Computer to retrieve units?

I am trying to run some code using qiskit, but I get the error message, that I have run out of necessary Experiment Units. I tried to remove pending jobs using the API with the following code

for job in api.get_jobs():
if job["status"] == "RUNNING":
api.cancel_job(id_job=job["id"], hub=None, group=None, project=None,
access_token=None, user_id=None)


but it didn't work.

Am I even going in the right direction or is there some other way to retrieve these used Experiment Units? I have read, that they normally are given back just after the execution of program is finished or after 24 hours (depending on which one ends earlier), but I am waiting now for over than two days and nothing happens.

• Does your program actually cancel the job, or does it fail to do that also – James Wootton May 19 '18 at 21:52
• Also, I crossposted to the QISKit Slack to see if they might have an answer. – James Wootton May 19 '18 at 21:53
• My program failed to cancel pending jobs. I am wondering, that naybe IBM has some difficulties, which will be resolved in the next week. – brzepkowski May 19 '18 at 22:02
• Your code looks like it doesn’t use the methods of QISKit 0.5.0. So maybe if you do it with the new version, it might work (and maybe not). – James Wootton May 19 '18 at 22:47
• Can you specify, what should I change? Also, I think that there are some problems with their network, because nobody is running experiments (at least the interactive map on their page shows that). – brzepkowski May 20 '18 at 7:58