Target 類別
初始化新的目標。
建構函式
Target(workspace: Workspace, name: str, input_data_format: str = '', output_data_format: str = '', capability: str = '', provider_id: str = '', content_type: ContentType = ContentType.json, encoding: str = '', average_queue_time: float | None = None, current_availability: str = '', target_profile: str | TargetProfile = 'Base')
參數
| 名稱 | Description |
|---|---|
|
workspace
必要
|
相關聯的工作區 |
|
name
必要
|
目標名稱 |
|
input_data_format
必要
|
輸入資料格式(例如“qir.v1”) |
|
output_data_format
必要
|
輸出資料格式(例如「microsoft.quantum-log.v1」) |
|
capability
必要
|
QIR 能力。 已棄用,請使用 target_profile |
|
provider_id
必要
|
提供者身份 |
|
content_type
|
在輸入 Blob 上設定的 “Content-Type” 屬性值 (例如 “application/json”) 預設值: ContentType.json
|
|
encoding
必要
|
在輸入 Blob 上設定的 “Content-Encoding” 屬性值 (例如 “gzip”) |
|
average_queue_time
|
設定平均佇列時間(供內部使用) 預設值: None
|
|
current_availability
必要
|
設定目前的可用性 (供內部使用) |
|
target_profile
|
str | <xref:TargetProfile>
目標QIR檔案。 預設值: Base
|
方法
| from_target_status |
從指定的工作區和目標狀態建立目標實例。 |
| make_params |
傳回輸入參數物件,方便建立輸入參數。 |
| refresh |
更新目標可用性和佇列時間 |
| submit |
提交輸入數據並傳回 Job。 提供input_data_format、output_data_format和content_type關鍵詞自變數來覆寫預設值。 |
from_target_status
make_params
傳回輸入參數物件,方便建立輸入參數。
make_params()
refresh
更新目標可用性和佇列時間
refresh()
submit
提交輸入數據並傳回 Job。
提供input_data_format、output_data_format和content_type關鍵詞自變數來覆寫預設值。
submit(input_data: Any, name: str = 'azure-quantum-job', shots: int = None, input_params: Dict[str, Any] | InputParams | None = None, priority: str | None = None, tags: list[str] | None = None, **kwargs) -> Job
參數
| 名稱 | Description |
|---|---|
|
input_data
必要
|
輸入數據 |
|
name
|
作業名稱 預設值: azure-quantum-job
|
|
shots
|
拍攝次數,預設值為 None 預設值: None
|
|
input_params
|
輸入參數 預設值: None
|
|
priority
|
工作的優先順序。 預設值: None
|
|
tags
|
工作標籤。 預設值: None
|
傳回
| 類型 | Description |
|---|---|
|
Azure Quantum 作業 |
屬性
average_queue_time
平均佇列時間。
current_availability
目前的可用性。
target_names
目標名稱的 Tuple。
target_names = ()