Del via


az quantum job

Note

This reference is part of the quantum extension for the Azure CLI (version 2.41.0 or higher). The extension will automatically install the first time you run an az quantum job command. Learn more about extensions.

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage jobs for Azure Quantum.

Commands

Name Description Type Status
az quantum job cancel

Request to cancel a job on Azure Quantum if it hasn't completed.

Extension Preview
az quantum job list

Get the list of jobs in a Quantum Workspace.

Extension Preview
az quantum job output

Get the results of running a job.

Extension Preview
az quantum job show

Get the job's status and details.

Extension Preview
az quantum job submit

Submit a program or circuit to run on Azure Quantum.

Extension Preview
az quantum job wait

Place the CLI in a waiting state until the job finishes running.

Extension Preview

az quantum job cancel

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Request to cancel a job on Azure Quantum if it hasn't completed.

az quantum job cancel --job-id
                      --location
                      --resource-group
                      --workspace-name

Examples

Cancel an Azure Quantum job by id.

az quantum job cancel -g MyResourceGroup -w MyWorkspace -l MyLocation \
    -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy

Required Parameters

--job-id -j

Job unique identifier in GUID format.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az quantum job list

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the list of jobs in a Quantum Workspace.

az quantum job list --location
                    --resource-group
                    --workspace-name
                    [--created-after]
                    [--created-before]
                    [--item-type]
                    [--job-name]
                    [--job-type]
                    [--order]
                    [--orderby]
                    [--provider-id]
                    [--skip]
                    [--status]
                    [--target-id]
                    [--top]

Examples

Get the list of jobs from an Azure Quantum workspace.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation

List jobs that used the microsoft-elements provider.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --provider-id microsoft-elements

List jobs that ran on the microsoft.dft target.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --target-id microsoft.dft

List jobs that completed successfully.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --status Succeeded

List jobs created after January 15th, 2025.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --created-after 2025-01-15

List jobs whose names start with "Generate...".

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --job-name Generate

Skip the first 50 jobs, start listing at the 51st job and list 10 jobs.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --skip 50 --top 10

Sort the job list by Target ID and display in tabular format.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --orderby Target -o table

Sort the job list by Job Name in descending order, display in tabular format.

az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --orderby Name --order desc -o table

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Optional Parameters

--created-after

Jobs created after this date to be listed.

--created-before

Jobs created before this date to be listed.

--item-type

Item type to be listed, "job" or "session".

--job-name

A friendly name to give to this run of the program.

--job-type

Job type to be listed, example "QuantumComputing".

--order

How to order the list: asc or desc.

--orderby

The field on which to order the list.

--provider-id -p

Identifier of an Azure Quantum provider.

--skip

How many jobs to skip when returning a job list.

--status

Status of jobs to be listed.

--target-id -t

Execution engine for quantum computing jobs. When a workspace is configured with a set of providers, they each enable one or more targets. You can configure the default target using az quantum target set.

--top

The number of jobs listed per page.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az quantum job output

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the results of running a job.

az quantum job output --job-id
                      --location
                      --resource-group
                      --workspace-name
                      [--item]

Examples

Print the results of a successful Azure Quantum job.

az quantum job output -g MyResourceGroup -w MyWorkspace -l MyLocation \
    -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy -o table

Required Parameters

--job-id -j

Job unique identifier in GUID format.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Optional Parameters

--item

The item index in a batching job.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az quantum job show

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the job's status and details.

az quantum job show --job-id
                    --location
                    --resource-group
                    --workspace-name

Examples

Get the status of an Azure Quantum job.

az quantum job show -g MyResourceGroup -w MyWorkspace -l MyLocation \
    -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --query status

Required Parameters

--job-id -j

Job unique identifier in GUID format.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az quantum job submit

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Submit a program or circuit to run on Azure Quantum.

az quantum job submit --job-input-file
                      --job-input-format
                      --location
                      --resource-group
                      --target-id
                      --workspace-name
                      [--entry-point]
                      [--job-name]
                      [--job-output-format]
                      [--job-params]
                      [--shots]
                      [--storage]
                      [--target-capability]

Examples

Submit QIR bitcode from a file in the current folder.

az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \
    --job-name MyJob --job-input-format qir.v1 --job-input-file MyQirBitcode.bc \
    --entry-point MyQirEntryPoint

Submit a Quil pass-through job to the Rigetti simulator.

az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation \
   -t rigetti.sim.qvm --job-name MyJob --job-input-file MyProgram.quil \
   --job-input-format rigetti.quil.v1 --job-output-format rigetti.quil-results.v1

Submit a Qiskit circuit to the IonQ simulator with job params.

az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation \
   -t ionq.simulator --job-name MyJobName --job-input-file MyCircuit.json \
   --job-input-format ionq.circuit.v1 --job-output-format ionq.quantum-results.v1 \
   --job-params count=100 content-type=application/json

Required Parameters

--job-input-file

The location of the input file to submit.

--job-input-format

The format of the file to submit.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--target-id -t

Execution engine for quantum computing jobs. When a workspace is configured with a set of providers, they each enable one or more targets. You can configure the default target using az quantum target set.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Optional Parameters

--entry-point

The entry point for the QIR program or circuit. Required for QIR jobs.

--job-name

A friendly name to give to this run of the program.

--job-output-format

The expected job output format.

--job-params

Job parameters passed to the target as a list of key=value pairs, json string, or @{file} with json content.

--shots

The number of times to run the program on the given target.

--storage

If specified, the ConnectionString of an Azure Storage is used to store job data and results.

--target-capability

Target-capability parameter passed to the compiler.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az quantum job wait

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until the job finishes running.

az quantum job wait --job-id
                    --location
                    --resource-group
                    --workspace-name
                    [--max-poll-wait-secs]

Examples

Wait for completion of a job, check at 60 second intervals.

az quantum job wait -g MyResourceGroup -w MyWorkspace -l MyLocation \
    -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --max-poll-wait-secs 60 -o table

Required Parameters

--job-id -j

Job unique identifier in GUID format.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Optional Parameters

--max-poll-wait-secs

Poll time in seconds to query Azure Quantum for results of the corresponding job.

Default value: 5
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.