Companion to final-review-cheatsheet.md (which covers Qiskit API syntax). This sheet is the physics/math layer: every matrix, the Bloch sphere, the identities, the algorithms. If it's on this sheet, be able to write it from memory.
∣ 0 ⟩ = ( 1 0 ) ∣ 1 ⟩ = ( 0 1 ) ∣ ± ⟩ = 1 2 ( 1 ± 1 ) ∣ ± i ⟩ = 1 2 ( 1 ± i ) |0\rangle = \begin{pmatrix}1\\0\end{pmatrix}\quad |1\rangle = \begin{pmatrix}0\\1\end{pmatrix}\quad |\pm\rangle = \tfrac{1}{\sqrt2}\begin{pmatrix}1\\\pm1\end{pmatrix}\quad |{\pm i}\rangle = \tfrac{1}{\sqrt2}\begin{pmatrix}1\\\pm i\end{pmatrix} ∣0 ⟩ = ( 1 0 ) ∣1 ⟩ = ( 0 1 ) ∣ ± ⟩ = 2 1 ( 1 ± 1 ) ∣ ± i ⟩ = 2 1 ( 1 ± i )
General qubit: ∣ ψ ⟩ = α ∣ 0 ⟩ + β ∣ 1 ⟩ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle ∣ ψ ⟩ = α ∣0 ⟩ + β ∣1 ⟩ , ∣ α ∣ 2 + ∣ β ∣ 2 = 1 \;|\alpha|^2 + |\beta|^2 = 1 ∣ α ∣ 2 + ∣ β ∣ 2 = 1 .
Born rule: P ( x ) = ∣ α x ∣ 2 = ∣ ⟨ x ∣ ψ ⟩ ∣ 2 P(x) = |\alpha_x|^2 = |\langle x|\psi\rangle|^2 P ( x ) = ∣ α x ∣ 2 = ∣ ⟨ x ∣ ψ ⟩ ∣ 2 ; state collapses to the outcome.
Bra = conjugate-transpose: ⟨ ψ ∣ = ( ∣ ψ ⟩ ) † \langle\psi| = (|\psi\rangle)^\dagger ⟨ ψ ∣ = ( ∣ ψ ⟩ ) † . Inner product ⟨ ϕ ∣ ψ ⟩ \langle\phi|\psi\rangle ⟨ ϕ ∣ ψ ⟩ ; orthogonal ⇔ 0.
Global phase e i γ ∣ ψ ⟩ e^{i\gamma}|\psi\rangle e iγ ∣ ψ ⟩ : unobservable. Relative phase: observable (after basis change).
Tensor product stacks systems: ( a 0 a 1 ) ⊗ ( b 0 b 1 ) = ( a 0 b 0 a 0 b 1 a 1 b 0 a 1 b 1 ) \begin{pmatrix}a_0\\a_1\end{pmatrix}\otimes\begin{pmatrix}b_0\\b_1\end{pmatrix} = \begin{pmatrix}a_0b_0\\a_0b_1\\a_1b_0\\a_1b_1\end{pmatrix} ( a 0 a 1 ) ⊗ ( b 0 b 1 ) = a 0 b 0 a 0 b 1 a 1 b 0 a 1 b 1 ; n n n qubits = 2 n 2^n 2 n amplitudes.
Qiskit is little-endian: qubit 0 = least significant bit = rightmost in bitstrings = top wire in drawings. "ZIX" = Z on q2, I on q1, X on q0.
∣ Φ ± ⟩ = 1 2 ( ∣ 00 ⟩ ± ∣ 11 ⟩ ) ∣ Ψ ± ⟩ = 1 2 ( ∣ 01 ⟩ ± ∣ 10 ⟩ ) |\Phi^\pm\rangle = \tfrac{1}{\sqrt2}(|00\rangle \pm |11\rangle)\qquad |\Psi^\pm\rangle = \tfrac{1}{\sqrt2}(|01\rangle \pm |10\rangle) ∣ Φ ± ⟩ = 2 1 ( ∣00 ⟩ ± ∣11 ⟩) ∣ Ψ ± ⟩ = 2 1 ( ∣01 ⟩ ± ∣10 ⟩)
h(0); cx(0,1) on ∣ 00 ⟩ |00\rangle ∣00 ⟩ → ∣ Φ + ⟩ |\Phi^+\rangle ∣ Φ + ⟩ . GHZ: 1 2 ( ∣ 0 n ⟩ + ∣ 1 n ⟩ ) \tfrac{1}{\sqrt2}(|0^n\rangle + |1^n\rangle) 2 1 ( ∣ 0 n ⟩ + ∣ 1 n ⟩) ; W: 1 3 ( ∣ 001 ⟩ + ∣ 010 ⟩ + ∣ 100 ⟩ ) \tfrac{1}{\sqrt3}(|001\rangle+|010\rangle+|100\rangle) 3 1 ( ∣001 ⟩ + ∣010 ⟩ + ∣100 ⟩) .
Entangled = not writable as ∣ a ⟩ ⊗ ∣ b ⟩ |a\rangle\otimes|b\rangle ∣ a ⟩ ⊗ ∣ b ⟩ . Reduced state of a Bell qubit = I / 2 I/2 I /2 (maximally mixed).
X = ( 0 1 1 0 ) Y = ( 0 − i i 0 ) Z = ( 1 0 0 − 1 ) H = 1 2 ( 1 1 1 − 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}\quad H = \tfrac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix} X = ( 0 1 1 0 ) Y = ( 0 i − i 0 ) Z = ( 1 0 0 − 1 ) H = 2 1 ( 1 1 1 − 1 )
S = ( 1 0 0 i ) T = ( 1 0 0 e i π / 4 ) P ( λ ) = ( 1 0 0 e i λ ) S X = 1 2 ( 1 + i 1 − i 1 − i 1 + i ) S = \begin{pmatrix}1&0\\0&i\end{pmatrix}\quad T = \begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}\quad P(\lambda) = \begin{pmatrix}1&0\\0&e^{i\lambda}\end{pmatrix}\quad SX = \tfrac12\begin{pmatrix}1{+}i&1{-}i\\1{-}i&1{+}i\end{pmatrix} S = ( 1 0 0 i ) T = ( 1 0 0 e iπ /4 ) P ( λ ) = ( 1 0 0 e iλ ) S X = 2 1 ( 1 + i 1 − i 1 − i 1 + i )
R x ( θ ) = ( cos θ 2 − i sin θ 2 − i sin θ 2 cos θ 2 ) R y ( θ ) = ( cos θ 2 − sin θ 2 sin θ 2 cos θ 2 ) R z ( θ ) = ( e − i θ / 2 0 0 e i θ / 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} R x ( θ ) = ( cos 2 θ − i sin 2 θ − i sin 2 θ cos 2 θ ) R y ( θ ) = ( cos 2 θ sin 2 θ − sin 2 θ cos 2 θ ) R z ( θ ) = ( e − i θ /2 0 0 e i θ /2 )
U ( θ , ϕ , λ ) = ( cos θ 2 − e i λ sin θ 2 e i ϕ sin θ 2 e i ( ϕ + λ ) cos θ 2 ) R P ( θ ) = e − i θ P / 2 = cos θ 2 I − i sin θ 2 P U(\theta,\phi,\lambda) = \begin{pmatrix}\cos\frac\theta2 & -e^{i\lambda}\sin\frac\theta2\\ e^{i\phi}\sin\frac\theta2 & e^{i(\phi+\lambda)}\cos\frac\theta2\end{pmatrix}\qquad R_P(\theta) = e^{-i\theta P/2} = \cos\tfrac\theta2 I - i\sin\tfrac\theta2 P U ( θ , ϕ , λ ) = ( cos 2 θ e i ϕ sin 2 θ − e iλ sin 2 θ e i ( ϕ + λ ) cos 2 θ ) R P ( θ ) = e − i θ P /2 = cos 2 θ I − i sin 2 θ P
Gate
Action
Bloch move
X
bit-flip ∥ 0 ⟩ ↔ ∥ 1 ⟩ \|0\rangle\leftrightarrow\|1\rangle ∥0 ⟩ ↔ ∥1 ⟩
180° about x
Y
bit+phase flip
180° about y
Z
∥ 1 ⟩ → − ∥ 1 ⟩ \|1\rangle \to -\|1\rangle ∥1 ⟩ → − ∥1 ⟩
180° about z
H
∥ 0 ⟩ → ∥ + ⟩ \|0\rangle\to\|+\rangle ∥0 ⟩ → ∥ + ⟩ , ∥ 1 ⟩ → ∥ − ⟩ \|1\rangle\to\|-\rangle ∥1 ⟩ → ∥ − ⟩
180° about x+z diagonal
S
∥ + ⟩ → ∥ + i ⟩ \|+\rangle\to\|{+i}\rangle ∥ + ⟩ → ∥ + i ⟩
90° about z
T
8th root of Z
45° about z
Rx/Ry/Rz(θ)
continuous
θ about that axis
C X c → t : flip t iff c = 1 C Z = d i a g ( 1 , 1 , 1 , − 1 ) S W A P : ∣ a b ⟩ → ∣ b a ⟩ CX_{c\to t}: \text{flip } t \text{ iff } c{=}1 \qquad CZ = \mathrm{diag}(1,1,1,-1) \qquad SWAP: |ab\rangle\to|ba\rangle C X c → t : flip t iff c = 1 C Z = diag ( 1 , 1 , 1 , − 1 ) S W A P : ∣ ab ⟩ → ∣ ba ⟩
C X 0 → 1 (LE basis ∣ q 1 q 0 ⟩ ) = ( 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 ) S W A P = ( 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 ) CX_{0\to1} \text{ (LE basis } |q_1q_0\rangle{)} = \begin{pmatrix}1&0&0&0\\0&0&0&1\\0&0&1&0\\0&1&0&0\end{pmatrix}\qquad SWAP = \begin{pmatrix}1&0&0&0\\0&0&1&0\\0&1&0&0\\0&0&0&1\end{pmatrix} C X 0 → 1 (LE basis ∣ q 1 q 0 ⟩ ) = 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 S W A P = 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1
General recipe: C - U = ∣ 0 ⟩ ⟨ 0 ∣ ⊗ I + ∣ 1 ⟩ ⟨ 1 ∣ ⊗ U C\text{-}U = |0\rangle\langle0|\otimes I + |1\rangle\langle1|\otimes U C - U = ∣0 ⟩ ⟨ 0∣ ⊗ I + ∣1 ⟩ ⟨ 1∣ ⊗ U .
CCX (Toffoli) = AND into target; CSWAP (Fredkin) = controlled swap.
Symmetric (argument order irrelevant): cz, cp, swap, iswap, rxx, ryy, rzz. Asymmetric: cx, cy, ch, ecr, crx, cry, crz.
Powers/inverses
Conjugations
Structural
H 2 = X 2 = Y 2 = Z 2 = I H^2{=}X^2{=}Y^2{=}Z^2{=}I H 2 = X 2 = Y 2 = Z 2 = I
H X H = Z HXH = Z H X H = Z , H Z H = X HZH = X H Z H = X
S W A P = C X 01 C X 10 C X 01 SWAP = CX_{01}CX_{10}CX_{01} S W A P = C X 01 C X 10 C X 01
T 2 = S , S 2 = Z , T 4 = Z T^2 = S,\; S^2 = Z,\; T^4 = Z T 2 = S , S 2 = Z , T 4 = Z
H Y H = − Y HYH = -Y H Y H = − Y
C Z = ( I ⊗ H ) C X ( I ⊗ H ) CZ = (I{\otimes}H)CX(I{\otimes}H) C Z = ( I ⊗ H ) C X ( I ⊗ H )
S S † = I S S^\dagger = I S S † = I , T T † = I T T^\dagger = I T T † = I
S X S † = Y SXS^\dagger = Y S X S † = Y
( H ⊗ H ) C X 01 ( H ⊗ H ) = C X 10 (H{\otimes}H)CX_{01}(H{\otimes}H) = CX_{10} ( H ⊗ H ) C X 01 ( H ⊗ H ) = C X 10
S X 2 = X SX^2 = X S X 2 = X
H R x ( θ ) H = R z ( θ ) HR_x(\theta)H = R_z(\theta) H R x ( θ ) H = R z ( θ )
Y = i X Z Y = iXZ Y = i X Z ; X Y = i Z XY = iZ X Y = i Z , Y Z = i X YZ = iX Y Z = i X , Z X = i Y ZX = iY Z X = iY
R P ( α ) R P ( β ) = R P ( α + β ) R_P(\alpha)R_P(\beta) = R_P(\alpha{+}\beta) R P ( α ) R P ( β ) = R P ( α + β )
distinct Paulis anticommute
Phase-gate ladder: Z = P ( π ) Z = P(\pi) Z = P ( π ) , S = P ( π / 2 ) S = P(\pi/2) S = P ( π /2 ) , T = P ( π / 4 ) T = P(\pi/4) T = P ( π /4 ) ; R z ( λ ) = e − i λ / 2 P ( λ ) R_z(\lambda) = e^{-i\lambda/2}P(\lambda) R z ( λ ) = e − iλ /2 P ( λ ) — equal only up to global phase ⇒ p(π) == z exactly, rz(π) = −iZ (equiv, not equal). Controlled versions differ for real.
Rotation periods: R P ( 2 π ) = − I R_P(2\pi) = -I R P ( 2 π ) = − I , R P ( 4 π ) = I R_P(4\pi) = I R P ( 4 π ) = I .
∣ ψ ⟩ = cos θ 2 ∣ 0 ⟩ + e i ϕ sin θ 2 ∣ 1 ⟩ , r ⃗ = ( ⟨ X ⟩ , ⟨ Y ⟩ , ⟨ Z ⟩ ) = ( sin θ cos ϕ , sin θ sin ϕ , cos θ ) |\psi\rangle = \cos\tfrac\theta2|0\rangle + e^{i\phi}\sin\tfrac\theta2|1\rangle,\qquad \vec r = (\langle X\rangle, \langle Y\rangle, \langle Z\rangle) = (\sin\theta\cos\phi, \sin\theta\sin\phi, \cos\theta) ∣ ψ ⟩ = cos 2 θ ∣0 ⟩ + e i ϕ sin 2 θ ∣1 ⟩ , r = (⟨ X ⟩ , ⟨ Y ⟩ , ⟨ Z ⟩) = ( sin θ cos ϕ , sin θ sin ϕ , cos θ )
Poles: ∣ 0 ⟩ |0\rangle ∣0 ⟩ north, ∣ 1 ⟩ |1\rangle ∣1 ⟩ south. Equator: ∣ + ⟩ |+\rangle ∣ + ⟩ +x, ∣ − ⟩ |-\rangle ∣ − ⟩ −x, ∣ + i ⟩ |{+i}\rangle ∣ + i ⟩ +y, ∣ − i ⟩ |{-i}\rangle ∣ − i ⟩ −y.
Orthogonal states = antipodal points. Mixed states = inside the ball; I / 2 I/2 I /2 = center.
ρ = 1 2 ( I + r ⃗ ⋅ σ ⃗ ) \rho = \tfrac12(I + \vec r\cdot\vec\sigma) ρ = 2 1 ( I + r ⋅ σ ) ; entangled qubit ⇒ short/zero arrow in per-qubit plots.
Q-sphere (whole register): node per bitstring, size = probability, color = phase, latitude = Hamming weight.
Hermitian (A † = A A^\dagger{=}A A † = A ): observables, real eigenvalues. Unitary (U † U = I U^\dagger U{=}I U † U = I ): gates, ∣ e i g ∣ = 1 |{\rm eig}|=1 ∣ eig ∣ = 1 . Paulis & H are both.
Eigenbases: Z → { ∣ 0 ⟩ , ∣ 1 ⟩ } \{|0\rangle,|1\rangle\} { ∣0 ⟩ , ∣1 ⟩} ; X → { ∣ + ⟩ , ∣ − ⟩ } \{|+\rangle,|-\rangle\} { ∣ + ⟩ , ∣ − ⟩} ; Y → { ∣ + i ⟩ , ∣ − i ⟩ } \{|{+i}\rangle,|{-i}\rangle\} { ∣ + i ⟩ , ∣ − i ⟩} (eigenvalues ±1).
Expectation: ⟨ A ⟩ = ⟨ ψ ∣ A ∣ ψ ⟩ = T r ( A ρ ) = ∑ j λ j P ( j ) \langle A\rangle = \langle\psi|A|\psi\rangle = \mathrm{Tr}(A\rho) = \sum_j \lambda_j P(j) ⟨ A ⟩ = ⟨ ψ ∣ A ∣ ψ ⟩ = Tr ( A ρ ) = ∑ j λ j P ( j ) . ⟨ Z ⟩ = P ( 0 ) − P ( 1 ) \langle Z\rangle = P(0) - P(1) ⟨ Z ⟩ = P ( 0 ) − P ( 1 ) .
Table: ⟨ Z ⟩ ∣ 0 ⟩ = 1 \langle Z\rangle_{|0\rangle}{=}1 ⟨ Z ⟩ ∣0 ⟩ = 1 , ⟨ X ⟩ ∣ + ⟩ = 1 \langle X\rangle_{|+\rangle}{=}1 ⟨ X ⟩ ∣ + ⟩ = 1 , ⟨ Y ⟩ ∣ + i ⟩ = 1 \langle Y\rangle_{|+i\rangle}{=}1 ⟨ Y ⟩ ∣ + i ⟩ = 1 , all others among these states 0. R y ( θ ) ∣ 0 ⟩ R_y(\theta)|0\rangle R y ( θ ) ∣0 ⟩ : ⟨ Z ⟩ = cos θ \langle Z\rangle{=}\cos\theta ⟨ Z ⟩ = cos θ , ⟨ X ⟩ = sin θ \langle X\rangle{=}\sin\theta ⟨ X ⟩ = sin θ . Bell: ⟨ Z Z ⟩ = ⟨ X X ⟩ = 1 \langle ZZ\rangle{=}\langle XX\rangle{=}1 ⟨ Z Z ⟩ = ⟨ X X ⟩ = 1 , ⟨ Y Y ⟩ = − 1 \langle YY\rangle{=}-1 ⟨ Y Y ⟩ = − 1 , singles 0.
Any observable = real combo of Pauli strings: ∣ 0 ⟩ ⟨ 0 ∣ = 1 2 ( I + Z ) |0\rangle\langle0| = \tfrac12(I{+}Z) ∣0 ⟩ ⟨ 0∣ = 2 1 ( I + Z ) , ∣ 1 ⟩ ⟨ 1 ∣ = 1 2 ( I − Z ) |1\rangle\langle1| = \tfrac12(I{-}Z) ∣1 ⟩ ⟨ 1∣ = 2 1 ( I − Z ) .
Density matrix: ρ = ∑ p k ∣ ψ k ⟩ ⟨ ψ k ∣ \rho = \sum p_k|\psi_k\rangle\langle\psi_k| ρ = ∑ p k ∣ ψ k ⟩ ⟨ ψ k ∣ ; T r ρ = 1 \mathrm{Tr}\rho = 1 Tr ρ = 1 , ρ ⪰ 0 \rho \succeq 0 ρ ⪰ 0 . Purity T r ( ρ 2 ) \mathrm{Tr}(\rho^2) Tr ( ρ 2 ) : 1 pure, 1 / 2 n 1/2^n 1/ 2 n maximally mixed. Off-diagonals = coherence (superposition); none = classical mixture.
Partial trace: reduced state of subsystem; Bell → I / 2 I/2 I /2 per qubit.
Fidelity (Qiskit convention): F = ∣ ⟨ ψ ∣ ϕ ⟩ ∣ 2 F = |\langle\psi|\phi\rangle|^2 F = ∣ ⟨ ψ ∣ ϕ ⟩ ∣ 2 ; 1 same, 0 orthogonal; global-phase blind.
Pauli string commutation: count differing non-I positions — odd ⇒ anticommute.
Measure X: apply H, then measure Z. Measure Y: apply S † S^\dagger S † then H, then measure Z.
Partial measurement: P ( s ) = ∑ consistent ∣ α ∣ 2 P(s) = \sum_{\text{consistent}} |\alpha|^2 P ( s ) = ∑ consistent ∣ α ∣ 2 ; post-state = renormalized projection.
Shots: σ ( p ^ ) = p ( 1 − p ) / N ≤ 1 2 N \sigma(\hat p) = \sqrt{p(1{-}p)/N} \le \tfrac{1}{2\sqrt N} σ ( p ^ ) = p ( 1 − p ) / N ≤ 2 N 1 . 4× shots ⇒ ½ error. 1024 → ~1.6%, 10k → 0.5%.
Shots fix statistical error only; gate/readout noise is systematic → mitigation.
Depolarizing p p p : ⟨ P ⟩ → ( 1 − p ) ⟨ P ⟩ \langle P\rangle \to (1{-}p)\langle P\rangle ⟨ P ⟩ → ( 1 − p ) ⟨ P ⟩ ; k k k layers ⇒ ( 1 − p ) k (1{-}p)^k ( 1 − p ) k . Readout ε: → ( 1 − 2 ϵ ) ⟨ Z ⟩ \to(1{-}2\epsilon)\langle Z\rangle → ( 1 − 2 ϵ ) ⟨ Z ⟩ .
Mitigation map: DD = idle dephasing (XX echo); TREX = readout; ZNE = amplify λ=1,3,5 & extrapolate to 0 (cheap, can be biased); PEC = quasi-probability cancellation (unbiased, cost γ 2 k \gamma^{2k} γ 2 k ); twirling = coherent → stochastic noise.
Phase kickback: C - U C\text{-}U C - U on eigenvector ⇒ phase e i φ e^{i\varphi} e i φ lands on control. Oracle trick: ∣ x ⟩ ∣ − ⟩ → ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ |x\rangle|-\rangle \to (-1)^{f(x)}|x\rangle|-\rangle ∣ x ⟩ ∣ − ⟩ → ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ .
H-sandwich: H ⊗ n ∣ x ⟩ = 2 − n / 2 ∑ y ( − 1 ) x ⋅ y ∣ y ⟩ H^{\otimes n}|x\rangle = 2^{-n/2}\sum_y (-1)^{x\cdot y}|y\rangle H ⊗ n ∣ x ⟩ = 2 − n /2 ∑ y ( − 1 ) x ⋅ y ∣ y ⟩ .
Deutsch–Jozsa: H → oracle → H; measure 0 n 0^n 0 n ⇔ constant, else balanced. 1 query.
Bernstein–Vazirani: same circuit, f = s ⋅ x f = s\cdot x f = s ⋅ x ; output = s s s . 1 query.
Grover: sin θ = M / N \sin\theta = \sqrt{M/N} sin θ = M / N ; P ( t ) = sin 2 ( ( 2 t + 1 ) θ ) P(t) = \sin^2((2t{+}1)\theta) P ( t ) = sin 2 (( 2 t + 1 ) θ ) ; t o p t ≈ π 4 N / M t_{\rm opt} \approx \tfrac\pi4\sqrt{N/M} t opt ≈ 4 π N / M ; overshoot ⇒ P drops. N=4,M=1: 1 iteration, exact. Quadratic speedup.
QFT: ∣ x ⟩ → 2 − n / 2 ∑ y e 2 π i x y / 2 n ∣ y ⟩ |x\rangle \to 2^{-n/2}\sum_y e^{2\pi ixy/2^n}|y\rangle ∣ x ⟩ → 2 − n /2 ∑ y e 2 π i x y / 2 n ∣ y ⟩ ; O ( n 2 ) O(n^2) O ( n 2 ) gates; QFT₁ = H.
QPE: m qubits + controlled-U 2 j U^{2^j} U 2 j + inverse QFT ⇒ m-bit binary fraction of eigenphase φ. Exact iff 2 m φ ∈ Z 2^m\varphi \in \mathbb{Z} 2 m φ ∈ Z .
Shor: QPE-based order finding (period r of a x m o d N a^x \bmod N a x mod N ) + gcd ( a r / 2 ± 1 , N ) \gcd(a^{r/2}\pm1, N) g cd( a r /2 ± 1 , N ) . Poly time.
Teleportation: Bell pair + 2 classical bits; corrections Z b 1 X b 0 Z^{b_1}X^{b_0} Z b 1 X b 0 . Superdense: 1 qubit carries 2 bits; encode { I , X , Z , Z X } \{I,X,Z,ZX\} { I , X , Z , Z X } → 4 Bell states.
No-cloning: linearity forbids ∣ ψ ⟩ ↦ ∣ ψ ⟩ ∣ ψ ⟩ |\psi\rangle \mapsto |\psi\rangle|\psi\rangle ∣ ψ ⟩ ↦ ∣ ψ ⟩ ∣ ψ ⟩ (CNOT entangles, doesn't copy).
Speedups: DJ/Simon exponential (query), BV polynomial, Grover quadratic, Shor (believed) exponential.
Universal native set: {rz, sx, x} + entangler (cx/cz/ecr). Any 1q gate = rz·sx·rz·sx·rz (Euler); rz is virtual (free, error-less).
General 2q unitary ≤ 3 CNOTs; n n n q unitary O ( 4 n ) O(4^n) O ( 4 n ) gates. SWAP = 3 CNOTs; distance-d routing ≈ 3 ( d − 1 ) 3(d{-}1) 3 ( d − 1 ) extra CNOTs.
Success ≈ ∏ f g \prod f_g ∏ f g : 100 gates × 99.5% ≈ 61%. T 1 T_1 T 1 = relaxation, T 2 T_2 T 2 = dephasing.
ISA circuit = native gates + coupling-map compliant; V2 primitives require it.
Thing
Value
e i π / 4 e^{i\pi/4} e iπ /4
1 + i 2 \tfrac{1+i}{\sqrt2} 2 1 + i
e i π / 2 , e i π , e 3 i π / 2 e^{i\pi/2}, e^{i\pi}, e^{3i\pi/2} e iπ /2 , e iπ , e 3 iπ /2
i , − 1 , − i i, -1, -i i , − 1 , − i
1 2 \tfrac{1}{\sqrt2} 2 1
≈ 0.7071 \approx 0.7071 ≈ 0.7071 ; ( 1 2 ) 2 = 1 2 (\tfrac{1}{\sqrt2})^2 = \tfrac12 ( 2 1 ) 2 = 2 1
cos π 4 = sin π 4 \cos\frac\pi4 = \sin\frac\pi4 cos 4 π = sin 4 π
1 2 \tfrac{1}{\sqrt2} 2 1
cos π 3 , sin π 3 \cos\frac\pi3, \sin\frac\pi3 cos 3 π , sin 3 π
1 2 , 3 2 \tfrac12, \tfrac{\sqrt3}{2} 2 1 , 2 3
cos π 6 , sin π 6 \cos\frac\pi6, \sin\frac\pi6 cos 6 π , sin 6 π
3 2 , 1 2 \tfrac{\sqrt3}{2}, \tfrac12 2 3 , 2 1
statevector index k
bitstring of k, q0 = low bit
P = ∣ amplitude ∣ 2 P = |\text{amplitude}|^2 P = ∣ amplitude ∣ 2 ; phases invisible to Z-sampling.
Little-endian everywhere: x(0) on 2 qubits ⇒ '01'.
H H H : 0↔+, 1↔−; H 2 = I H^2 = I H 2 = I ; H X H = Z HXH = Z H X H = Z .
T 2 = S T^2 = S T 2 = S , S 2 = Z S^2 = Z S 2 = Z ; dg = inverse.
R P ( θ ) = cos θ 2 I − i sin θ 2 P R_P(\theta) = \cos\frac\theta2 I - i\sin\frac\theta2 P R P ( θ ) = cos 2 θ I − i sin 2 θ P ; period 4π; R z ( π ) = − i Z ≠ Z R_z(\pi) = -iZ \ne Z R z ( π ) = − i Z = Z but ≡ Z.
Bell = h + cx; ⟨ Z Z ⟩ = ⟨ X X ⟩ = + 1 \langle ZZ\rangle = \langle XX\rangle = +1 ⟨ Z Z ⟩ = ⟨ X X ⟩ = + 1 , ⟨ Y Y ⟩ = − 1 \langle YY\rangle = -1 ⟨ Y Y ⟩ = − 1 ; reduced state I / 2 I/2 I /2 .
Orthogonal = antipodal on Bloch; S/T/Rz spin the equator.
⟨Z⟩ = P(0) − P(1); measure X via H; measure Y via S†,H.
σ = 1 2 N \tfrac{1}{2\sqrt N} 2 N 1 ; shots ≠ bias cure.
Depolarizing shrinks: ( 1 − p ) k (1-p)^k ( 1 − p ) k ; ZNE extrapolates back to λ=0.
Kickback: phases land on the control; ∣ x ⟩ ∣ − ⟩ → ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ |x\rangle|-\rangle \to (-1)^{f(x)}|x\rangle|-\rangle ∣ x ⟩ ∣ − ⟩ → ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ .
Grover: t ≈ π 4 N / M t \approx \tfrac\pi4\sqrt{N/M} t ≈ 4 π N / M , and MORE ITERATIONS CAN HURT.