Logical OR returns true when at least one Boolean input is true. In quantum computation, its classical behavior must be represented through a reversible function before becoming a quantum circuit. section 6.4.1 section 6.4
Construct an OR-based quantum computation systematically:
- Express the desired classical computation as Boolean logic, including OR and any other primitive operations. section 6.4
- Preserve the input and store the result in a separate bit using F(x, y) = (x, y ⊕ f(x)); the input x may contain several bits. section 6.4.1
- Replace the reversible Boolean operation with a quantum implementation as part of reversible-logic synthesis. section 6.4.1 section 6.4
Two-input truth table
For inputs 0,0; 0,1; 1,0; and 1,1, OR produces 0,1,1, and 1 respectively. The reversible form retains the input while XORing the OR result into an output bit. section 6.4.1 section 6.4
Figure 6.7 To convert a classical function into its quantum implementation, we start by representing it as a sequence of Boolean logic gates. Then, we replace each gate with its classical reversible equivalent. Finally, each classical reversible logic gate is replaced with a quantum gate that implements it.
Follow the conversion from a Boolean OR expression to a reversible logic circuit and then to its quantum-gate implementation. section 6.4
Table 6.2 The truth tables of the main Boolean operations
| \(x_0\) | \(x_1\) | NOT \(x_0\) | \(x_0\) AND \(x_1\) | \(x_0\) OR \(x_1\) | \(x_0\) XOR \(x_1\) | \(x_0\) EQUAL \(x_1\) |
| \(0\) | \(0\) | \(1\) | \(0\) | \(0\) | \(0\) | \(1\) |
| \(0\) | \(1\) | \(0\) | \(1\) | \(1\) | \(0\) | |
| \(1\) | \(0\) | \(0\) | \(0\) | \(1\) | \(1\) | \(0\) |
| \(1\) | \(1\) | \(1\) | \(1\) | \(0\) | \(1\) |
Inspect the truth table that places OR alongside NOT, AND, XOR, and equality. section 6.4





