@@ -259,7 +316,7 @@ public static string OperationVariants(this Type t, object op)
return OperationVariants(generic.OperationType, op);
}
- return OperationVariants(t.BaseType, op);
+ return OperationVariants(t.BaseType, op);
}
public static bool TryQSharpOperationType(Type t, out string typeName)
diff --git a/src/Simulation/Core/Udts/UDTPartial.cs b/src/Simulation/Core/Udts/UDTPartial.cs
index 8d586d4ee80..a97a92f870f 100644
--- a/src/Simulation/Core/Udts/UDTPartial.cs
+++ b/src/Simulation/Core/Udts/UDTPartial.cs
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+#nullable enable
+
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -62,6 +64,18 @@ public ICallable Partial(object partialTuple)
return (ICallable)Activator.CreateInstance(partialType, new object[] { this, partialTuple });
}
+ ///
+ public RuntimeMetadata? GetRuntimeMetadata(IApplyData args)
+ {
+ Debug.Assert(args.Value is P, $"Failed to retrieve runtime metadata for {typeof(U).Name}.");
+ var baseArgs = this.Apply((P) args.Value);
+ return new RuntimeMetadata()
+ {
+ Label = typeof(U).Name,
+ FormattedNonQubitArgs = baseArgs?.GetNonQubitArgumentsAsString() ?? "",
+ };
+ }
+
internal class DebuggerProxy
{
private readonly UDTPartial u;
diff --git a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs
index 131e7899e01..a491fe0d43f 100644
--- a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs
+++ b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs
@@ -1262,6 +1262,11 @@ namespace Microsoft.Quantum.Compiler.Generics {
genIter(genU1, a);
}
+ operation genericWithMultipleTypeParams<'A, 'B, 'C>() : Unit { }
+
+ operation callsGenericWithMultipleTypeParams () : Unit {
+ genericWithMultipleTypeParams();
+ }
operation composeImpl<'A, 'B> (second : ('A => Unit), first : ('B => 'A), arg : 'B) : Unit {
diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs
index 90416d37e9e..de97e3aedc8 100644
--- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs
+++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs
@@ -167,6 +167,7 @@ namespace N1
let genMapper = findCallable @"genMapper"
let genIter = findCallable @"genIter"
let usesGenerics = findCallable @"usesGenerics"
+ let callsGenericWithMultipleTypeParams = findCallable @"callsGenericWithMultipleTypeParams"
let duplicatedDefinitionsCaller = findCallable @"duplicatedDefinitionsCaller"
let nestedArgTuple1 = findCallable @"nestedArgTuple1"
let nestedArgTuple2 = findCallable @"nestedArgTuple2"
@@ -453,6 +454,11 @@ namespace N1
]
|> testOne usesGenerics
+ [
+ ((NSG, "genericWithMultipleTypeParams"), "ICallable")
+ ]
+ |> testOne callsGenericWithMultipleTypeParams
+
[
((NS2, "Allocate" ), "Allocate")
((NS2, "H" ), "IUnitary")
@@ -897,13 +903,18 @@ namespace N1
|> testOne usesGenerics
[
- template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z"
+ template "genericWithMultipleTypeParams" "ICallable" "genericWithMultipleTypeParams<,,>"
+ ]
+ |> testOne callsGenericWithMultipleTypeParams
+
+ [
+ template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z"
"this.self = this;"
]
|> testOne selfInvokingOperation
[
- template "self" "ICallable" "genRecursion<>"
+ template "self" "ICallable" "genRecursion<>"
]
|> testOne genRecursion
@@ -934,6 +945,11 @@ namespace N1
|> List.sort
|> testOne usesGenerics
+ [
+ template "genericWithMultipleTypeParams<,,>"
+ ]
+ |> testOne callsGenericWithMultipleTypeParams
+
[
template "composeImpl<,>"
]
@@ -979,6 +995,11 @@ namespace N1
]
|> testOne usesGenerics
+ [
+ template "ICallable" "genericWithMultipleTypeParams"
+ ]
+ |> testOne callsGenericWithMultipleTypeParams
+
[
template "IUnitary" "Z"
template "IAdjointable" "self"
@@ -2502,7 +2523,7 @@ namespace N1
|> testOneClass genCtrl3 AssemblyConstants.HoneywellProcessor
"""
- [SourceLocation("%%%", OperationFunctor.Body, 1266, 1272)]
+ [SourceLocation("%%%", OperationFunctor.Body, 1271, 1277)]
public partial class composeImpl<__A__, __B__> : Operation<(ICallable,ICallable,__B__), QVoid>, ICallable
{
public composeImpl(IOperationFactory m) : base(m)
@@ -2579,7 +2600,7 @@ namespace N1
[]
let ``buildOperationClass - access modifiers`` () =
"""
-[SourceLocation("%%%", OperationFunctor.Body, 1314, 1316)]
+[SourceLocation("%%%", OperationFunctor.Body, 1319, 1321)]
internal partial class EmptyInternalFunction : Function, ICallable
{
public EmptyInternalFunction(IOperationFactory m) : base(m)
@@ -2613,7 +2634,7 @@ internal partial class EmptyInternalFunction : Function, ICallable
|> testOneClass emptyInternalFunction null
"""
-[SourceLocation("%%%", OperationFunctor.Body, 1316, 1318)]
+[SourceLocation("%%%", OperationFunctor.Body, 1321, 1323)]
internal partial class EmptyInternalOperation : Operation, ICallable
{
public EmptyInternalOperation(IOperationFactory m) : base(m)
@@ -2730,7 +2751,7 @@ internal partial class EmptyInternalOperation : Operation, ICallab
[]
let ``buildOperationClass - concrete functions`` () =
"""
- [SourceLocation("%%%", OperationFunctor.Body, 1301,1310)]
+ [SourceLocation("%%%", OperationFunctor.Body, 1306,1315)]
public partial class UpdateUdtItems : Function, ICallable
{
public UpdateUdtItems(IOperationFactorym) : base(m)
diff --git a/src/Simulation/CsharpGeneration/EntryPoint.fs b/src/Simulation/CsharpGeneration/EntryPoint.fs
index 8906a7403c7..f359f26f1f3 100644
--- a/src/Simulation/CsharpGeneration/EntryPoint.fs
+++ b/src/Simulation/CsharpGeneration/EntryPoint.fs
@@ -133,21 +133,28 @@ let private mainMethod context entryPoint =
let private entryPointClass context entryPoint =
let callableName, argTypeName, returnTypeName = callableTypeNames context entryPoint
let property name typeName value = ``property-arrow_get`` typeName name [``public``] get (``=>`` value)
- let summaryProperty = property "Summary" "string" (literal ((PrintSummary entryPoint.Documentation false).Trim ()))
+ let summaryProperty =
+ (PrintSummary entryPoint.Documentation false).Trim ()
+ |> literal
+ |> property "Summary" "string"
let parameters = parameters context entryPoint.Documentation entryPoint.ArgumentTuple
let defaultSimulator =
context.assemblyConstants.TryGetValue AssemblyConstants.DefaultSimulator
- |> snd
- |> (fun value -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value)
- let defaultSimulatorNameProperty = property "DefaultSimulatorName" "string" (literal defaultSimulator)
+ |> fun (_, value) -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value
+ let defaultSimulatorNameProperty = literal defaultSimulator |> property "DefaultSimulatorName" "string"
+ let defaultExecutionTargetProperty =
+ context.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget
+ |> (fun (_, value) -> if value = null then "" else value)
+ |> literal
+ |> property "DefaultExecutionTarget" "string"
let infoProperty =
- property "Info"
- (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName)
- (ident callableName <|.|> ident "Info")
+ property "Info" (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName)
+ (ident callableName <|.|> ident "Info")
let members : MemberDeclarationSyntax list = [
summaryProperty
parameterOptionsProperty parameters
defaultSimulatorNameProperty
+ defaultExecutionTargetProperty
infoProperty
customSimulatorFactory defaultSimulator
createArgument context entryPoint
diff --git a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1
index 0c3695812f9..f669dac1860 100644
--- a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1
+++ b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1
@@ -21,13 +21,13 @@
using namespace System.IO
-$target = 'Microsoft.Quantum.CsharpGeneration.nuspec'
+$target = Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec'
if (Test-Path $target) {
Write-Host "$target exists. Skipping generating new one."
exit
}
-$nuspec = [Xml](Get-Content 'Microsoft.Quantum.CsharpGeneration.nuspec.template')
+$nuspec = [Xml](Get-Content (Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec.template'))
$dependencies = $nuspec.CreateElement('dependencies', $nuspec.package.metadata.NamespaceURI)
# Adds a dependency to the dependencies element if it does not already exist.
diff --git a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template
index f964fcb499e..bf1d252d914 100644
--- a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template
+++ b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template
@@ -1,5 +1,5 @@
-
+
Microsoft.Quantum.CsharpGeneration
$version$
@@ -9,7 +9,7 @@
MIT
https://docs.microsoft.com/en-us/quantum
- https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png
+ images\qdk-nuget-icon.png
false
C# code generation for executing Q# programs on a quantum simulator.
@@ -24,5 +24,6 @@
+
diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs
index 30e83926c90..30d8bcdd95a 100644
--- a/src/Simulation/CsharpGeneration/SimulationCode.fs
+++ b/src/Simulation/CsharpGeneration/SimulationCode.fs
@@ -93,9 +93,7 @@ module SimulationCode =
let isGeneric context (n: QsQualifiedName) =
if context.allCallables.ContainsKey n then
let signature = context.allCallables.[n].Signature
- let tIn = signature.ArgumentType
- let tOut = signature.ReturnType
- hasTypeParameters [tIn;tOut]
+ not signature.TypeParameters.IsEmpty
else
false
@@ -861,9 +859,7 @@ module SimulationCode =
let opName = if sameNamespace then n.Name.Value else n.Namespace.Value + "." + n.Name.Value
if isGeneric context n then
let signature = context.allCallables.[n].Signature
- let tIn = signature.ArgumentType
- let tOut = signature.ReturnType
- let count = (getTypeParameters [tIn;tOut]).Length
+ let count = signature.TypeParameters.Length
sprintf "%s<%s>" opName (String.replicate (count - 1) ",")
else
opName
diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs
index 9d3c9c5d0aa..7206cf9f44e 100644
--- a/src/Simulation/EntryPointDriver.Tests/Tests.fs
+++ b/src/Simulation/EntryPointDriver.Tests/Tests.fs
@@ -4,6 +4,7 @@
module Microsoft.Quantum.EntryPointDriver.Tests
open System
+open System.Collections.Generic
open System.Collections.Immutable
open System.Globalization
open System.IO
@@ -59,14 +60,9 @@ let private compileQsharp source =
Assert.Empty errors
compilation.BuiltCompilation
-/// Generates C# source code from the compiled Q# syntax tree. The given default simulator is set as an assembly
-/// constant.
-let private generateCsharp defaultSimulator (compilation : QsCompilation) =
- let assemblyConstants =
- match defaultSimulator with
- | Some simulator -> ImmutableDictionary.Empty.Add (AssemblyConstants.DefaultSimulator, simulator)
- | None -> ImmutableDictionary.Empty
- let context = CodegenContext.Create (compilation, assemblyConstants)
+/// Generates C# source code from the compiled Q# syntax tree using the given assembly constants.
+let private generateCsharp constants (compilation : QsCompilation) =
+ let context = CodegenContext.Create (compilation, constants)
let entryPoint = context.allCallables.[Seq.exactlyOne compilation.EntryPoints]
[
SimulationCode.generate (NonNullable<_>.New testFile) context
@@ -112,12 +108,12 @@ let private compileCsharp (sources : string seq) =
Assert.Equal (0L, stream.Seek (0L, SeekOrigin.Begin))
Assembly.Load (stream.ToArray ())
-/// The assembly for the given test case and default simulator.
-let private testAssembly testNum defaultSimulator =
+/// The assembly for the given test case assembly constants.
+let private testAssembly testNum constants =
testNum
|> testCase
|> compileQsharp
- |> generateCsharp defaultSimulator
+ |> generateCsharp constants
|> compileCsharp
/// Runs the entry point in the assembly with the given command-line arguments, and returns the output, errors, and exit
@@ -164,17 +160,26 @@ let private failsWith expected (assembly, args) =
Assert.True (0 <> exitCode, sprintf "Expected non-zero exit code, but got 0 with:\n\n%s\n\n%s" error out)
Assert.StartsWith (normalize expected, normalize (error + out))
-/// A tuple of the test assembly and arguments using the standard default simulator. The tuple can be passed to yields
-/// or fails.
-let private test testNum =
- let assembly = testAssembly testNum None
+/// A tuple of the test assembly and arguments using the given assembly constants. The tuple can be passed to yields or
+/// fails.
+let private testWithConstants constants testNum =
+ let assembly = testAssembly testNum constants
fun args -> assembly, Array.ofList args
+/// A tuple of the test assembly and arguments with no assembly constants. The tuple can be passed to yields or fails.
+let private test = testWithConstants ImmutableDictionary.Empty
+
/// A tuple of the test assembly and arguments using the given default simulator. The tuple can be passed to yields or
/// fails.
-let private testWith testNum defaultSimulator =
- let assembly = testAssembly testNum (Some defaultSimulator)
- fun args -> assembly, Array.ofList args
+let private testWithSim defaultSimulator =
+ ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.DefaultSimulator, defaultSimulator)]
+ |> testWithConstants
+
+/// A tuple of the test assembly and arguments using the given default target. The tuple can be passed to yields or
+/// fails.
+let private testWithTarget defaultTarget =
+ ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.ExecutionTarget, defaultTarget)]
+ |> testWithConstants
/// Standard command-line arguments for the "submit" command without specifying a target.
let private submitWithoutTarget =
@@ -466,8 +471,7 @@ let ``Shadows --shots`` () =
given ["--shots"; "7"] |> yields "7"
given (submitWithNothingTarget @ ["--shots"; "7"])
|> yields "Warning: Option --shots is overridden by an entry point parameter name. Using default value 500.
- The friendly URI for viewing job results is not available yet. Showing the job ID instead.
- 00000000-0000-0000-0000-0000000000000"
+ https://www.example.com/00000000-0000-0000-0000-0000000000000"
// Simulators
@@ -509,7 +513,7 @@ let ``Rejects unknown simulator`` () =
[]
let ``Supports default standard simulator`` () =
- let given = testWith 32 AssemblyConstants.ResourcesEstimator
+ let given = testWithSim AssemblyConstants.ResourcesEstimator 32
given ["--use-h"; "false"] |> yields resourceSummary
given ["--simulator"; AssemblyConstants.QuantumSimulator; "--use-h"; "false"] |> yields "Hello, World!"
@@ -517,7 +521,7 @@ let ``Supports default standard simulator`` () =
let ``Supports default custom simulator`` () =
// This is not really a "custom" simulator, but the driver does not recognize the fully-qualified name of the
// standard simulators, so it is treated as one.
- let given = testWith 32 typeof.FullName
+ let given = testWithSim typeof.FullName 32
given ["--use-h"; "false"] |> yields "Hello, World!"
given ["--use-h"; "true"] |> fails
given ["--simulator"; typeof.FullName; "--use-h"; "false"] |> yields "Hello, World!"
@@ -534,8 +538,7 @@ let ``Supports default custom simulator`` () =
let ``Submit can submit a job`` () =
let given = test 1
given submitWithNothingTarget
- |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead.
- 00000000-0000-0000-0000-0000000000000"
+ |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000"
[]
let ``Submit can show only the ID`` () =
@@ -546,11 +549,29 @@ let ``Submit can show only the ID`` () =
let ``Submit uses default values`` () =
let given = test 1
given (submitWithNothingTarget @ ["--verbose"])
- |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead.
+ |> yields "Subscription: mySubscription
+ Resource Group: myResourceGroup
+ Workspace: myWorkspace
Target: test.nothing
- Subscription: mySubscription
+ Storage:
+ AAD Token:
+ Base URI:
+ Job Name:
+ Shots: 500
+ Output: FriendlyUri
+ Dry Run: False
+ Verbose: True
+
+ https://www.example.com/00000000-0000-0000-0000-0000000000000"
+
+[]
+let ``Submit uses default values with default target`` () =
+ let given = testWithTarget "test.nothing" 1
+ given (submitWithoutTarget @ ["--verbose"])
+ |> yields "Subscription: mySubscription
Resource Group: myResourceGroup
Workspace: myWorkspace
+ Target: test.nothing
Storage:
AAD Token:
Base URI:
@@ -560,7 +581,7 @@ let ``Submit uses default values`` () =
Dry Run: False
Verbose: True
- 00000000-0000-0000-0000-0000000000000"
+ https://www.example.com/00000000-0000-0000-0000-0000000000000"
[]
let ``Submit allows overriding default values`` () =
@@ -578,11 +599,41 @@ let ``Submit allows overriding default values`` () =
"--shots"
"750"
])
- |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead.
+ |> yields "Subscription: mySubscription
+ Resource Group: myResourceGroup
+ Workspace: myWorkspace
Target: test.nothing
- Subscription: mySubscription
+ Storage: myStorage
+ AAD Token: myToken
+ Base URI: myBaseUri
+ Job Name: myJobName
+ Shots: 750
+ Output: FriendlyUri
+ Dry Run: False
+ Verbose: True
+
+ https://www.example.com/00000000-0000-0000-0000-0000000000000"
+
+[]
+let ``Submit allows overriding default values with default target`` () =
+ let given = testWithTarget "foo.target" 1
+ given (submitWithNothingTarget @ [
+ "--verbose"
+ "--storage"
+ "myStorage"
+ "--aad-token"
+ "myToken"
+ "--base-uri"
+ "myBaseUri"
+ "--job-name"
+ "myJobName"
+ "--shots"
+ "750"
+ ])
+ |> yields "Subscription: mySubscription
Resource Group: myResourceGroup
Workspace: myWorkspace
+ Target: test.nothing
Storage: myStorage
AAD Token: myToken
Base URI: myBaseUri
@@ -592,14 +643,13 @@ let ``Submit allows overriding default values`` () =
Dry Run: False
Verbose: True
- 00000000-0000-0000-0000-0000000000000"
+ https://www.example.com/00000000-0000-0000-0000-0000000000000"
[]
let ``Submit requires a positive number of shots`` () =
let given = test 1
given (submitWithNothingTarget @ ["--shots"; "1"])
- |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead.
- 00000000-0000-0000-0000-0000000000000"
+ |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000"
given (submitWithNothingTarget @ ["--shots"; "0"]) |> fails
given (submitWithNothingTarget @ ["--shots"; "-1"]) |> fails
@@ -634,8 +684,7 @@ let ``Submit has required options`` () =
for args in powerSet allArgs do
given (commandName :: List.concat args)
|> if List.length args = List.length allArgs
- then yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead.
- 00000000-0000-0000-0000-0000000000000"
+ then yields "https://www.example.com/00000000-0000-0000-0000-0000000000000"
else fails
[]
@@ -685,10 +734,10 @@ let ``Shows help text for submit command`` () =
%s submit [options]
Options:
- --target (REQUIRED) The target device ID.
--subscription (REQUIRED) The subscription ID.
--resource-group (REQUIRED) The resource group name.
--workspace (REQUIRED) The workspace name.
+ --target (REQUIRED) The target device ID.
--storage The storage account connection string.
--aad-token The Azure Active Directory authentication token.
--base-uri The base URI of the Azure Quantum endpoint.
@@ -701,6 +750,33 @@ let ``Shows help text for submit command`` () =
--pauli (REQUIRED) The name of a Pauli matrix.
--my-cool-bool (REQUIRED) A neat bit.
-?, -h, --help Show help and usage information"
-
let given = test 33
given ["submit"; "--help"] |> yields message
+
+[]
+let ``Shows help text for submit command with default target`` () =
+ let name = Path.GetFileNameWithoutExtension (Assembly.GetEntryAssembly().Location)
+ let message =
+ name
+ |> sprintf "Usage:
+ %s submit [options]
+
+ Options:
+ --subscription (REQUIRED) The subscription ID.
+ --resource-group (REQUIRED) The resource group name.
+ --workspace (REQUIRED) The workspace name.
+ --target The target device ID.
+ --storage The storage account connection string.
+ --aad-token The Azure Active Directory authentication token.
+ --base-uri The base URI of the Azure Quantum endpoint.
+ --job-name The name of the submitted job.
+ --shots The number of times the program is executed on the target machine.
+ --output The information to show in the output after the job is submitted.
+ --dry-run Validate the program and options, but do not submit to Azure Quantum.
+ --verbose Show additional information about the submission.
+ -n (REQUIRED) A number.
+ --pauli (REQUIRED) The name of a Pauli matrix.
+ --my-cool-bool (REQUIRED) A neat bit.
+ -?, -h, --help Show help and usage information"
+ let given = testWithTarget "foo.target" 33
+ given ["submit"; "--help"] |> yields message
diff --git a/src/Simulation/EntryPointDriver/Azure.cs b/src/Simulation/EntryPointDriver/Azure.cs
index 0f3b3a91e77..541e939b1b0 100644
--- a/src/Simulation/EntryPointDriver/Azure.cs
+++ b/src/Simulation/EntryPointDriver/Azure.cs
@@ -121,10 +121,21 @@ private static void DisplayJob(IQuantumMachineJob job, OutputFormat format)
switch (format)
{
case OutputFormat.FriendlyUri:
- // TODO:
- DisplayWithColor(ConsoleColor.Yellow, Console.Error,
- "The friendly URI for viewing job results is not available yet. Showing the job ID instead.");
- Console.WriteLine(job.Id);
+ try
+ {
+ Console.WriteLine(job.Uri);
+ }
+ catch (Exception ex)
+ {
+ DisplayWithColor(
+ ConsoleColor.Yellow,
+ Console.Error,
+ $"The friendly URI for viewing job results could not be obtained.{System.Environment.NewLine}" +
+ $"Error details: {ex.Message}" +
+ $"Showing the job ID instead.");
+
+ Console.WriteLine(job.Id);
+ }
break;
case OutputFormat.Id:
Console.WriteLine(job.Id);
@@ -150,9 +161,11 @@ private static void DisplayError(string summary, string message)
/// Creates a quantum machine based on the Azure Quantum submission settings.
///
///