Reference ~2 min read

Appendix E — Math Identities Cheat-Sheet

The identities you'll reach for constantly. Conventions match Appendix C: =1\hbar = 1, big-endian qubits, rotation gates use the half-angle eiθσ/2e^{-i\theta\sigma/2}.


1. Pauli Matrices

I=(1001),X=(0110),Y=(0ii0),Z=(1001). I=\begin{pmatrix}1&0\\0&1\end{pmatrix},\quad 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}.

Basic properties (let σj{X,Y,Z}\sigma_j \in \{X,Y,Z\}):

  • Hermitian and unitary: σj=σj\sigma_j = \sigma_j^\dagger and σj2=I\sigma_j^2 = I.
  • Traceless: Tr(σj)=0\mathrm{Tr}(\sigma_j) = 0; eigenvalues ±1\pm 1.
  • det(σj)=1\det(\sigma_j) = -1.

Products and (anti)commutators (with Levi-Civita εjkl\varepsilon_{jkl}, {j,k,l}\{j,k,l\} a permutation of {x,y,z}\{x,y,z\}):

XY=iZ,YZ=iX,ZX=iY(cyclic); XY = iZ,\quad YZ = iX,\quad ZX = iY \qquad(\text{cyclic}); [σj,σk]=2iεjklσl,{σj,σk}=2δjkI,σjσk=δjkI+iεjklσl. [\sigma_j,\sigma_k] = 2i\,\varepsilon_{jkl}\,\sigma_l,\qquad \{\sigma_j,\sigma_k\} = 2\,\delta_{jk} I,\qquad \sigma_j\sigma_k = \delta_{jk} I + i\,\varepsilon_{jkl}\sigma_l.

Completeness: {I,X,Y,Z}\{I, X, Y, Z\} is an orthogonal basis for 2×22\times2 Hermitian matrices under the Hilbert–Schmidt inner product A,B=Tr(AB)\langle A,B\rangle = \mathrm{Tr}(A^\dagger B), with Tr(σjσk)=2δjk\mathrm{Tr}(\sigma_j\sigma_k) = 2\delta_{jk}. Hence any single-qubit density matrix is

ρ=12(I+rσ),r=(X,Y,Z),  r1. \rho = \tfrac12\big(I + \vec r\cdot\vec\sigma\big),\qquad \vec r = (\langle X\rangle,\langle Y\rangle,\langle Z\rangle),\ \ |\vec r|\le 1.

2. Common Gate Matrices

H=12(1111),S=(100i),T=(100eiπ/4). H=\frac{1}{\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}.

Relations: S=T2S = T^2, Z=S2Z = S^2, HXH=ZH X H = Z, HZH=XH Z H = X, HYH=YH Y H = -Y, SXS=YS X S^\dagger = Y.

Two-qubit (big-endian, control = qubit 0):

CNOT=(1000010000010010),CZ=(1000010000100001),SWAP=(1000001001000001). \text{CNOT}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix},\quad \text{CZ}=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&-1\end{pmatrix},\quad \text{SWAP}=\begin{pmatrix}1&0&0&0\\0&0&1&0\\0&1&0&0\\0&0&0&1\end{pmatrix}.

Useful: CZ=(IH)CNOT(IH)\text{CZ} = (I\otimes H)\,\text{CNOT}\,(I\otimes H), and SWAP=CNOT01CNOT10CNOT01\text{SWAP} = \text{CNOT}_{01}\,\text{CNOT}_{10}\,\text{CNOT}_{01}.


3. Rotation Gates (Exponentials of Paulis)

Since σj2=I\sigma_j^2 = I, the exponential closes into sines and cosines:

eiθn^σ/2=cos ⁣θ2Iisin ⁣θ2(n^σ),n^=1. e^{-i\theta\,\hat n\cdot\vec\sigma/2} = \cos\!\tfrac{\theta}{2}\,I - i\sin\!\tfrac{\theta}{2}\,(\hat n\cdot\vec\sigma), \qquad |\hat n| = 1.

The single-axis rotations:

Rx(θ)=(cosθ2isinθ2isinθ2cosθ2), Ry(θ)=(cosθ2sinθ2sinθ2cosθ2), Rz(θ)=(eiθ/200eiθ/2). R_x(\theta)=\begin{pmatrix}\cos\frac\theta2 & -i\sin\frac\theta2\\ -i\sin\frac\theta2 & \cos\frac\theta2\end{pmatrix},\ R_y(\theta)=\begin{pmatrix}\cos\frac\theta2 & -\sin\frac\theta2\\ \sin\frac\theta2 & \cos\frac\theta2\end{pmatrix},\ R_z(\theta)=\begin{pmatrix}e^{-i\theta/2}&0\\0&e^{i\theta/2}\end{pmatrix}.

Identities:

  • Rz(π)=eiπ/2ZR_z(\pi) = e^{-i\pi/2}Z,  Rx(π)=iX\ R_x(\pi) = -iX,  Ry(π)=iY\ R_y(\pi) = -iY (note the global phases).
  • H=eiπ/2Ry(π2)Rz(π)H = e^{i\pi/2} R_y(\tfrac{\pi}{2}) R_z(\pi) (up to global phase); more simply HH is a π\pi rotation about the n^=(x^+z^)/2\hat n = (\hat x + \hat z)/\sqrt2 axis.

Euler (ZYZ) decomposition. Any single-qubit unitary UU can be written, for some α,β,γ,δR\alpha,\beta,\gamma,\delta\in\mathbb R,

U=eiαRz(β)Ry(γ)Rz(δ). U = e^{i\alpha}\,R_z(\beta)\,R_y(\gamma)\,R_z(\delta).

This is why {Ry,Rz}\{R_y, R_z\} (plus phase) generate all of SU(2)SU(2) — see Term 2.2.


4. Operator Identities

  • Adjoint of a product: (AB)=BA(AB)^\dagger = B^\dagger A^\dagger; (AB)=AB(A\otimes B)^\dagger = A^\dagger\otimes B^\dagger.
  • Trace is cyclic: Tr(ABC)=Tr(CAB)=Tr(BCA)\mathrm{Tr}(ABC) = \mathrm{Tr}(CAB) = \mathrm{Tr}(BCA) (basis-independent).
  • Trace of a tensor product: Tr(AB)=Tr(A)Tr(B)\mathrm{Tr}(A\otimes B) = \mathrm{Tr}(A)\,\mathrm{Tr}(B).
  • Expectation: A=Tr(ρA)\langle A\rangle = \mathrm{Tr}(\rho A); for pure ρ=ψψ\rho=|\psi\rangle\langle\psi|, =ψAψ=\langle\psi|A|\psi\rangle.
  • Spectral decomposition: a normal operator A=iλiviviA=\sum_i \lambda_i |v_i\rangle\langle v_i| with {vi}\{|v_i\rangle\} orthonormal; then f(A)=if(λi)vivif(A)=\sum_i f(\lambda_i)|v_i\rangle\langle v_i| for any function ff.
  • Function of a unitary's generator: if H=iEiEiEiH=\sum_i E_i|E_i\rangle\langle E_i| then eiHt=ieiEitEiEie^{-iHt}=\sum_i e^{-iE_i t}|E_i\rangle\langle E_i|.

Baker–Campbell–Hausdorff (BCH):

eAeB=eA+B+12[A,B]+112[A,[A,B]]112[B,[A,B]]+. e^{A}e^{B} = e^{A+B+\frac12[A,B]+\frac1{12}[A,[A,B]]-\frac1{12}[B,[A,B]]+\cdots}.

If [A,B]=0[A,B]=0 then eAeB=eA+Be^A e^B = e^{A+B}. This is exactly why Trotterization is needed when [A,B]0[A,B]\neq 0 (see Term 3.4):

ei(A+B)t=limn(eiAt/neiBt/n)n,ei(A+B)δ=eiAδeiBδ+O(δ2). e^{-i(A+B)t} = \lim_{n\to\infty}\Big(e^{-iAt/n}e^{-iBt/n}\Big)^{n},\qquad e^{-i(A+B)\delta} = e^{-iA\delta}e^{-iB\delta} + O(\delta^2).

Hadamard lemma (operator conjugation):

eABeA=B+[A,B]+12![A,[A,B]]+. e^{A}Be^{-A} = B + [A,B] + \tfrac1{2!}[A,[A,B]] + \cdots.

5. Tensor-Product (Kronecker) Identities

  • Mixed-product: (AB)(CD)=(AC)(BD)(A\otimes B)(C\otimes D) = (AC)\otimes(BD).
  • Action on product states: (AB)(ab)=(Aa)(Bb)(A\otimes B)(|a\rangle\otimes|b\rangle) = (A|a\rangle)\otimes(B|b\rangle).
  • Adjoint / inverse / transpose distribute: (AB)1=A1B1(A\otimes B)^{-1} = A^{-1}\otimes B^{-1}, etc.
  • Eigenvalues: if Au=auA|u\rangle=a|u\rangle and Bv=bvB|v\rangle=b|v\rangle, then (AB)(uv)=ab(uv)(A\otimes B)(|u\rangle\otimes|v\rangle) = ab\,(|u\rangle\otimes|v\rangle).
  • Dimension: A(m×m)B(n×n)A\,(m\times m)\otimes B\,(n\times n) is mn×mnmn\times mn.

6. Complex Numbers, Roots of Unity, and the QFT Kernel

  • Euler: eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta;  eiθ=1\ |e^{i\theta}|=1.
  • NN-th roots of unity: ω=e2πi/N\omega = e^{2\pi i/N} satisfies ωN=1\omega^N = 1 and k=0N1ωk=0\sum_{k=0}^{N-1}\omega^{k} = 0 (for N>1N>1).
  • Geometric sum: k=0N1rk=1rN1r\displaystyle\sum_{k=0}^{N-1} r^k = \frac{1-r^N}{1-r} for r1r\neq1.
  • Orthogonality (DFT/QFT core): 1Nx=0N1e2πix(jk)/N=δjk.\displaystyle \frac1N\sum_{x=0}^{N-1} e^{2\pi i x(j-k)/N} = \delta_{jk}.
  • QFT action: QFTx=1Ny=0N1e2πixy/Ny,N=2n.\displaystyle \text{QFT}\,|x\rangle = \frac{1}{\sqrt N}\sum_{y=0}^{N-1} e^{2\pi i xy/N}\,|y\rangle,\quad N=2^n.

7. Probability & Statistics (for shots and estimation)

  • Born rule: pi=iψ2p_i = |\langle i|\psi\rangle|^2; ipi=1\sum_i p_i = 1.
  • Sample-mean estimator of A\langle A\rangle from MM shots has standard error σ/M\sigma/\sqrt M; halving the error costs 4×4\times the shots. Plan QPU budgets accordingly.
  • Binomial outcome: estimating a probability pp from MM shots gives variance p(1p)/Mp(1-p)/M.
  • Hoeffding bound: Pr[p^pϵ]2e2Mϵ2\Pr[\,|\hat p - p| \ge \epsilon\,] \le 2e^{-2M\epsilon^2} — how many shots guarantee a target confidence.

8. Frequently Used Special Values

Quantity Value
cos(π/8), sin(π/8)\cos(\pi/8),\ \sin(\pi/8) 0.9239, 0.3827\approx 0.9239,\ 0.3827
$\langle 0 H
Optimal Grover iterations (database size NN, one marked) π4N\big\lfloor \frac{\pi}{4}\sqrt N \big\rfloor
CHSH classical bound / quantum (Tsirelson) bound 22 / 222\sqrt2
Purity range for dd-dim state [1d,1]\big[\tfrac1d,\,1\big]
QFT gate count (nn qubits) Θ(n2)\Theta(n^2)

Further Reading

  • [NC] Nielsen & Chuang, §2.1, §4.2, and the inside-cover gate tables.
  • [Pre] Preskill, Ch. 2–3 for the operator algebra; Ch. 5 for channels.
  • Appendix C — Notation & Glossary for symbol conventions.

← Prev: Appendix D — References · Back to Program Index