swagger: '2.0' info: title: Microsoft Azure Quantum Client description: Azure Quantum REST API client version: 2023-11-13-preview contact: email: azqengg@microsoft.com x-ms-parameterized-host: hostTemplate: '{azureRegion}.quantum.azure.com' parameters: - $ref: '#/parameters/azureRegionParameter' schemes: - https consumes: - application/json produces: - application/json securityDefinitions: AzureAuth: type: oauth2 tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token flow: application description: Azure Active Directory OAuth2 Authentication scopes: https://quantum.microsoft.com/.default: client credential scope AzureKey: type: apiKey name: x-ms-quantum-api-key in: header description: Azure Quantum API key security: - AzureAuth: - https://quantum.microsoft.com/.default - AzureKey: [] paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs : get: operationId: microsoftAzureJobsList description: List jobs. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' responses: '200': description: The operation completed successfully. schema: $ref: '#/definitions/JobDetailsList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-examples: Get list of jobs in a Quantum Workspace: $ref: ./examples/jobList.json x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Jobs tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId} : get: operationId: microsoftAzureJobsGet description: Get job by id parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/jobIdParameter' x-ms-examples: Get a job's metadata: $ref: ./examples/jobGet.json responses: '200': description: OK schema: $ref: '#/definitions/JobDetails' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Jobs Jobid tags: - Subscriptions put: operationId: microsoftAzureJobsCreate description: Create a job. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/jobIdParameter' - name: job description: The complete metadata of the job to submit. in: body required: true schema: $ref: '#/definitions/JobDetails' x-ms-examples: Submit a new job for execution to a Quantum Workspace: $ref: ./examples/jobPut.json responses: '200': description: OK schema: $ref: '#/definitions/JobDetails' '201': description: Created schema: $ref: '#/definitions/JobDetails' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Jobs Jobid tags: - Subscriptions delete: operationId: microsoftAzureJobsCancel description: Cancel a job. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/jobIdParameter' x-ms-examples: Cancel the execution of an existing job: $ref: ./examples/jobDelete.json responses: '204': description: NoContent - The job was successfully cancelled. default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Jobs Jobid tags: - Subscriptions patch: operationId: microsoftAzureJobsPatch description: Patch a job. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/jobIdParameter' - name: patchJob description: The json patch document containing the patch operations. in: body required: true schema: $ref: '#/definitions/PatchRequest' x-ms-examples: Patch an existing job to a Quantum Workspace: $ref: ./examples/jobPatch.json responses: '200': description: OK schema: $ref: '#/definitions/JobDetails' '204': description: No Content - the patch body was empty or had no operations. default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Jobs Jobid tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/providerStatus : get: operationId: microsoftAzureProvidersGetstatus description: Get provider status. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' x-ms-examples: Get list of of providers and their status for a Quantum Workspace: $ref: ./examples/providerStatus.json responses: '200': description: The operation completed successfully. schema: $ref: '#/definitions/ProviderStatusList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Providerstatus tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/storage/sasUri : post: operationId: microsoftAzureStorageSasuri description: >- Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL can be used to upload job input and/or download job output. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - name: blobDetails description: >- The details (name and container) of the blob to store or download data. in: body required: true schema: $ref: '#/definitions/BlobDetails' x-ms-examples: Get a SAS token to upload data for a Quantum Workspace: $ref: ./examples/storageGet.json responses: '200': description: OK schema: $ref: '#/definitions/SasUriResponse' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Storage Sasuri tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/quotas : get: operationId: microsoftAzureQuotasList description: List quotas for the given workspace. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' x-ms-examples: Get a list of quotas for a particular quantum workspace.: $ref: ./examples/quotaList.json responses: '200': description: OK schema: $ref: '#/definitions/QuotaList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Quotas tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/sessions : get: operationId: microsoftAzureSessionsList description: List sessions. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' responses: '200': description: The operation completed successfully. schema: $ref: '#/definitions/SessionDetailsList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-examples: Get list of sessions in a Quantum Workspace: $ref: ./examples/sessionList.json x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Sessions tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/sessions/{sessionId} : get: operationId: microsoftAzureSessionsGet description: Get session by id parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/sessionIdParameter' x-ms-examples: Get a session's metadata: $ref: ./examples/sessionGet.json responses: '200': description: OK schema: $ref: '#/definitions/SessionDetails' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Sessions Sessionid tags: - Subscriptions put: operationId: microsoftAzureSessionsOpen description: Open a session. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/sessionIdParameter' - name: session description: The complete metadata of the session to be opened. in: body required: true schema: $ref: '#/definitions/SessionDetails' x-ms-examples: Open a new session in the Quantum Workspace: $ref: ./examples/sessionPut.json responses: '200': description: OK schema: $ref: '#/definitions/SessionDetails' '201': description: Created schema: $ref: '#/definitions/SessionDetails' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Sessions Sessionid tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/sessions/{sessionId}:close : post: operationId: microsoftAzureSessionsClose description: Close a session parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/sessionIdParameter' x-ms-examples: Close a session: $ref: ./examples/sessionClose.json responses: '200': description: OK schema: $ref: '#/definitions/SessionDetails' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' summary: >- Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Sessions Sessionid:close tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/sessions/{sessionId}/jobs : get: operationId: microsoftAzureSessionsJobslist description: List jobs in a session. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' - $ref: '#/parameters/sessionIdParameter' responses: '200': description: The operation completed successfully. schema: $ref: '#/definitions/JobDetailsList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-examples: Get list of jobs in a session: $ref: ./examples/sessionJobsList.json x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Sessions Sessionid Jobs tags: - Subscriptions ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/topLevelItems : get: operationId: microsoftAzureToplevelitemsList description: List top-level items. parameters: - $ref: '#/parameters/apiVersionParameter' - $ref: '#/parameters/subscriptionIdParameter' - $ref: '#/parameters/resourceGroupNameParameter' - $ref: '#/parameters/workspaceNameParameter' responses: '200': description: The operation completed successfully. schema: $ref: '#/definitions/ItemDetailsList' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/RestError' x-ms-examples: Get list of top-level items: $ref: ./examples/topLevelItemsList.json x-ms-pageable: nextLinkName: nextLink summary: >- Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Quantum Workspaces Workspacename Toplevelitems tags: - Subscriptions definitions: ItemDetailsList: description: List of item details. type: object properties: value: type: array items: $ref: '#/definitions/ItemDetails' nextLink: type: string description: Link to the next page of results. required: - value ItemDetails: description: Item details. An item can be a job or a session. type: object discriminator: itemType properties: id: type: string description: The id of the item. name: type: string description: >- The name of the item. It is not required for the name to be unique and it's only used for display purposes. providerId: type: string description: The unique identifier for the provider. target: type: string description: The target identifier to run the job. itemType: type: string description: The type of item. enum: - Job - Session x-ms-enum: name: ItemType modelAsString: true values: - value: Job description: A program, problem, or application submitted for processing. - value: Session description: A logical grouping of jobs. creationTime: type: string readOnly: true format: date-time description: The creation time of the item. beginExecutionTime: type: string readOnly: true format: date-time description: The time when the item began execution. endExecutionTime: type: string readOnly: true format: date-time description: The time when the item finished execution. costEstimate: $ref: '#/definitions/CostEstimate' errorData: $ref: '#/definitions/ErrorData' required: - id - name - providerId - target - itemType JobDetailsList: description: List of job details. type: object properties: value: type: array items: $ref: '#/definitions/JobDetails' nextLink: type: string description: Link to the next page of results. JobDetails: description: Job details. type: object x-ms-discriminator-value: Job allOf: - $ref: '#/definitions/ItemDetails' properties: jobType: type: string description: The type of job. enum: - Unknown - QuantumComputing - Optimization readOnly: true x-ms-enum: name: JobType modelAsString: true sessionId: type: string description: The ID of the session that the job is part of. containerUri: type: string description: The blob container SAS uri, the container is used to host job data. inputDataUri: type: string description: >- The input blob SAS uri, if specified, it will override the default input blob in the container. inputDataFormat: type: string description: The format of the input data. inputParams: type: object description: >- 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. status: type: string description: The status of the job. readOnly: true enum: - Waiting - Executing - Succeeded - Failed - Cancelled x-ms-enum: name: JobStatus modelAsString: true metadata: type: object additionalProperties: type: string description: >- The job metadata. Metadata provides client the ability to store client-specific information outputDataUri: type: string description: >- The output blob SAS uri. When a job finishes successfully, results will be uploaded to this blob. outputDataFormat: type: string description: The format of the output data. cancellationTime: type: string readOnly: true format: date-time description: The time when a job was successfully cancelled. quantumComputingData: $ref: '#/definitions/QuantumComputingData' tags: type: array items: type: string description: List of user-supplied tags associated with the job. required: - containerUri - inputDataFormat SessionDetailsList: description: List of session details. type: object properties: value: type: array items: $ref: '#/definitions/SessionDetails' nextLink: type: string description: Link to the next page of results. SessionDetails: description: Session details. type: object x-ms-discriminator-value: Session allOf: - $ref: '#/definitions/ItemDetails' properties: jobFailurePolicy: type: string description: >- Policy controlling the behavior of the Session when a job in the session fails. enum: - Abort - Continue default: Abort x-ms-enum: name: SessionJobFailurePolicy modelAsString: true values: - value: Abort description: 'New jobs submitted after a job fails will be rejected. ' - value: Continue description: New jobs submitted after a job fails will be accepted. status: type: string description: The status of the session. readOnly: true enum: - Waiting - Executing - Succeeded - Failed - Failure(s) - TimedOut x-ms-enum: name: SessionStatus modelAsString: true QuantumComputingData: description: Quantum computing data. type: object readOnly: true properties: count: type: integer format: int64 description: The number of quantum computing items in the job. BlobDetails: description: Blob details. type: object properties: containerName: type: string description: The container name. blobName: type: string description: The blob name. required: - containerName SasUriResponse: description: Get SAS URL operation response. type: object properties: sasUri: type: string description: >- A URL with a SAS token to upload a blob for execution in the given workspace. ProviderStatusList: description: Providers status. type: object properties: value: type: array items: $ref: '#/definitions/ProviderStatus' nextLink: type: string description: Link to the next page of results. ProviderStatus: description: Providers status. type: object properties: id: type: string description: Provider id. currentAvailability: type: string description: Provider availability. enum: - Available - Degraded - Unavailable x-ms-enum: name: ProviderAvailability modelAsString: true targets: type: array items: $ref: '#/definitions/TargetStatus' TargetStatus: description: Target status. type: object properties: id: type: string description: Target id. currentAvailability: type: string description: Target availability. enum: - Available - Degraded - Unavailable x-ms-enum: name: TargetAvailability modelAsString: true averageQueueTime: type: integer format: int64 description: Average queue time in seconds. statusPage: type: string description: A page with detailed status of the provider. QuotaList: description: List of quotas. type: object properties: value: type: array items: $ref: '#/definitions/Quota' nextLink: type: string description: Link to the next page of results. Quota: description: Quota information. type: object properties: dimension: type: string description: The name of the dimension associated with the quota. scope: type: string description: The scope at which the quota is applied. enum: - Workspace - Subscription x-ms-enum: name: DimensionScope modelAsString: true providerId: type: string description: The unique identifier for the provider. utilization: type: number description: The amount of the usage that has been applied for the current period. holds: type: number description: >- The amount of the usage that has been reserved but not applied for the current period. limit: type: number description: The maximum amount of usage allowed for the current period. period: type: string description: >- The time period in which the quota's underlying meter is accumulated. Based on calendar year. 'None' is used for concurrent quotas. enum: - None - Monthly x-ms-enum: name: MeterPeriod modelAsString: true CostEstimate: description: >- 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. type: object properties: currencyCode: type: string description: The currency code. events: type: array description: List of usage events items: $ref: '#/definitions/UsageEvent' estimatedTotal: type: number description: The estimated total. UsageEvent: description: Usage event details. type: object properties: dimensionId: type: string description: The dimension id. dimensionName: type: string description: The dimension name. measureUnit: type: string description: The unit of measure. amountBilled: type: number description: The amount billed. amountConsumed: type: number description: The amount consumed. unitPrice: type: number description: The unit price. RestError: description: Error information returned by the API type: object properties: error: $ref: '#/definitions/ErrorData' required: - error ErrorData: description: An error response from Azure. type: object properties: code: type: string description: >- An identifier for the error. Codes are invariant and are intended to be consumed programmatically. message: type: string description: >- A message describing the error, intended to be suitable for displaying in a user interface. required: - code - message PatchRequest: type: array items: $ref: '#/definitions/JsonPatchDocument' JsonPatchDocument: description: A JSONPatch document as defined by RFC 6902 type: object required: - op - path properties: op: type: string description: The operation to be performed. enum: - add - remove - replace - move - copy - test x-ms-enum: name: JsonPatchOperation modelAsString: true path: type: string description: A JSON-Pointer. value: type: object description: A value to be used in the operation on the path. from: type: string description: Optional field used in copy and move operations. parameters: azureRegionParameter: name: azureRegion description: Supported Azure regions for Azure Quantum Services. For example, "eastus" required: true x-ms-parameter-location: client x-ms-skip-url-encoding: true type: string in: path apiVersionParameter: name: api-version in: query description: The client API version. required: true x-ms-parameter-location: client type: string subscriptionIdParameter: name: subscriptionId description: >- The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) in: path required: true x-ms-parameter-location: client type: string resourceGroupNameParameter: name: resourceGroupName in: path required: true type: string x-ms-parameter-location: client description: Name of an Azure resource group. workspaceNameParameter: name: workspaceName in: path required: true type: string x-ms-parameter-location: client description: Name of the workspace. jobIdParameter: name: jobId in: path required: true type: string pattern: >- ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$ maxLength: 36 x-ms-parameter-location: method description: Id of the job. sessionIdParameter: name: sessionId in: path required: true type: string pattern: >- ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$ maxLength: 36 x-ms-parameter-location: method description: Id of the session. tags: - name: Subscriptions