- Quantum gate
A

**quantum gate**or**quantum logic gate**is a basicquantum circuit operating on a small number ofqubit s. They are the analogues forquantum computer s to classicallogic gate s for conventionaldigital computer s. Quantum logic gates are reversible, unlike many classical logic gates. Some universal classical logic gates, such as theToffoli gate , provide reversibility and can be directly mapped onto quantum logic gates. Quantum logic gates are represented by unitary matrices.The most common quantum gates operate on spaces of one or two qubits. This means that as matrices, quantum gates can be described by 2 × 2 or 4 × 4 matrices with

orthonormal rows.**Remark**. "Quantum logic" can refer either to the performance of quantum logic gates or to a foundational formalism forquantum mechanics calledquantum logic based on a modification of some of the rules ofpropositional logic .**Examples****Hadamard gate**. This gate operates on a single qubit. It is represented by theHadamard matrix ::$H\; =\; frac\{1\}\{sqrt\{2\; egin\{bmatrix\}\; 1\; 1\; \backslash \; 1\; -1\; end\{bmatrix\}$

Since the rows of the matrix are orthogonal, "H" is indeed a

unitary matrix .**Phase shifter gates**. Gates in this class operate on a single qubit. They are represented by 2 × 2 matrices of the form:$R(\; heta)\; =\; egin\{bmatrix\}\; 1\; 0\; \backslash \; 0\; e^\{2\; pi\; i\; heta\}\; end\{bmatrix\}$

where θ is the "phase shift".

**Controlled gates**. Suppose "U" is a gate that operates on single qubits with matrix representation:$U\; =\; egin\{bmatrix\}\; x\_\{00\}\; x\_\{01\}\; \backslash \; x\_\{10\}\; x\_\{11\}\; end\{bmatrix\}$

The "controlled-U gate" is a gate that operates on two qubits in such a way that the first qubit serves as a control.

:$|\; 0\; 0\; angle\; mapsto\; |\; 0\; 0\; angle$

:$|\; 0\; 1\; angle\; mapsto\; |\; 0\; 1\; angle$

:$|\; 1\; 0\; angle\; mapsto\; |\; 1\; angle\; U\; |0\; angle\; =\; |\; 1\; angle\; left(x\_\{00\}\; |0\; angle\; +\; x\_\{10\}\; |1\; angle\; ight)$

:$|\; 1\; 1\; angle\; mapsto\; |\; 1\; angle\; U\; |1\; angle\; =\; |\; 1\; angle\; left(x\_\{01\}\; |0\; angle\; +\; x\_\{11\}\; |1\; angle\; ight)$

Thus the matrix of the controlled "U" gate is as follows:

:$operatorname\{C\}(U)\; =\; egin\{bmatrix\}\; 1\; 0\; 0\; 0\; \backslash \; 0\; 1\; 0\; 0\; \backslash \; 0\; 0\; x\_\{00\}\; x\_\{01\}\; \backslash \; 0\; 0\; x\_\{10\}\; x\_\{11\}\; end\{bmatrix\}$

**Uncontrolled gate**. We note the difference between the controlled-"U" gate and an "uncontrolled" 2 qubit gate $I\; otimes\; U$ defined as follows::$|\; 0\; 0\; angle\; mapsto\; |\; 0\; angle\; U\; |0\; angle$

:$|\; 0\; 1\; angle\; mapsto\; |\; 0\; angle\; U\; |1\; angle$

:$|\; 1\; 0\; angle\; mapsto\; |\; 1\; angle\; U\; |0\; angle$

:$|\; 1\; 1\; angle\; mapsto\; |\; 1\; angle\; U\; |1\; angle$

represented by the unitary matrix

:$egin\{bmatrix\}\; x\_\{00\}\; x\_\{01\}\; 0\; 0\; \backslash \; x\_\{10\}\; x\_\{11\}\; 0\; 0\; \backslash \; 0\; 0\; x\_\{00\}\; x\_\{01\}\; \backslash \; 0\; 0\; x\_\{10\}\; x\_\{11\}\; end\{bmatrix\}.$

Since this gate is reducible to more elementary gates it is usually not included in the basic repertoire of quantum gates. It is mentioned here only to contrast it with the previous controlled gate.

**Universal quantum gates**A set of

**universal quantum gates**is any set of gates to which any operation possible on a quantum computer can be reduced, that is, any other unitary operation can be expressed as a finite sequence of gates from the set. Equivalently, a set of universal quantum gates is a set of generators for the group of unitary matrices. One simple set of two-qubit universal quantum gates is the Hadamard gate ($H$), a phase rotation gate $R(cos^\{-1\}egin\{matrix\}\; frac\{3\}\{5\}\; end\{matrix\}))$, and thecontrolled NOT gate , a special case of controlled-U such that:$operatorname\{CNOT\}\; =\; egin\{bmatrix\}\; 1\; 0\; 0\; 0\; \backslash \; 0\; 1\; 0\; 0\; \backslash \; 0\; 0\; 0\; 1\; \backslash \; 0\; 0\; 1\; 0\; end\{bmatrix\}.$

A single-gate set of universal quantum gates can also be formulated using the three-qubit

Deutsch gate , $D(\; heta)$:$operatorname\{D(\; heta)\}:\; |i,j,k\; angle\; ightarrow\; egin\{cases\}\; i\; cos(\; heta)\; |i,j,k\; angle\; +\; sin(\; heta)\; |i,j,1-k\; angle\; mbox\{for\; \}i=j=1\; \backslash \; |i,j,k\; angle\; mbox\{otherwise\}end\{cases\}.$

The universal classical logic gate, the

Toffoli gate , is reducible to the Deutsch gate, $D(egin\{matrix\}\; frac\{pi\}\{2\}\; end\{matrix\})$, thus showing that all classical logic operations can be performed on a universal quantum computer.**See also***

Pauli matrices

*Quantum finite automata **References*** M. Nielsen and I. Chuang, "Quantum Computation and Quantum Information", Cambridge University Press, 2000

*Wikimedia Foundation.
2010.*