Managing jobs
Cancel a job
Call job.cancel() to stop a job you no longer need. This frees the worker and stops billing for it. cancel() returns the updated handle.
Cancel a running job
python
job = sim.submit(circuit, shots=256)
cancelled = job.cancel()
print(cancelled.status) # CANCELLEDCancel by id
You can cancel a job from any session if you have its id:
python
sim.get_job("job_...").cancel()Note Cancellation is best-effort: a job that has already finished keeps its terminal status (SUCCEEDED or FAILED), and a job mid-execution on a worker may complete before the cancel lands. Check the returned status to see what actually happened.