Jobs - Create
Create a job.
PUT https://{azureRegion}.quantum.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId}?api-version=2022-09-12-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
azure
|
path | True |
string |
Supported Azure regions for Azure Quantum Services. For example, "eastus" |
job
|
path | True |
string |
Id of the job. Regex pattern: |
resource
|
path | True |
string |
Name of an Azure resource group. |
subscription
|
path | True |
string |
The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) |
workspace
|
path | True |
string |
Name of the workspace. |
api-version
|
query | True |
string |
The client API version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
containerUri | True |
string |
The blob container SAS uri, the container is used to host job data. |
id | True |
string |
The id of the item. |
inputDataFormat | True |
string |
The format of the input data. |
itemType | True |
string:
Job |
The type of item. |
name | True |
string |
The name of the item. It is not required for the name to be unique and it's only used for display purposes. |
providerId | True |
string |
The unique identifier for the provider. |
target | True |
string |
The target identifier to run the job. |
costEstimate |
The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates. |
||
errorData |
An error response from Azure. |
||
inputDataUri |
string |
The input blob SAS uri, if specified, it will override the default input blob in the container. |
|
inputParams |
object |
The input parameters for the job. JSON object used by the target solver. It is expected that the size of this object is small and only used to specify parameters for the execution target, not the input data. |
|
metadata |
object |
The job metadata. Metadata provides client the ability to store client-specific information |
|
outputDataFormat |
string |
The format of the output data. |
|
outputDataUri |
string |
The output blob SAS uri. When a job finishes successfully, results will be uploaded to this blob. |
|
sessionId |
string |
The ID of the session that the job is part of. |
|
tags |
string[] |
List of user-supplied tags associated with the job. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
AzureAuth
Azure Active Directory OAuth2 Authentication
Type:
oauth2
Flow:
application
Token URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
Scopes
Name | Description |
---|---|
https://quantum.microsoft.com/.default | client credential scope |
Examples
Submit a new job for execution to a Quantum Workspace
Sample Request
PUT https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/workspaces/quantumworkspace1/jobs/a0f7adb6-0378-11eb-9463-2816a847b9a3?api-version=2022-09-12-preview
{
"name": "tabu-demo",
"id": "a0f7adb6-0378-11eb-9463-2816a847b9a3",
"itemType": "Job",
"containerUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"inputDataFormat": "microsoft.qio.v2",
"inputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/inputData?sv=2019-02-02&sr=b&sig=MtgxZEmrCv%2FmeQWFUe6%2Bx9tViSrhxSxYr6euGGHtWnw%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"inputParams": {
"params": {
"sweeps": 300
}
},
"outputDataFormat": "microsoft.qio-results.v2",
"outputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/rawOutputData?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"providerId": "microsoft",
"target": "microsoft.tabu.cpu",
"tags": [
"tag1",
"tag_2"
]
}
Sample Response
{
"name": "tabu-demo",
"id": "a0f7adb6-0378-11eb-9463-2816a847b9a3",
"itemType": "Job",
"jobType": "Unknown",
"beginExecutionTime": "2020-09-30T23:57:11.5659691Z",
"cancellationTime": null,
"containerUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"creationTime": "2020-09-30T23:57:02.3737928+00:00",
"endExecutionTime": "2020-09-30T23:57:11.6180743Z",
"errorData": null,
"inputDataFormat": "microsoft.qio.v2",
"inputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/inputData?sv=2019-02-02&sr=b&sig=MtgxZEmrCv%2FmeQWFUe6%2Bx9tViSrhxSxYr6euGGHtWnw%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"inputParams": {
"params": {
"sweeps": 300
}
},
"metadata": null,
"outputDataFormat": "microsoft.qio-results.v2",
"outputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/rawOutputData?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"providerId": "microsoft",
"status": "Succeeded",
"target": "microsoft.tabu.cpu",
"tags": [
"tag1",
"tag_2"
]
}
{
"name": "tabu-demo",
"id": "a0f7adb6-0378-11eb-9463-2816a847b9a3",
"itemType": "Job",
"jobType": "Unknown",
"beginExecutionTime": "2020-09-30T23:57:11.5659691Z",
"cancellationTime": null,
"containerUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"creationTime": "2020-09-30T23:57:02.3737928+00:00",
"endExecutionTime": "2020-09-30T23:57:11.6180743Z",
"errorData": null,
"inputDataFormat": "microsoft.qio.v2",
"inputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/inputData?sv=2019-02-02&sr=b&sig=MtgxZEmrCv%2FmeQWFUe6%2Bx9tViSrhxSxYr6euGGHtWnw%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"inputParams": {
"params": {
"sweeps": 300
}
},
"metadata": null,
"outputDataFormat": "microsoft.qio-results.v2",
"outputDataUri": "https://storage.blob.core.windows.net/job-a0f7adb6-0378-11eb-9463-2816a847b9a3/rawOutputData?sv=2019-02-02&sr=c&sig=mhbf4fluypvLtgXwN5a7iWMygL6b9ojM4EnCC%2F8BZBg%3D&se=2020-10-01T11%3A57%3A01Z&sp=rcw",
"providerId": "microsoft",
"status": "Succeeded",
"target": "microsoft.tabu.cpu",
"tags": [
"tag1",
"tag_2"
]
}
Definitions
Name | Description |
---|---|
Cost |
The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates. |
Error |
An error response from Azure. |
Job |
Job details. |
Job |
The status of the job. |
Job |
The type of job. |
Quantum |
Quantum computing data. |
Rest |
Error information returned by the API |
Usage |
Usage event details. |
CostEstimate
The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates.
Name | Type | Description |
---|---|---|
currencyCode |
string |
The currency code. |
estimatedTotal |
number |
The estimated total. |
events |
List of usage events |
ErrorData
An error response from Azure.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
message |
string |
A message describing the error, intended to be suitable for displaying in a user interface. |
JobDetails
Job details.
Name | Type | Description |
---|---|---|
beginExecutionTime |
string |
The time when the item began execution. |
cancellationTime |
string |
The time when a job was successfully cancelled. |
containerUri |
string |
The blob container SAS uri, the container is used to host job data. |
costEstimate |
The job cost billed by the provider. The final cost on your bill might be slightly different due to added taxes and currency conversion rates. |
|
creationTime |
string |
The creation time of the item. |
endExecutionTime |
string |
The time when the item finished execution. |
errorData |
An error response from Azure. |
|
id |
string |
The id of the item. |
inputDataFormat |
string |
The format of the input data. |
inputDataUri |
string |
The input blob SAS uri, if specified, it will override the default input blob in the container. |
inputParams |
object |
The input parameters for the job. JSON object used by the target solver. It is expected that the size of this object is small and only used to specify parameters for the execution target, not the input data. |
itemType |
string:
Job |
The type of item. |
jobType |
The type of job. |
|
metadata |
object |
The job metadata. Metadata provides client the ability to store client-specific information |
name |
string |
The name of the item. It is not required for the name to be unique and it's only used for display purposes. |
outputDataFormat |
string |
The format of the output data. |
outputDataUri |
string |
The output blob SAS uri. When a job finishes successfully, results will be uploaded to this blob. |
providerId |
string |
The unique identifier for the provider. |
quantumComputingData |
Quantum computing data. |
|
sessionId |
string |
The ID of the session that the job is part of. |
status |
The status of the job. |
|
tags |
string[] |
List of user-supplied tags associated with the job. |
target |
string |
The target identifier to run the job. |
JobStatus
The status of the job.
Name | Type | Description |
---|---|---|
Cancelled |
string |
|
Executing |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Waiting |
string |
JobType
The type of job.
Name | Type | Description |
---|---|---|
Optimization |
string |
|
QuantumComputing |
string |
|
Unknown |
string |
QuantumComputingData
Quantum computing data.
Name | Type | Description |
---|---|---|
count |
integer |
The number of quantum computing items in the job. |
RestError
Error information returned by the API
Name | Type | Description |
---|---|---|
error |
An error response from Azure. |
UsageEvent
Usage event details.
Name | Type | Description |
---|---|---|
amountBilled |
number |
The amount billed. |
amountConsumed |
number |
The amount consumed. |
dimensionId |
string |
The dimension id. |
dimensionName |
string |
The dimension name. |
measureUnit |
string |
The unit of measure. |
unitPrice |
number |
The unit price. |