source

Quantum Gates

1. The Fundamental Unit: The Qubit

In classical systems, information is stored as bits (0 or 1). Quantum systems use the qubit (quantum bit).

Mathematical Representation

A qubit exists in a state vector or wave function denoted as ψ|\psi \rangle. It is expressed as:

ψ=α0+β1\mid\psi\rangle = \alpha\mid0\rangle + \beta\mid1\rangle

Measurement and Duality

A qubit possesses a dual nature: it acts as an analog variable(any real number) before measurement (as α\alpha and β\beta vary continuously) but becomes digital(0/1) after measurement6.


2. Visualizing States: The Bloch Sphere

The Bloch Sphere is a 3D geometric tool where any point on the surface represents a pure quantum state11.

3. Quantum Gates

Quantum operations are represented by unitary matrices that rotate the state vector on the Bloch sphere.

Single-Qubit Gates

X=[0110]X= \begin{bmatrix} 0 &1 \\ 1 & 0 \end{bmatrix}

Z=[1001]Z= \begin{bmatrix} 1 &0 \\ 0 & -1 \end{bmatrix}

H=12[1111]H= \frac{1}{\sqrt{ 2 }}\begin{bmatrix} 1 &1 \\ 1 & -1 \end{bmatrix}

S=[100i]S= \begin{bmatrix} 1 &0 \\ 0 & i \end{bmatrix} T=[100exp(iπ4)]T= \begin{bmatrix} 1 &0 \\ 0 & \exp\left( \frac{i\pi}{4} \right) \end{bmatrix}

Two Qubit Gates

CNOT=[1000010000010010]CNOT = \begin{bmatrix} 1& 0 & 0 & 0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{bmatrix}

SWAP=[1000001001000001]SWAP = \begin{bmatrix} 1& 0 & 0 & 0\\0&0&1&0\\0&1&0&0\\0&0&0&1\end{bmatrix}


4. Governing Principles

Quantum computing is restricted by laws that do not apply to classical systems.

Reversibility

All quantum operations must be reversible; information cannot be destroyed. If you have the output state, you must be able to mathematically reconstruct the exact input state.

No-Cloning Theorem

It is physically impossible to create an identical, independent copy of an unknown quantum state.