LinuxCommandLibrary

az-quantum

Manage Azure Quantum resources

TLDR

Create a new Azure Quantum workspace

$ az quantum workspace create [[-g|--resource-group]] [ResourceGroup] [[-l|--location]] [Location] [[-w|--workspace-name]] [Workspace] [[-a|--storage-account]] [MyStorageAccountName]
copy

List all Azure Quantum workspaces
$ az quantum workspace list
copy

Set a default Azure Quantum workspace
$ az quantum workspace set [[-g|--resource-group]] [ResourceGroup] [[-w|--workspace-name]] [Workspace]
copy

Submit a QIR quantum job to a target
$ az quantum job submit [[-g|--resource-group]] [ResourceGroup] [[-w|--workspace-name]] [Workspace] [[-l|--location]] [Location] [[-t|--target-id]] [Id] --job-name [Job] --job-input-file [QirBitcode.bc] --job-input-format [qir.v1]
copy

List all jobs in a Quantum Workspace
$ az quantum job list [[-g|--resource-group]] [ResourceGroup] [[-l|--location]] [Location] [[-w|--workspace-name]] [Workspace]
copy

Get the output of a quantum job
$ az quantum job output [[-g|--resource-group]] [ResourceGroup] [[-w|--workspace-name]] [Workspace] --job-id [Job]
copy

List available provider offerings in a location
$ az quantum offerings list [[-l|--location]] [Location]
copy

Set a default target for job submissions
$ az quantum target set [[-t|--target-id]] [Id]
copy

SYNOPSIS

az quantum group subcommand [options]
az quantum execute [options]

Examples:
az quantum workspace create --name my-workspace --resource-group my-rg --location eastus
az quantum job submit --workspace my-workspace --target-id microsoft.estimator --entry-point MyApp.EntryPoint --input-args {\"shots\": 100} my_quantum_code.qs

PARAMETERS

workspace
    Manages Azure Quantum workspaces, including creation, deletion, and listing.

job
    Manages quantum jobs submitted to various quantum providers, allowing submission, listing, cancellation, and retrieval of results.

target
    Manages quantum execution targets (Quantum Processing Units - QPUs and simulators) available within a workspace.

provider
    Manages quantum providers associated with a workspace.

execute
    Directly executes quantum programs or Q# code files on a specified target within a quantum workspace.

--help, -h
    Shows the help message for the az quantum command or its specific subcommands.

--output, -o
    Specifies the output format for the command's results (e.g., json, table, tsv).

--query
    A JMESPath query string used to filter or transform the command's output.

--verbose
    Increases logging verbosity to show more detailed information.

--debug
    Shows all debug logs for troubleshooting purposes.

DESCRIPTION

The az quantum command is an official extension for the Azure Command-Line Interface (CLI), designed to facilitate interaction with the Azure Quantum service.
It empowers developers and researchers to manage quantum workspaces, submit quantum jobs to various providers, track job execution, and retrieve results directly from their command line.
This tool integrates quantum development workflows with Microsoft Azure's cloud infrastructure, providing a unified interface for quantum resource management and job orchestration.

CAVEATS

Requires the Azure CLI to be installed and the quantum extension to be added (e.g., az extension add --name quantum).
An active Azure subscription and a configured Azure Quantum workspace are necessary to utilize its full capabilities.
Familiarity with Azure concepts (resource groups, subscriptions) and basic quantum computing principles is beneficial.

HISTORY

The az quantum command was developed by Microsoft as part of its Azure Quantum service offering.
It was introduced as an Azure CLI extension to provide command-line tooling for interacting with Azure's cloud-based quantum computing platform.
Its development enables developers to integrate quantum workloads into their existing Azure DevOps practices and scripts, aligning with Microsoft's broader strategy to make quantum computing accessible through cloud services.

SEE ALSO

az(1): The main Azure CLI command., az account(1): Manages Azure subscriptions and authentication., az group(1): Manages Azure resource groups.

Copied to clipboard