x-gate
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| x-gate [June 09, 2026 at 22:45] – Ivan Janevski | x-gate [June 15, 2026 at 15:23] (current) – Ivan Janevski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # X-gate | + | # $X$ gate (NOT gate) |
| - | **X-gate** (or **Pauli-X gate**, or **Quantum | + | **X gate** (or **Pauli-X gate**, or **quantum |
| - | $$ X = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}$$ | + | $$X = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}$$ |
| - | On the Bloch sphere, | + | The gate flips the computational basis states and leaves the Hadamard basis states ($\lvert +\rangle$, $\lvert -\rangle$) unchanged, since 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 | ||
| + | |||
| + | ## List of code implementations | ||
| + | |||
| + | - [[x-gate-qiskit|X gate (Qiskit)]] | ||
| + | - [[x-gate-custatevec|X gate (cuStateVec)]] | ||
| + | - [[x-gate-cudaq|X gate (CUDA-Q)]] | ||
| - | If you apply the gate twice, you will flip the state twice, meaning you | ||
| - | $$X^2 = I$$ | ||
x-gate.1781045120.txt.gz · Last modified: by Ivan Janevski
