Quantum Gate and Reversibility
#Quantum30 Cohort 04
Day 09
Date: 26th March, 2024.
The basic operation to manipulate an input state for a quantum circuit is called Quantum Gates.
Each gate operation can be mathematically represented with a matrix.
For instance, the Filter-45° in Figure 2, converts from one of the orthogonal base states (i.e., |0⟩) to a superposition state
i.e., 1
/√2
|0⟩ +
1
/√2
|1⟩
This operation can be expressed with the following matrix, known as Hadamard gate,
Another example of quantum gate is the controlled-NOT (cNOT) gate Figure 4, which behaves like a classical XOR gate, as shown below.
This quantum gate negates the state of the second Qubit |ψᵢₙ₂⟩ only when the first Qubit |ψᵢₙ₁⟩ is |1⟩ while |ψᵢₙ₁⟩ itself is unchanged by the gate,
i.e., the gate |ψᵢₙ₁⟩ =|ψₒᵤₜ₁⟩.
This operation can be written as:
If we can construct a NAND gate with quantum gates, any logic gate (e.g., AND, OR, NOT) can be built since the NAND gate is universal (Mano, 1995).
Get Bushra Haque’s stories in your inbox
Join Medium for free to get updates from this writer.
The classical NAND gate’s truth table is given Table 2.
If the NAND gate is built based on the truth table above and the inputs are two qubits
|0⟩|1⟩ = [1, 0]^T
⊗ [0, 1]^T = [0,1,0,0]^T
, the operation can be written as following (Yanofsky & Mannucci, 2008),
Moreover, this NAND gate cannot be realized with quantum gates because two-bit
information before the gate becomes one bit after the gate in (equation 10).
Quantum mechanics does not allow the system (e.g., quantum circuit) to lose information unless the quantum states in the system are measured. Therefore, quantum gates must have the same number of inputs as the outputs and must be reversible with no information loss by the gates.
In contrast, classical gates except NOT gate are one-way functions and lose some of the input information at the exit of the gate. This requirement is another significant difference from classical computing.
A quantum NAND gate can be made of a Toffoli gate, also known as the controlled-controlled-NOT (ccNOT) gate (Figure 5, Table 4). The revised truth table for the quantum NAND gate is given in Table 3.
When the Toffoli gate with ψᵢₙ₃ = 1, the ccNOT gate works as a NAND gate.
Thus, we can build any digital logic with the quantum gates theoretically.
Reference Material:
- Quantum Computing: Principles and Applications | https://1drv.ms/b/s!AuGZeQpQdzWmgVHzsyvPQJkWLtk8
#Quantum30
#QuantumComputing






