Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Consume CloudJob.Uri property for Azure jobs #194

@rmshaffer

Description

@rmshaffer

After microsoft/qsharp-runtime#294 is merged (see related issue microsoft/qsharp-runtime#236), the CloudJob.Uri property should be consumed in three places:

  1. The output of the IEnumerable<CloudJob>.ToJupyterTable() extension method:

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),

  1. The output of the CloudJob.ToDictionary() extension method:

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,

  1. The Python API code, which consumes the output of CloudJob.ToDictionary():

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

No one assigned

    Labels

    Area-AzureIssue relates to Azure Quantum integration.Kind-EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions