InferTargetInstructions.TryAddMissingTargetInstructionAttributes Method

Definition

Adds a TargetInstruction attribute to each intrinsic callable that doesn't have one, unless the automatically determined target instruction name conflicts with another target instruction name. The automatically determined name of the target instruction is the lower case version of the unqualified callable name. Type constructors and generic callables are left unchanged.

public static bool TryAddMissingTargetInstructionAttributes (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, out Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation transformed);
static member TryAddMissingTargetInstructionAttributes : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * QsCompilation -> bool
Public Shared Function TryAddMissingTargetInstructionAttributes (compilation As QsCompilation, ByRef transformed As QsCompilation) As Boolean

Parameters

compilation
QsCompilation
transformed
QsCompilation

Returns

Boolean

Returns true if all missing attributes have been successfully added and false if some attributes could not be added.

Exceptions

All intrinsic callables need to have exactly one body specialization.

Applies to