IRewriteStep.PreconditionVerification(QsCompilation) Method

Definition

Verifies whether a given compilation satisfies the precondition for executing this rewrite step. ImplementsPreconditionVerification indicates whether or not this method is implemented. If the precondition verification succeeds, then the invocation of an implemented transformation (if any) with the given compilation should complete without throwing an exception. The precondition verification should never throw an exception, but instead indicate if the precondition is satisfied via the returned value. More detailed information can be provided via logging.

public bool PreconditionVerification (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation);
abstract member PreconditionVerification : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation -> bool
Public Function PreconditionVerification (compilation As QsCompilation) As Boolean

Parameters

compilation
QsCompilation

Q# compilation for which to verify the precondition.

Returns

Boolean

Whether or not the given compilation satisfies the precondition.

Applies to