Sitemap
Bushra Haque

Bushra Haque

Physics Graduate | Quantum Computing | Linguistics | Psychology | Research Enthusiast | Contact Info: haquebushra16@gmail.com

Quantum Gate and Reversibility

3 min readMar 26, 2024

#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.

Press enter or click to view image in full size
Picture courtesy: Google | FasterCapital

Each gate operation can be mathematically represented with a matrix.

Press enter or click to view image in full size

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,

Press enter or click to view image in full size

Another example of quantum gate is the controlled-NOT (cNOT) gate Figure 4, which behaves like a classical XOR gate, as shown below.

Press enter or click to view image in full size

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:

Press enter or click to view image in full size

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.

Press enter or click to view image in full size

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),

Press enter or click to view image in full size

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.

Press enter or click to view image in full size

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.

Press enter or click to view image in full size

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:

QuantumComputingIndia

#Quantum30

#QuantumComputing

--

--

Bushra Haque
Bushra Haque

Written by Bushra Haque

Physics Graduate | Quantum Computing | Linguistics | Psychology | Research Enthusiast | Contact Info: haquebushra16@gmail.com