Skip to content

Quantum Gates

In the basis ∣0⟩,∣1⟩|0\rangle,|1\rangle,

X=(0110),Y=(0−ii0),Z=(100−1),X=\begin{pmatrix}0&1\\1&0\end{pmatrix}, \quad Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}, \quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}, H=12(111−1),S=(100i),T=(100eiπ/4).H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}, \quad S=\begin{pmatrix}1&0\\0&i\end{pmatrix}, \quad T=\begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}.

Rotations are

Rk(θ)=e−iθσk/2=cos⁡θ2I−isin⁡θ2σk.R_k(\theta)=e^{-i\theta\sigma_k/2} =\cos\frac\theta2I-i\sin\frac\theta2\sigma_k.

For control AA and target BB,

C(U)=∣0⟩⟨0∣A⊗IB+∣1⟩⟨1∣A⊗UB.C(U)=|0\rangle\langle0|_A\otimes I_B +|1\rangle\langle1|_A\otimes U_B.

In the ordered basis ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle,

CNOT=(1000010000010010),CZ=diag⁡(1,1,1,−1),CNOT= \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{pmatrix}, \qquad CZ=\operatorname{diag}(1,1,1,-1), SWAP=(1000001001000001).SWAP= \begin{pmatrix} 1&0&0&0\\ 0&0&1&0\\ 0&1&0&0\\ 0&0&0&1 \end{pmatrix}.
  • State columns are acted on from the left; the rightmost matrix acts first.
  • The two-qubit basis order above treats the left label as the first tensor factor.
  • U⊗IU\otimes I acts on the first factor and I⊗UI\otimes U on the second.
  • The displayed objects are ideal unitaries, not hardware noise models.
SymbolMeaning
X,Y,ZX,Y,ZPauli gates
HHHadamard gate
S,TS,Tphase and eighth-root phase gates
Rk(θ)R_k(\theta)Bloch-sphere rotation about axis kk
C(U)C(U)coherently controlled unitary
  • Do not read a matrix product left-to-right in time.
  • State the basis order before using a multi-qubit matrix.
  • Keep the half-angle in Rk(θ)R_k(\theta).
  • Equality up to a global phase gives the same isolated unitary channel but can fail after coherent control because the phase becomes relative.
  • Clifford gates alone are not universal for arbitrary quantum computation.
  • Measurement, reset, postselection, and noisy hardware operations are not unitaries on the visible register in general.

Circuit conventions, controlled-phase subtleties, Bell-state preparation, universality, physical-operation cautions, verification workflow, exercises, and references are at Gates, Circuits, and Computation Models.

Detailed gate families are at Single-Qubit Gates and Multi-Qubit Gates.

The full projector-controlled, branch-phase, coherent-conditioning, and access-assumption audit is at Controlled Operations; this card remains a compact lookup aid.