This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Consume CloudJob.Uri property for Azure jobs #194
Copy link
Copy link
Closed
Labels
Area-AzureIssue relates to Azure Quantum integration.Issue relates to Azure Quantum integration.Kind-EnhancementNew feature or requestNew feature or request
Milestone
Description
After microsoft/qsharp-runtime#294 is merged (see related issue microsoft/qsharp-runtime#236), the CloudJob.Uri property should be consumed in three places:
- The output of the
IEnumerable<CloudJob>.ToJupyterTable()extension method:
iqsharp/src/AzureClient/Visualization/CloudJobEncoders.cs
Lines 39 to 47 in 852bac2
| internal static Table<CloudJob> ToJupyterTable(this IEnumerable<CloudJob> jobsList) => | |
| new Table<CloudJob> | |
| { | |
| Columns = new List<(string, Func<CloudJob, string>)> | |
| { | |
| // TODO: add cloudJob.Uri after https://github.com/microsoft/qsharp-runtime/issues/236 is fixed. | |
| ("Job Name", cloudJob => cloudJob.Details.Name), | |
| ("Job ID", cloudJob => cloudJob.Id), | |
| ("Job Status", cloudJob => cloudJob.Status), |
- The output of the
CloudJob.ToDictionary()extension method:
iqsharp/src/AzureClient/Visualization/CloudJobEncoders.cs
Lines 25 to 31 in 852bac2
| internal static Dictionary<string, object?> ToDictionary(this CloudJob cloudJob) => | |
| new Dictionary<string, object?>() | |
| { | |
| // TODO: add cloudJob.Uri after https://github.com/microsoft/qsharp-runtime/issues/236 is fixed. | |
| ["id"] = cloudJob.Id, | |
| ["name"] = cloudJob.Details.Name, | |
| ["status"] = cloudJob.Status, |
- The Python API code, which consumes the output of
CloudJob.ToDictionary():
iqsharp/src/Python/qsharp/azure.py
Lines 58 to 66 in 475c3d2
| class AzureJob(object): | |
| """ | |
| Represents an instance of an Azure Quantum job. | |
| """ | |
| def __init__(self, data: Dict): | |
| self.__dict__ = data | |
| self.id = data["id"] | |
| self.name = data["name"] | |
| self.status = data["status"] |
Metadata
Metadata
Assignees
Labels
Area-AzureIssue relates to Azure Quantum integration.Issue relates to Azure Quantum integration.Kind-EnhancementNew feature or requestNew feature or request