Fact function

Namespace: Microsoft.Quantum.Diagnostics

Package: Microsoft.Quantum.QSharp.Foundation

Declares that a classical condition is true.

function Fact (actual : Bool, message : String) : Unit

Input

actual : Bool

The condition to be declared.

message : String

Failure message string to be printed in the case that the classical condition is false.

Output : Unit

Example

The following Q# snippet will fail:

Fact(false, "Expected true.");

See Also