Site Tools


x-gate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
x-gate [May 25, 2026 at 10:18] Ivan Janevskix-gate [June 15, 2026 at 15:23] (current) Ivan Janevski
Line 1: Line 1:
-# X-gate +$Xgate (NOT gate) 
-**X-gate** (or **Pauli-X gate** **Quantum NOT gate**) is a 1-qubit quantum gate that serves as the quantum equivalent of logical NOT. It's represented by the following 2x2 matrix.+**X gate** (or **Pauli-X gate**, or **quantum NOT gate**) is a single-qubit gate that flips $\lvert 0\rangle$ to $\lvert 1\rangle$ and $\lvert 1\rangle$ to $\lvert 0\rangle$, making it the quantum analog of a classical NOT gate. It is one of the three [[pauli-gates|Pauli gates]].
  
-$$ X = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}$$+$$X = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}$$
  
-Applying the X gate to the qubit $\lvert 0\rangle$ yields $\lvert 1\rangle$, and applying X to the qubit $\lvert 1\rangle$ yields $\lvert 0\rangle$.+The gate flips the computational basis states and leaves the Hadamard basis states ($\lvert +\rangle$$\lvert -\rangle$) unchangedsince those are its eigenstates: 
 + 
 +$$X\lvert 0\rangle = \lvert 1\rangle \qquad X\lvert 1\rangle = \lvert 0\rangle$$ 
 +$$X\lvert +\rangle = \lvert +\rangle \qquad X\lvert -\rangle = \lvert -\rangle$
 + 
 +On the [[bloch-sphere|Bloch sphere]], $X$ corresponds to a rotation of $\pi$ radians about the $x$-axisApplying the gate twice returns the qubit to its original state — this is the involution property, $X^2 = I$, shared by all Pauli gates. The $X$ gate appears in virtually every quantum algorithm as the quantum equivalent of setting or flipping a bit. 
 + 
 +## List of code implementations 
 + 
 +- [[x-gate-qiskit|X gate (Qiskit)]] 
 +- [[x-gate-custatevec|X gate (cuStateVec)]] 
 +- [[x-gate-cudaq|X gate (CUDA-Q)]]
  
-$$X = \begin{pmatrix}0 & 1\\1 & 0\end{pmatrix}$$ 
x-gate.1779704337.txt.gz · Last modified: by Ivan Janevski