diff --git a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj index 0156e6f8c64..6a57b29c4fe 100644 --- a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj +++ b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj @@ -6,6 +6,7 @@ netstandard2.1 x64 Microsoft.Quantum.Runtime + 10.0 diff --git a/src/Simulation/Core/Submitters/SubmissionOptions.cs b/src/Simulation/Core/Submitters/SubmissionOptions.cs index 03a3f002bc9..749889b3570 100644 --- a/src/Simulation/Core/Submitters/SubmissionOptions.cs +++ b/src/Simulation/Core/Submitters/SubmissionOptions.cs @@ -5,32 +5,37 @@ #nullable enable +namespace System.Runtime.CompilerServices +{ + public class IsExternalInit {} +} + namespace Microsoft.Quantum.Runtime.Submitters { /// /// Options for a job submitted to Azure Quantum. /// - public class SubmissionOptions + public record SubmissionOptions { /// /// A name describing the job. /// - public string FriendlyName { get; } + public string FriendlyName { get; init; } /// /// The number of times the program will be executed. /// - public int Shots { get; } + public int Shots { get; init; } /// /// Additional target-specific parameters for the job. /// - public ImmutableDictionary InputParams { get; } + public ImmutableDictionary InputParams { get; init; } /// /// The target capability. /// - public string TargetCapability { get; set; } + public string TargetCapability { get; init; } /// /// The default submission options. @@ -60,7 +65,12 @@ public SubmissionOptions With( int? shots = null, ImmutableDictionary? inputParams = null, string? targetCapability = null) => - new SubmissionOptions( - friendlyName ?? FriendlyName, shots ?? Shots, inputParams ?? InputParams, targetCapability ?? TargetCapability); + this with + { + FriendlyName = friendlyName ?? FriendlyName, + Shots = shots ?? Shots, + InputParams = inputParams ?? InputParams, + TargetCapability = targetCapability ?? TargetCapability + }; } }