8

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.

James Wootton
  • 11,272
  • 1
  • 31
  • 72
brzepkowski
  • 1,049
  • 7
  • 19
  • Does your program actually cancel the job, or does it fail to do that also – James Wootton May 19 '18 at 21:52
  • 1
    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 07:58
  • You could try using the new basejob class. https://qiskit.org/documentation/_autodoc/qiskit.backends.BaseJob.html?highlight=job But you are right that an update is coming, so there is always hope that it’ll fix all our woes ;) – James Wootton May 20 '18 at 09:11

1 Answers1

6

Cancel Job is only available for the IBM Q Network, not for IBM Q Experience: https://github.com/QISKit/qiskit-api-py/blob/master/IBMQuantumExperience/IBMQuantumExperience.py#L795

In the next weeks, we hope that it is available for IBM Q Experience too.

Regarding to the credits... we are analyzing the problem. We have refilled your credits.

If you have any other issue, please post in qiskit (https://qiskit.org/) slack public channel :).

pacom
  • 76
  • 3