CodeTransformations.InlineConjugations Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Eliminates all conjugations from the given compilation by replacing them with the corresponding implementations (i.e. inlining them). The generation of the adjoint for the outer block is subject to the same limitation as any adjoint auto-generation. In particular, it is only guaranteed to be valid if operation calls only occur within expression statements, and throws an InvalidOperationException if the outer block contains while-loops. Any thrown exception is logged using the given onException action and silently ignored if onException is not specified or null. Returns true if the transformation succeeded without throwing an exception, and false otherwise.
public static bool InlineConjugations (this Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, out Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation inlined, Action<Exception>? onException = default);
static member InlineConjugations : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * QsCompilation * Action<Exception> -> bool
<Extension()>
Public Function InlineConjugations (compilation As QsCompilation, ByRef inlined As QsCompilation, Optional onException As Action(Of Exception) = Nothing) As Boolean
Parameters
- compilation
- QsCompilation
- inlined
- QsCompilation