When you run a quantum program in Azure Quantum,
you create and run a job. The steps to create and run a job depend on
the job type and the provider and target that you configure for the workspace.
Job properties
All jobs have the following properties in common:
Property
Description
ID
A unique identifier for the job. It must be unique within the workspace.
Provider
Who you want to run your job.
Target
What you want to run your job on. For example, the exact quantum hardware or quantum simulator offered by the provider.
Name
A user-defined name to help organize your jobs.
Parameters
Optional input parameters for targets. See the documentation for the selected target for a definition of available parameters.
Once you create a job, various metadata is available about its state and run history.
Job lifecycle
Once you've written your quantum program, you can select a target and submit your job.
This diagram shows the basic workflow after you submit your job:
First, Azure Quantum uploads the job to the Azure Storage account that you configured in the workspace. Then, the job is added to the job queue for the provider that you specified in the job. Azure Quantum then downloads your program and translates it for the provider. The provider processes the job and returns the output to Azure Storage, where it is available for download.
Monitoring jobs
Once you submit a job, you can monitor the status of the job. Jobs have the following possible states:
Status
Description
waiting
The job is waiting to run. Some jobs will perform pre-processing tasks in the waiting state. waiting is always the first state, however, a job may move to the executing state before you can observe it in waiting.
executing
The target is currently running the job.
succeeded
The job has succeeded, and output is available. This is a final state.
failed
The job has failed, and error information is available. This is a final state.
cancelled
The user requested to cancel the job run. This is a final state. For more information, see Job Cancellation in this article.
The succeeded, failed, and cancelled states are considered final states. Once a job is in one of these states, no more updates occur, and the corresponding job output data does not change.
This diagram shows the possible job state transitions:
After a job completes successfully, it displays a link to the output data in your Azure Storage account. How you access this data depends on the SDK or tool you used to submit the job.
How to monitor jobs
You can monitor jobs through Python, the Azure portal, and Azure CLI.
In your Azure Quantum workspace, select Operations > Job Management.
A list of jobs that you have permission to access is displayed. You can check the job ID, type, target, status, submission time, and cost estimate, if applicable.
Click on the job Name to view additional details, such as the input parameters, and the job input and output.
You can check the status of the job, by copying the id of your job and using the job show command. For example:
Azure CLI
az quantum job show --job-id b0012975-744a-4405-970e-3d8dc4afb2c0 -o table
Output
Name Id Status Target Submission time Completion time
-------- ------------------------------------ --------- --------------- -------------------------------- --------------------------------
MyQuantumJob b2f07cc4-b49b-40b0-b63b-9a4885e5fef5 Succeeded rigetti.sim.qvm 2023-12-11T05:33:23.187773+00:00 2023-12-11T05:33:29.252742+00:00
You can copy the following code to get the list of jobs and their results:
Python
for job in workspace.list_jobs():
print(job.id, job.details.name, job.details.output_data_uri)
Job cancellation
When a job is not yet in a final state (for example, succeeded, failed, or cancelled), you can request to cancel the job. All providers will cancel your job if it is in the waiting state. However, not all providers support cancellation if your job is in the executing state.
Note
If you cancel a job after it has started running, your account may still be billed a
partial or full amount for that job. See the billing documentation for
your selected provider
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you
Manage data ingestion and preparation, model training and deployment, and machine learning solution monitoring with Python, Azure Machine Learning and MLflow.