Xor function

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Logical

Package: Microsoft.Quantum.Standard

Returns the Boolean exclusive disjunction of two values.

function Xor (a : Bool, b : Bool) : Bool

Input

a : Bool

The first value to be considered.

b : Bool

The second value to be considered.

Output : Bool

true if and only if exactly one of a and b is true.