Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to cancel a job on the UI and programmatically #1349

Merged
merged 4 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/run/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"title": "Manage jobs",
"children": [
{
"title": "Monitor a job",
"title": "Monitor or cancel a job",
"url": "/run/monitor-job"
},
{
Expand Down
17 changes: 13 additions & 4 deletions docs/run/monitor-job.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
title: Monitor a job
description: How to monitor a job submitted to IBM Quantum Platform or IBM Quantum on IBM Cloud
title: Monitor or cancel a job
description: How to monitor or cancel a job submitted to IBM Quantum Platform or IBM Quantum on IBM Cloud

---

# Monitor a job
# Monitor or cancel a job

Jobs are listed on the Jobs page for your quantum service channel:

* IBM Cloud® channel: From the IBM Cloud console quantum [Instances page](https://cloud.ibm.com/quantum/instances), click the name of your instance, then click the Jobs tab.
* IBM Quantum™ channel: In IBM Quantum Platform, open the [Jobs page](https://quantum.ibm.com/jobs).

## Monitor a job

Use the job instance to check the job status or retrieve the results by calling the appropriate command:

| | |
Expand All @@ -29,7 +31,7 @@ Call `service.job(\<job\_id>)` to retrieve a job you previously submitted. If yo
service.jobs() returns only Qiskit Runtime jobs. To retrieve other jobs, use [qiskit-ibm-provider](../api/qiskit-ibm-provider/qiskit_ibm_provider.IBMBackend#ibmbackend) instead.
</Admonition>

## Example
### Example

This example returns the 10 most recent runtime jobs that were run on `my_backend`:

Expand All @@ -42,6 +44,13 @@ service = QiskitRuntimeService()
service.jobs(backend_name=my_backend)
```

## Cancel a job

You can cancel a job from the IBM Quantum Platform dashboard either on the Jobs page or the details page for a specific job. Click the menu with three vertical dots (at the end of the row on the Jobs page, or the top of the page on the Job details page), and select Cancel.

In Qiskit, use `job.cancel()` to cancel a job.


## Next steps

<Admonition type="tip" title="Recommendations">
Expand Down
Loading