# Single Qubit Gates

#### Introduction

A logic gate is the building block of a digital circuit, In a classical computer there are wires and logic gates which carry the information and manipulate it. A logic gate converts information from one form to another. A classical gate maybe reversible or non reversible but when it comes to a quantum gate the gates must be reversible this is because we model quantum gates using unitary matrices, that is it's conjugate transpose is also the inverse of the original matrix. Measurement of a qubit is the only irreversible stage. A qubit is represented by a vector (column matrix)

$\begin{pmatrix} α \\ β \end{pmatrix}$

α² is the probability of the qubit being zero and β² is the probability of the qubit being one, when the qubit is measured this can be written in the bra-ket notation as:

α|0> + β|1>

For those experienced in quantum computing I wont be going through the concepts of bloch sphere or the phase gates in this blog, this will be a small introduction to Pauli-X gate and the Hadamard gate and their mathematical modeling

#### Quantum NOT Gate

The NOT gate in classical systems perform the operations : 1 ➝ 0 and 0 ➝ 1 it converts zero to one and vice versa, when we apply a quantum NOT gate on a qubit

α|0> + β|1>

we get α|1> + β|0> that is the roles of |1> and |0> are interchanged this is usually called a bit flip. The gate is represented by the matrix :

$\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}$
$\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} \begin{pmatrix} α \\ β \end{pmatrix} = \begin{pmatrix} β \\ α \end{pmatrix}$

$H = 1/\sqrt{2} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix}$
$1/\sqrt{2} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1/\sqrt{2} \\ 1/\sqrt{2} \end{pmatrix}$
$1/\sqrt{2} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1/\sqrt{2} \\ -1/\sqrt{2} \end{pmatrix}$