CodeTransformations.PreEvaluateAll Method

Definition

Pre-evaluates as much of the classical computations as possible in the given compilation. 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 PreEvaluateAll (this Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, out Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation evaluated, Action<Exception>? onException = default);
static member PreEvaluateAll : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * QsCompilation * Action<Exception> -> bool
<Extension()>
Public Function PreEvaluateAll (compilation As QsCompilation, ByRef evaluated As QsCompilation, Optional onException As Action(Of Exception) = Nothing) As Boolean

Parameters

compilation
QsCompilation
evaluated
QsCompilation
onException
Action<Exception>

Returns

Boolean

Applies to