De Morgan’s law rewrites OR as a negated AND: x₀ OR x₁ = NOT((NOT x₀) AND (NOT x₁)). This identity enables reversible quantum evaluation when no direct OR operation is available. section 6.4.1
Implement the reversible OR transformation in this order:
- Apply X gates to negate both input qubits. section 6.4.1
- Apply a CCNOT gate with the input qubits as controls and the output qubit as target. section 6.4.1
- Apply an X gate to the output qubit to negate the computed AND. section 6.4.1
- Apply X gates to the inputs again so the overall computation preserves them. section 6.4.1

