The evolution \(e^{-i\hat{H}t}\) commutes with \(\hat{H}\) at all times, and it stays in a family of unitaries described by \(D\) numbers. This exercise counts that family.
Exercise
(a) Let \(\hat{H}\) have \(D\) distinct eigenvalues. Show that a unitary commutes with \(\hat{H}\) exactly when it is diagonal in the eigenbasis of \(\hat{H}\), so that these unitaries form a torus of real dimension \(D\).
(b) Let the eigenvalues have degeneracies \(d_1,\ldots,d_m\) with \(\sum_k d_k = D\). Show that the unitaries commuting with \(\hat{H}\) are block diagonal, \(U(d_1)\times\cdots\times U(d_m)\), of real dimension \(\sum_k d_k^2\).
(c) For \(D = 4\), evaluate the dimension for the degeneracy patterns \((1,1,1,1)\), \((2,1,1)\), \((2,2)\), \((3,1)\) and \((4)\), and compare with \(\dim U(4) = 16\). For \(N\) qubits with a non-degenerate spectrum, what fraction of the \(4^N\) dimensions of \(U(2^N)\) does the family fill?
Solution
Part (a)
If \([\hat U,\hat H] = 0\) and \(\hat H|E_n\rangle = E_n|E_n\rangle\), then \(\hat H(\hat U|E_n\rangle) = E_n(\hat U|E_n\rangle)\), so \(\hat U\) maps each eigenspace into itself. A one-dimensional eigenspace is mapped to itself only by a phase, \(\hat U|E_n\rangle = e^{i\phi_n}|E_n\rangle\), so \(\hat U\) is diagonal and fixed by the \(D\) phases \(\phi_n\). Conversely every such diagonal unitary commutes with \(\hat H\). The phases range over a product of \(D\) circles, a torus of dimension \(D\).
Part (b)
The same argument shows that \(\hat U\) maps each \(d_k\)-dimensional eigenspace into itself, where it may act as any unitary, so \(\hat U\) is block diagonal with blocks in \(U(d_k)\). Since \(\dim_{\mathbb{R}} U(d) = d^2\), each block contributes \(d_k^2\) real dimensions, and the total is \(\sum_k d_k^2\).
Part (c)
The patterns give \(4\), \(6\), \(8\), \(10\) and \(16\). Only the fully degenerate case, \(\hat H \propto \mathbb{I}\), fills \(U(4)\). For \(N\) qubits with a non-degenerate spectrum the family has dimension \(2^N\) out of \(4^N\), a fraction \(2^{-N}\) that vanishes exponentially.
Numerical verification
The real dimension of the skew-Hermitian matrices that commute with \(\hat H = \mathrm{diag}(E_1,\ldots,E_D)\) is computed as the null-space dimension of \(X \mapsto [X,\hat H]\) on a basis of \(\mathfrak{u}(D)\), and compared with \(\sum_k d_k^2\).
Code
import numpy as npdef commutant_dim(eigs):"""Real dimension of {X skew-Hermitian : [X, H] = 0} for H = diag(eigs).""" D =len(eigs) H = np.diag(eigs).astype(complex) basis = []for i inrange(D): A = np.zeros((D, D), complex) A[i, i] =1j basis.append(A)for j inrange(i+1, D): A = np.zeros((D, D), complex) A[i, j], A[j, i] =1, -1 basis.append(A) A = np.zeros((D, D), complex) A[i, j], A[j, i] =1j, 1j basis.append(A) M = np.array([(B @ H - H @ B).ravel() for B in basis]).Treturnlen(basis) - np.linalg.matrix_rank(np.vstack([M.real, M.imag]))for pattern in [(1,1,1,1), (2,1,1), (2,2), (3,1), (4,)]: eigs =sum([[k]*m for k, m inenumerate(pattern)], []) d = commutant_dim(np.array(eigs, float))print(pattern, "dim =", d, " sum d_k^2 =", sum(m*m for m in pattern))assert d ==sum(m*m for m in pattern)for N inrange(1, 6):print(f"N={N}: non-degenerate family dimension 2^N = {2**N} of 4^N = {4**N}, fraction {2**N/4**N:.4f}")print("sum d_k^2 VERIFIED")
(1, 1, 1, 1) dim = 4 sum d_k^2 = 4
(2, 1, 1) dim = 6 sum d_k^2 = 6
(2, 2) dim = 8 sum d_k^2 = 8
(3, 1) dim = 10 sum d_k^2 = 10
(4,) dim = 16 sum d_k^2 = 16
N=1: non-degenerate family dimension 2^N = 2 of 4^N = 4, fraction 0.5000
N=2: non-degenerate family dimension 2^N = 4 of 4^N = 16, fraction 0.2500
N=3: non-degenerate family dimension 2^N = 8 of 4^N = 64, fraction 0.1250
N=4: non-degenerate family dimension 2^N = 16 of 4^N = 256, fraction 0.0625
N=5: non-degenerate family dimension 2^N = 32 of 4^N = 1024, fraction 0.0312
sum d_k^2 VERIFIED
Takeaway
The evolution \(e^{-i\hat{H}t}\) stays inside the unitaries that commute with \(\hat H\), a family of dimension \(\sum_k d_k^2\). For a non-degenerate spectrum of \(N\) qubits this is \(2^N\) of the \(4^N\) dimensions of \(U(2^N)\), a fraction \(2^{-N}\) that vanishes exponentially.
References
Płodzień, Information Scrambling, Quantum Chaos, and Haar-Random States, lecture notes (2025). arXiv:2511.14397