az quantum

注意

此參考是 Azure CLI 的量子延伸模組的一部分(2.41.0 版或更高版本)。 擴充功能會在您第一次執行 az quantum 命令時自動安裝。 深入了解擴充功能。

此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理 Azure Quantum 工作區,並將作業提交至 Azure Quantum 提供者。

命令

名稱 Description 類型 狀態
az quantum execute

提交作業以在 Azure Quantum 上執行,並等候結果。

副檔名 預覽​​
az quantum job

管理 Azure Quantum 的工作。

副檔名 預覽​​
az quantum job cancel

如果 Azure Quantum 上尚未完成作業,請要求取消作業。

副檔名 預覽​​
az quantum job list

取得 Quantum 工作區中的作業清單。

副檔名 預覽​​
az quantum job output

取得執行作業的結果。

副檔名 預覽​​
az quantum job show

取得作業的狀態和詳細數據。

副檔名 預覽​​
az quantum job submit

提交程式或線路以在 Azure Quantum 上執行。

副檔名 預覽​​
az quantum job wait

將 CLI 置於等候狀態,直到作業完成執行為止。

副檔名 預覽​​
az quantum offerings

管理 Azure Quantum 的提供者供應專案。

副檔名 預覽​​
az quantum offerings accept-terms

接受提供者和 SKU 組合的條款,以啟用它以建立工作區。

副檔名 預覽​​
az quantum offerings list

取得指定位置上所有可用的提供者供應項目清單。

副檔名 預覽​​
az quantum offerings show-terms

顯示提供者和 SKU 組合的條款,包括授權 URL 和接受狀態。

副檔名 預覽​​
az quantum run

相當於 az quantum execute

副檔名 預覽​​
az quantum target

管理 Azure Quantum 工作區的目標。

副檔名 預覽​​
az quantum target clear

清除預設的目標識別碼。

副檔名 預覽​​
az quantum target list

取得 Azure Quantum 工作區中的提供者及其目標清單。

副檔名 預覽​​
az quantum target set

選取將作業提交至 Azure Quantum 時要使用的預設目標。

副檔名 預覽​​
az quantum target show

取得將作業提交至 Azure Quantum 時,目前預設目標的目標目標標識碼。

副檔名 預覽​​
az quantum workspace

管理 Azure Quantum 工作區。

副檔名 預覽​​
az quantum workspace clear

清除預設的 Azure Quantum 工作區。

副檔名 預覽​​
az quantum workspace create

建立新的 Azure Quantum 工作區。

副檔名 預覽​​
az quantum workspace delete

刪除指定的 (或目前) Azure Quantum 工作區。

副檔名 預覽​​
az quantum workspace keys

管理 Azure Quantum 工作區 API 金鑰。

副檔名 預覽​​
az quantum workspace keys list

列出指定 Azure Quantum 工作區的 API 金鑰。

副檔名 預覽​​
az quantum workspace keys regenerate

為指定的 Azure Quantum 工作區重新產生 API 金鑰。

副檔名 預覽​​
az quantum workspace list

取得可用的 Azure Quantum 工作區清單。

副檔名 預覽​​
az quantum workspace quotas

列出指定 (或目前) Azure Quantum 工作區的配額。

副檔名 預覽​​
az quantum workspace set

選取預設的 Azure Quantum 工作區以取得未來的命令。

副檔名 預覽​​
az quantum workspace show

取得指定 Azure Quantum 工作區的詳細數據。

副檔名 預覽​​
az quantum workspace update

更新指定的 (或目前) Azure Quantum 工作區。

副檔名 預覽​​

az quantum execute

預覽

命令群組 『quantum』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

提交作業以在 Azure Quantum 上執行,並等候結果。

az quantum execute --location
                   --resource-group
                   --target-id
                   --workspace-name
                   [--entry-point]
                   [--job-input-file]
                   [--job-input-format]
                   [--job-name]
                   [--job-output-format]
                   [--job-params]
                   [--no-build]
                   [--project]
                   [--shots]
                   [--storage]
                   [--target-capability]
                   [<PROGRAM_ARGS>]

範例

從目前資料夾提交 Q# 程式,並等候結果。

az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget

使用作業和程序參數,從目前資料夾提交並等候 Q# 程式。

az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \
    --job-params key1=value1 key2=value2 -- --n-qubits=3

使用 target-capability 參數,從目前資料夾提交並等候 Q# 程式。

az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \
    --target-capability MyTargetCapability

必要參數

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--target-id -t

量子運算作業的執行引擎。 當工作區設定為一組提供者時,它們都會啟用一或多個目標。 您可以使用 來設定預設目標 az quantum target set

--workspace-name -w

Quantum 工作區的名稱。 您可以使用 來設定預設工作區 az quantum workspace set

選擇性參數

--entry-point

QIR 程式或線路的進入點。 QIR 的必要專案。 在 Q# 作業上忽略。

--job-input-file

要送出之輸入檔的位置。 QIR、QIO 和傳遞作業的必要專案。 在 Q# 作業上忽略。

--job-input-format

要送出之檔案的格式。 在 Q# 作業上省略此參數。

--job-name

要提供給此程式的易記名稱。

--job-output-format

預期的作業輸出格式。 在 Q# 作業上忽略。

--job-params

傳遞至目標做為 key=value pair、json 字串或 @{file} json 內容列表的作業參數。

--no-build

[已淘汰]如果指定,則不會在提交之前建置 Q# 程式。

預設值: False
--project

[已淘汰]要提交之 Q# 專案的位置。 預設為目前資料夾。

--shots

在指定目標上執行 Q# 程式的次數。

--storage

如果指定,則會使用 Azure 儲存體 的 連線 ionString 來儲存作業數據和結果。

--target-capability

傳遞至編譯程序的目標功能參數。

<PROGRAM_ARGS>

Q# 作業所預期的自變數清單,指定為 --name=value 之後 --

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az quantum run

預覽

命令群組 『quantum』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

相當於 az quantum execute

az quantum run --location
               --resource-group
               --target-id
               --workspace-name
               [--entry-point]
               [--job-input-file]
               [--job-input-format]
               [--job-name]
               [--job-output-format]
               [--job-params]
               [--no-build]
               [--project]
               [--shots]
               [--storage]
               [--target-capability]
               [<PROGRAM_ARGS>]

範例

從目前資料夾提交 Q# 程式,並等候結果。

az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget

使用作業和程序參數,從目前資料夾提交並等候 Q# 程式。

az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \
    --job-params key1=value1 key2=value2 -- --n-qubits=3

使用 target-capability 參數,從目前資料夾提交並等候 Q# 程式。

az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \
    --target-capability MyTargetCapability

必要參數

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--target-id -t

量子運算作業的執行引擎。 當工作區設定為一組提供者時,它們都會啟用一或多個目標。 您可以使用 來設定預設目標 az quantum target set

--workspace-name -w

Quantum 工作區的名稱。 您可以使用 來設定預設工作區 az quantum workspace set

選擇性參數

--entry-point

QIR 程式或線路的進入點。 QIR 的必要專案。 在 Q# 作業上忽略。

--job-input-file

要送出之輸入檔的位置。 QIR、QIO 和傳遞作業的必要專案。 在 Q# 作業上忽略。

--job-input-format

要送出之檔案的格式。 在 Q# 作業上省略此參數。

--job-name

要提供給此程式的易記名稱。

--job-output-format

預期的作業輸出格式。 在 Q# 作業上忽略。

--job-params

傳遞至目標做為 key=value pair、json 字串或 @{file} json 內容列表的作業參數。

--no-build

[已淘汰]如果指定,則不會在提交之前建置 Q# 程式。

預設值: False
--project

[已淘汰]要提交之 Q# 專案的位置。 預設為目前資料夾。

--shots

在指定目標上執行 Q# 程式的次數。

--storage

如果指定,則會使用 Azure 儲存體 的 連線 ionString 來儲存作業數據和結果。

--target-capability

傳遞至編譯程序的目標功能參數。

<PROGRAM_ARGS>

Q# 作業所預期的自變數清單,指定為 --name=value 之後 --

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。