Appendix B — Transition formulas, Gell-Mann matrices and Chebyshev polynomials
This appendix gathers in one place the closed forms used in Chapters 2 and 3: the universal gate and the reflections written in \(q=qg_Z\), the transition probability, the generalization of \(qg_Z\) to qudits with the diagonal Gell-Mann matrices, and the Grover trajectory as a Chebyshev polynomial (notes, §37 and §166). There are no new results. What it adds is the check: tools/make_appendices.py evaluates each formula of qang.algebra against direct linear algebra on 2000 random states and writes the maximal error here. If a formula were wrong, the script would stop.
B.1 Single-qubit formulas
With \(q=qg_Z=\cos\theta\), \(\cos\tfrac\theta2=\sqrt{(1+q)/2}\) and \(\sin\tfrac\theta2=\sqrt{(1-q)/2}\). The pure state with polar bias \(q\) and azimuth \(\varphi\) is
\[ |\psi(q,\varphi)\rangle=\sqrt{\tfrac{1+q}{2}}\,|0\rangle+e^{i\varphi}\sqrt{\tfrac{1-q}{2}}\,|1\rangle,\qquad \vec r=\big(\sqrt{1-q^2}\cos\varphi,\ \sqrt{1-q^2}\sin\varphi,\ q\big). \]
On the angular qga scale of Chapter 1 (Section 1.4), with \(\theta=2\pi\,\theta_{qga}/1000\), the bias is \(q=\cos(2\pi\,\theta_{qga}/1000)\) and the amplitudes are \(\cos(\pi\,\theta_{qga}/1000)\) and \(\sin(\pi\,\theta_{qga}/1000)\): the formulas below do not change, only the unit of the angle.
The formulas are:
\[ U_3^{qg}(q,\varphi,\lambda)=\begin{pmatrix}\sqrt{\tfrac{1+q}{2}} & -e^{i\lambda}\sqrt{\tfrac{1-q}{2}}\\ e^{i\varphi}\sqrt{\tfrac{1-q}{2}} & e^{i(\varphi+\lambda)}\sqrt{\tfrac{1+q}{2}}\end{pmatrix},\qquad \big|U_{ij}\big|^2=\begin{pmatrix}\tfrac{1+q}{2} & \tfrac{1-q}{2}\\ \tfrac{1-q}{2} & \tfrac{1+q}{2}\end{pmatrix} \tag{B.1}\]
\[ I-2|\psi\rangle\langle\psi|=-q\,Z-\sqrt{1-q^2}\,X,\qquad 2|\psi\rangle\langle\psi|-I=q\,Z+\sqrt{1-q^2}\,X \tag{B.2}\]
\[ |\langle\psi_1|\psi_2\rangle|^2=\frac{1+\vec r_1\cdot\vec r_2}{2}\ \xrightarrow{\ \varphi_1=\varphi_2\ }\ \frac{1+q_1q_2+\sqrt{(1-q_1^2)(1-q_2^2)}}{2} \tag{B.3}\]
| formula | qang.algebra function |
compared with | maximal error |
|---|---|---|---|
| universal gate | u3_qang |
Qiskit’s UGate(arccos q, φ, λ) |
\(1.7\cdot10^{-16}\) |
| transition matrix | transition_matrix |
\(\vert{}U_{ij}\vert{}^2\) | \(5.6\cdot10^{-16}\) |
| Householder | householder_qg |
\(I-2\vert{}\psi\rangle\langle\psi\vert{}\) | \(1.2\cdot10^{-15}\) |
| Grover diffuser | grover_diffuser_qg |
\(2\vert{}\psi\rangle\langle\psi\vert{}-I\) | \(1.2\cdot10^{-15}\) |
| transition probability | transition_probability |
\(\vert{}\langle\psi_1\vert{}\psi_2\rangle\vert{}^2\) | \(5.6\cdot10^{-16}\) |
| same, on one meridian | (closed form) | \(\vert{}\langle\psi_1\vert{}\psi_2\rangle\vert{}^2\) | \(6.7\cdot10^{-16}\) |
The transition matrix is doubly stochastic, rational in \(q\) and independent of the phases: the probability a gate leaves is read without trigonometry. With \((q,\varphi,\lambda)=(1,0,0)\), \((-1,0,\pi)\), \((1,0,\pi)\) and \((0,0,\pi)\), Equation B.1 gives exactly \(I\), \(X\), \(Z\) and \(H\); the script checks it. The reflector and the diffuser are the same operator with opposite sign, and both are linear combinations of \(Z\) and \(X\) with coefficients \(q\) and \(\sqrt{1-q^2}\) (Chapter 3).
B.2 Diagonal Gell-Mann matrices
A \(d\)-level qudit has \(d^2-1\) generators of \(\mathfrak{su}(d)\), the generalized Gell-Mann matrices. Only \(d-1\) of them are diagonal: they form the Cartan subalgebra and are the only ones read by measuring in the computational basis. They are
\[ \lambda_k=\sqrt{\tfrac{2}{k(k+1)}}\;\mathrm{diag}(\underbrace{1,\dots,1}_{k},-k,0,\dots,0),\qquad k=1,\dots,d-1,\qquad \mathrm{Tr}(\lambda_j\lambda_k)=2\delta_{jk}, \tag{B.4}\]
and their expectation values are linear in the populations \(p\) and determine them:
\[ \langle\lambda_k\rangle=\sum_i p_i\,(\lambda_k)_{ii},\qquad p=\frac1d+\frac12\sum_{k=1}^{d-1}\langle\lambda_k\rangle\,\mathrm{diag}(\lambda_k). \tag{B.5}\]
cartan_generators.
| \(d\) | \(k\) | \(\lambda_k\) |
|---|---|---|
| 2 | 1 | \(\mathrm{diag}(1, -1)\) |
| 3 | 1 | \(\mathrm{diag}(1, -1, 0)\) |
| 3 | 2 | \(\tfrac{1}{\sqrt{3}}\,\mathrm{diag}(1, 1, -2)\) |
| 4 | 1 | \(\mathrm{diag}(1, -1, 0, 0)\) |
| 4 | 2 | \(\tfrac{1}{\sqrt{3}}\,\mathrm{diag}(1, 1, -2, 0)\) |
| 4 | 3 | \(\tfrac{1}{\sqrt{6}}\,\mathrm{diag}(1, 1, 1, -3)\) |
For \(d=2\) the only one is \(\lambda_1=Z\) and its value is \(qg_Z\). For \(d=3\) they are Gell-Mann’s \(\lambda_3\) and \(\lambda_8\). The script recovers the populations from the \(d-1\) values for \(d=2,\dots,6\), 200 random distributions each, with maximal error \(2.2\cdot10^{-16}\). An example: the qutrit with \(p=(0.5, 0.3, 0.2)\) reads \(\langle\lambda_3\rangle=0.2000\) and \(\langle\lambda_8\rangle=0.2309\).
This is a definition and an identity. Whether reading more levels gives qang any advantage was asked in §70 for leakage, and none was found (Chapter 2).
B.3 Chebyshev polynomials and the Grover trajectory
With amplitude \(a=\sin^2t\) and the good/bad flag read as a qubit, \(qg_0=1-2a=\cos2t\). Each Grover iteration adds \(2t\) to the angle, so after \(k\) iterations
\[ qg_k=T_{2k+1}(qg_0),\qquad T_m(\cos x)=\cos mx, \tag{B.6}\]
with \(T_m\) the Chebyshev polynomial of the first kind. Since \(T_m'=m\,U_{m-1}\) and \(1-T_m^2=(1-q^2)\,U_{m-1}^2\), the one-shot Fisher information at depth \(m\) is
\[ F_m(qg_0)=\frac{m^2}{1-qg_0^2}, \tag{B.7}\]
the factor \(m^2\) over the depth-1 information, the same along the whole fringe. It is the qg form of the known \(4m^2\) for the angle (Suzuki et al. 2020).
| \(k\) | \(m=2k+1\) | \(T_m(q)\) | \(F_m/F_1\) | \(qg_k\) at \(a=0.1\) (m-qg) |
|---|---|---|---|---|
| 0 | 1 | \(q\) | 1 | +800.0 |
| 1 | 3 | \(4q^{3} - 3q\) | 9 | -352.0 |
| 2 | 5 | \(16q^{5} - 20q^{3} + 5q\) | 25 | -997.1 |
| 3 | 7 | \(64q^{7} - 112q^{5} + 56q^{3} - 7q\) | 49 | -206.4 |
| 4 | 9 | \(256q^{9} - 576q^{7} + 432q^{5} - 120q^{3} + 9q\) | 81 | +881.5 |
The script applies the diffuser of Equation B.2 and the oracle \(Z\) to 200 random initial states, up to \(k=5\), and finds Equation B.6 with maximal error \(1.7\cdot10^{-15}\). It checks Equation B.7 by finite differences for \(m=1,\dots,9\), with maximal relative error \(1.7\cdot10^{-10}\). The practical side of §37 is in Chapter 3: the noise has to enter the likelihood, and the advantage of amplitude estimation ends near depth \(1/p\).
Bibliographic notes
The matrices are those of Gell-Mann (1962). The reflector is that of Householder (1958); Grover search, Grover (1996); amplitude estimation, Brassard et al. (2002), and its maximum-likelihood version, Suzuki et al. (2020). The transition probability is the distance of Wootters (1981). The numbered notes (§) and the script of this appendix are in the repository (Monteverde 2026).