diff --git a/custom-words.txt b/custom-words.txt index 94bc357e9541..3dec64c21f4f 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -866,6 +866,7 @@ jobpreparation jobpreparationandreleasetaskstatus jobrelease jobschedule +jobscheduler jobschedules johnc johnsmith diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobDelete.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobDelete.json new file mode 100644 index 000000000000..705e0ea4d43c --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "jobId": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1" + }, + "responses": { + "204": {} + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobGet.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobGet.json new file mode 100644 index 000000000000..856b90a6eef1 --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobGet.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "jobId": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1" + }, + "responses": { + "200": { + "body": { + "name": "tabu-demo", + "id": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "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" + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobList.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobList.json new file mode 100644 index 000000000000..6ab73f697d25 --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobList.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "tabu-demo", + "id": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "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" + }, + { + "id": "ab1aeddd-f191-4884-b8a9-13cdfa020fc6", + "name": "Superposition: true", + "beginExecutionTime": "2020-09-18T23:25:45.781389Z", + "cancellationTime": null, + "containerUri": "https://storage.blob.core.windows.net/quantum-job-ab1aeddd-f191-4884-b8a9-13cdfa020fc6?sv=2019-02-02&sr=c&sig=xhQtyt7Forj1HtpEkBTJTXAMTuuEvN0dTssv2OZlUNk%3D&se=2020-09-25T23%3A25%3A32Z&sp=rcw", + "creationTime": "2020-09-18T23:25:33.5541484+00:00", + "endExecutionTime": "2020-09-18T23:25:53.911837Z", + "errorData": null, + "inputDataFormat": "microsoft.qci-ir.v1", + "inputDataUri": "https://storage.blob.core.windows.net/quantum-job-ab1aeddd-f191-4884-b8a9-13cdfa020fc6/inputData?sv=2019-02-02&sr=b&sig=nDMUBPqNskFDLq591NGBE4nVnCiQhXYQBhSiU4xseVY%3D&se=2020-09-19T00%3A25%3A33Z&sp=rcw", + "inputParams": { + "shots": "10" + }, + "metadata": { + "entryPointInput": "true", + "outputMappingBlobUri": "https://storage.blob.core.windows.net/quantum-job-ab1aeddd-f191-4884-b8a9-13cdfa020fc6/mappingData?sv=2019-02-02&sr=b&sig=k6Gvd396GUtBxJasU9muSzkYXPQb8utASRSz932MFiw%3D&se=2020-09-19T00%3A25%3A33Z&sp=rcw" + }, + "outputDataFormat": "microsoft.quantum-results.v1", + "outputDataUri": "https://storage.blob.core.windows.net/quantum-job-ab1aeddd-f191-4884-b8a9-13cdfa020fc6/outputData?sv=2019-02-02&sr=c&sig=xhQtyt7Forj1HtpEkBTJTXAMTuuEvN0dTssv2OZlUNk%3D&se=2020-09-25T23%3A25%3A32Z&sp=rcw", + "providerId": "qci", + "status": "Succeeded", + "target": "qci.simulator" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobPut.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobPut.json new file mode 100644 index 000000000000..210ad9795310 --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/jobPut.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "jobId": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1", + "job": { + "name": "tabu-demo", + "id": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "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" + } + }, + "responses": { + "200": { + "body": { + "name": "tabu-demo", + "id": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "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" + } + }, + "201": { + "body": { + "name": "tabu-demo", + "id": "a0f7adb6-0378-11eb-9463-2816a847b9a3", + "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" + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerStatus.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerStatus.json new file mode 100644 index 000000000000..4369f518c3ec --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerStatus.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "Microsoft", + "currentAvailability": "Available", + "targets": [ + { + "id": "microsoft.paralleltempering-parameterfree.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.paralleltempering.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.simulatedannealing-parameterfree.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.simulatedannealing.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.tabu-parameterfree.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.tabu.cpu", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.simulatedannealing-parameterfree.fpga", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + }, + { + "id": "microsoft.simulatedannealing.fpga", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": null + } + ] + }, + { + "id": "ionq", + "currentAvailability": "Available", + "targets": [ + { + "id": "ionq.qpu", + "currentAvailability": "Available", + "averageQueueTime": 1679, + "statusPage": "https://status.ionq.co" + }, + { + "id": "ionq.simulator", + "currentAvailability": "Available", + "averageQueueTime": 0, + "statusPage": "https://status.ionq.co" + } + ] + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/storageGet.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/storageGet.json new file mode 100644 index 000000000000..d968ec0660e6 --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/storageGet.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1", + "blobDetails": { + "containerName": "some_container", + "blobName": "input_blob" + } + }, + "responses": { + "200": { + "body": { + "sasUri": "https://storage.blob.core.windows.net/some_container/input_blob?sv=2019-02-02&sr=b&sig=cdO24OOoXterLJVM8T6QpSaog3ST4PjQsDj3mLflfJA%3D&se=2020-10-17T10%3A03%3A01Z&sp=rcw" + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json new file mode 100644 index 000000000000..8485cd7a5432 --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -0,0 +1,556 @@ +{ + "swagger": "2.0", + "info": { + "title": "Quantum Client", + "description": "Azure Quantum REST API client", + "version": "2019-11-04-preview" + }, + "host": "quantum.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs": { + "get": { + "operationId": "Jobs_List", + "description": "List jobs.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/JobDetailsList" + } + } + }, + "x-ms-examples": { + "Get list of jobs in a Quantum Workspace": { + "$ref": "./examples/jobList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId}": { + "get": { + "operationId": "Jobs_Get", + "description": "Get job by id", + "parameters": [ + { + "$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" + } + } + } + }, + "put": { + "operationId": "Jobs_Create", + "description": "Create a job.", + "parameters": [ + { + "$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" + } + } + } + }, + "delete": { + "operationId": "Jobs_Cancel", + "description": "Cancel a job.", + "parameters": [ + { + "$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" + } + } + } + } + }, + "/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/providerStatus": { + "get": { + "operationId": "Providers_GetStatus", + "description": "Get provider status.", + "parameters": [ + { + "$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" + } + } + }, + "/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/storage/sasUri": { + "post": { + "operationId": "Storage_SasUri", + "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/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" + } + } + } + } + } + }, + "definitions": { + "JobDetailsList": { + "description": "List of job details.", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/JobDetails" + } + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total records count number." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link to the next page of results." + } + } + }, + "JobDetails": { + "description": "Job details.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The job id." + }, + "name": { + "type": "string", + "description": "The job name. Is not required for the name to be unique and it's only used for display purposes." + }, + "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." + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the provider." + }, + "target": { + "type": "string", + "description": "The target identifier to run the job." + }, + "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." + }, + "status": { + "type": "string", + "description": "The job status.", + "readOnly": true, + "enum": [ + "Waiting", + "Executing", + "Succeeded", + "Failed", + "Cancelled" + ], + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": true + } + }, + "creationTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The creation time of the job." + }, + "beginExecutionTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The time when the job began execution." + }, + "endExecutionTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The time when the job finished execution." + }, + "cancellationTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The time when a job was successfully cancelled." + }, + "errorData": { + "$ref": "#/definitions/ErrorData", + "readOnly": true, + "description": "The error data for the job. This is expected only when Status 'Failed'." + } + }, + "required": [ + "containerUri", + "inputDataFormat", + "providerId", + "target" + ] + }, + "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.", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ProviderStatus" + } + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link to the next page of results." + } + } + }, + "ProviderStatus": { + "description": "Providers status.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Provider id." + }, + "currentAvailability": { + "type": "string", + "readOnly": true, + "description": "Provider availability.", + "enum": [ + "Available", + "Degraded", + "Unavailable" + ], + "x-ms-enum": { + "name": "ProviderAvailability", + "modelAsString": true + } + }, + "targets": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/TargetStatus" + } + } + } + }, + "TargetStatus": { + "description": "Target status.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Target id." + }, + "currentAvailability": { + "type": "string", + "readOnly": true, + "description": "Target availability.", + "enum": [ + "Available", + "Degraded", + "Unavailable" + ], + "x-ms-enum": { + "name": "TargetAvailability", + "modelAsString": true + } + }, + "averageQueueTime": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Average queue time in seconds." + }, + "statusPage": { + "type": "string", + "readOnly": true, + "description": "A page with detailed status of the provider." + } + } + }, + "restError": { + "type": "object", + "description": "Error information returned by the API", + "properties": { + "error": { + "$ref": "#/definitions/ErrorData" + } + } + }, + "ErrorData": { + "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." + } + }, + "description": "An error response from Azure." + } + }, + "parameters": { + "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", + "x-ms-parameter-location": "method", + "description": "Id of the job." + } + } +} diff --git a/specification/quantum/data-plane/readme.csharp.md b/specification/quantum/data-plane/readme.csharp.md new file mode 100644 index 000000000000..2b4dfa0aee34 --- /dev/null +++ b/specification/quantum/data-plane/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: true + namespace: Microsoft.Azure.Quantum.Client + output-folder: $(csharp-sdks-folder)/quantum/Microsoft.Azure.Quantum.Client/src/Generated +``` diff --git a/specification/quantum/data-plane/readme.java.md b/specification/quantum/data-plane/readme.java.md new file mode 100644 index 000000000000..e077e23055e3 --- /dev/null +++ b/specification/quantum/data-plane/readme.java.md @@ -0,0 +1,14 @@ +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + fluent: true + namespace: com.microsoft.azure.quantum + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/azure-quantum +``` \ No newline at end of file diff --git a/specification/quantum/data-plane/readme.md b/specification/quantum/data-plane/readme.md new file mode 100644 index 000000000000..107be6e48189 --- /dev/null +++ b/specification/quantum/data-plane/readme.md @@ -0,0 +1,77 @@ +# quantum + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for quantum. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the quantum. + +```yaml +openapi-type: data-plane +tag: package-2019-11-04-preview +``` + +### Tag: package-2019-11-04-preview + +These settings apply only when `--tag=package-2019-11-04-preview` is specified on the command line. + +```yaml $(tag) == 'package-2019-11-04-preview' +input-file: + - Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-js + - repo: azure-sdk-for-node +``` + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## Java + +See configuration in [readme.go.md](./readme.java.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + + +## Node.js + +See configuration in [readme.go.md](./readme.nodejs.md) diff --git a/specification/quantum/data-plane/readme.nodejs.md b/specification/quantum/data-plane/readme.nodejs.md new file mode 100644 index 000000000000..b76d396bb88e --- /dev/null +++ b/specification/quantum/data-plane/readme.nodejs.md @@ -0,0 +1,15 @@ +## Node.js + +These settings apply only when `--nodejs` is specified on the command line. +Please also specify `--node-sdks-folder=`. + +``` yaml $(nodejs) +nodejs: + azure-arm: true + package-name: azure-quantum + output-folder: $(node-sdks-folder)/lib/services/quantum + payload-flattening-threshold: 1 + generate-license-txt: true + generate-package-json: false + generate-readme-md: false +``` diff --git a/specification/quantum/data-plane/readme.python.md b/specification/quantum/data-plane/readme.python.md new file mode 100644 index 000000000000..c192d9b75b1c --- /dev/null +++ b/specification/quantum/data-plane/readme.python.md @@ -0,0 +1,25 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.quantum + package-name: azure-quantum + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/quantum/azure-quantum/azure/quantum +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/quantum/azure-quantum +``` diff --git a/specification/quantum/data-plane/readme.typescript.md b/specification/quantum/data-plane/readme.typescript.md new file mode 100644 index 000000000000..8c3e92f6290a --- /dev/null +++ b/specification/quantum/data-plane/readme.typescript.md @@ -0,0 +1,17 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + package-name: "@azure/quantum" + output-folder: "$(typescript-sdks-folder)/sdk/quantum/quantum" + payload-flattening-threshold: 1 + generate-metadata: true + generate-license-txt: true + generate-package-json: false + generate-readme-md: false +```