Conversation
| string? targetCapability = null) => | ||
| new SubmissionOptions( | ||
| friendlyName ?? FriendlyName, shots ?? Shots, inputParams ?? InputParams, targetCapability ?? TargetCapability); | ||
| this with |
There was a problem hiding this comment.
I'd rather remove With, since it's redundant.
There was a problem hiding this comment.
Sounds good, my only thought was to not break existing callers, but happy to go on and pull that method, then.
There was a problem hiding this comment.
To unblock e2e, would it be OK to mark this and Default as obsolete for now?
| /// Options for a job submitted to Azure Quantum. | ||
| /// </summary> | ||
| public class SubmissionOptions | ||
| public record SubmissionOptions |
There was a problem hiding this comment.
Maybe it would be better to remove Default and the private constructor, and instead give each init property a default value?
|
|
||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| public class IsExternalInit {} |
There was a problem hiding this comment.
As a public type, won't this conflict if another reference uses the same workaround? Can we update Microsoft.Quantum.Runtime.Core target framework to net6.0 instead?
There was a problem hiding this comment.
I've tested in other places, and that type seems to be special-cased to not conflict, allowing this as a suggested workaround (as per https://developercommunity.visualstudio.com/t/error-cs0518-predefined-type-systemruntimecompiler/1244809).
|
Any updates on this? |
This PR modifies the
SubmissionOptionsclass to be a record class, allowing other code to use thewithkeyword to modify instances of the class on a field-by-field basis. The existingWithmethod can then be refactored to use thewithkeyword.