Lesson 6 · 50 min · core
Hermitian & Unitary Operators
Two classes of operators carry all of quantum mechanics: Hermitian operators (observables) and unitary operators (gates and time evolution). We prove that Hermitian operators have real eigenvalues and orthogonal eigenvectors, that unitaries preserve inner products and have eigenvalues on the unit circle, and we verify both properties for the Pauli, Hadamard, and matrices.
Prerequisites: Linear Operators & Matrix Representations
Objectives and key results
Test whether a matrix is Hermitian () or unitary () by direct computation.
Prove that the eigenvalues of a Hermitian operator are real and that eigenvectors belonging to distinct eigenvalues are orthogonal.
Prove that unitaries preserve inner products and norms, have eigenvalues of modulus one, have orthonormal columns, and satisfy whenever .
Compute the eigenvalues of any matrix from .
- definition · Hermitian operator
- theorem · Spectrum of a Hermitian operator
- theorem · Unitaries preserve inner products
- identity · Pauli algebra
- formula · 2×2 characteristic polynomial
Hermitian operators and their real spectra#
In the previous lesson we defined the adjoint by and showed that its matrix is the conjugate transpose. An operator that equals its own adjoint is special: the postulates of quantum mechanics (Module 1.3) identify measurable quantities — energy, spin along an axis, the parity of two qubits — with such operators, and the possible measurement outcomes with their eigenvalues. For this to make physical sense the eigenvalues must be real numbers and the outcomes must correspond to perfectly distinguishable (orthogonal) states. Both facts are theorems, and we prove them now.
Definition
Hermitian (self-adjoint) operator
is Hermitian if , i.e. for all . In matrix form : the diagonal entries are real () and entries mirrored across the diagonal are complex conjugates. Example: is Hermitian because .
Eigenvalues of a Hermitian operator are real
If and with , then .
Proof (5 steps)
- Step 1:Rescale the eigenvector to unit norm; eigenvectors are non-zero so this is possible and does not change .
- Step 2:Use the eigen-equation in the second slot; the inner product is linear in the second argument.
- Step 3:Definition of the adjoint, then .
- Step 4:The inner product is antilinear in the first argument, so the scalar comes out conjugated.
- Step 5:Both computations evaluate the same number ; a complex number equal to its conjugate is real.
∎
Eigenvectors of distinct eigenvalues are orthogonal
If , , and , then .
Proof (5 steps)
- Step 1:Apply the eigen-equation of in the second slot.
- Step 2:Move to the first slot using and apply the eigen-equation of ; antilinearity conjugates .
- Step 3:By the previous theorem every eigenvalue of a Hermitian operator is real.
- Step 4:Subtract the two expressions for the same number .
- Step 5:Divide by the non-zero scalar .
∎
Eigenvalues of a 2×2 matrix from trace and determinant
- Step 1:Rewrite the eigen-equation as a homogeneous linear system.
- Step 2:A square homogeneous system has a non-trivial solution exactly when its matrix is singular.
- Step 3:Write and use the determinant formula.
- Step 4:Expand and recognise and .
- Step 5:Quadratic formula.
- Step 6:For Hermitian , and , so : the discriminant is non-negative, consistent with real eigenvalues.
Worked example: spectrum of
- Step 1:.
- Step 2:Characteristic polynomial; both roots are real as the theorem guarantees.
- Step 3:First row: .
- Step 4:Choose to make real and positive; the squared norm is .
- Step 5:First row gives ; take , norm squared .
- Step 6:The eigenvectors are orthogonal, as the second theorem predicts.
- Step 7:Direct verification of the eigen-equation.
Result
Quick check
Which matrix is Hermitian?
Unitary operators: gates that preserve probability#
Quantum gates act on normalised states and must return normalised states, for every input, so that Born-rule probabilities keep summing to one. More strongly, they must preserve the overlap between any two states, since overlaps determine how distinguishable states are. The operators with this property are exactly the unitaries.
Definition
Unitary operator
A square matrix is unitary if . Equivalently (proved below) , so : undoing a gate means applying its conjugate transpose.
Unitaries preserve inner products and norms
If then for all , and in particular .
Proof (3 steps)
- Step 1:Defining identity of the adjoint, , with and .
- Step 2:Associativity of composition and the hypothesis .
- Step 3:Take ; both norms are non-negative, so .
∎
Eigenvalues of a unitary lie on the unit circle
If and with , then , i.e. for some real .
Proof (3 steps)
- Step 1:Substitute the eigen-equation; antilinearity in the first slot gives .
- Step 2:Norm preservation (previous theorem).
- Step 3:because ; take the non-negative square root.
∎
For square matrices, implies
Let be a matrix with . Then is invertible, and .
Proof (4 steps)
- Step 1:has trivial kernel, i.e. it is injective.
- Step 2:Rank–nullity theorem in finite dimension ; so is also surjective, hence invertible with some inverse .
- Step 3:Insert and use associativity and the hypothesis.
- Step 4:Substitute . This step fails in infinite dimension (the shift operator), which is why "finite dimension" matters.
∎
The columns (and rows) of a unitary are orthonormal
Let denote column of . Then , and likewise says the rows are orthonormal. Hence a unitary maps an orthonormal basis to an orthonormal basis.
Proof (4 steps)
- Step 1:Product rule and .
- Step 2:The sum is the inner product of column with column .
- Step 3:Compare entry by entry with the identity matrix.
- Step 4:Column is the image of basis vector .
∎
Why these facts matter in practice. Every consequence proved above is used implicitly each time a circuit is simulated or run on hardware.
- Reversibility. Because , every gate sequence can be undone by — the reversed circuit with each gate daggered. This "uncompute" trick appears in Grover's oracle, in the inversion test for quantum kernels, and in the proof of the no-cloning theorem.
- Conservation of probability. Norm preservation means stays equal to one after every gate, so recomputing after a long gate sequence is a cheap test for floating-point drift; the platform's statevector engine rejects any input state whose squared norm differs from by more than .
- Checking unitarity numerically. To test a matrix we form and measure its largest deviation from . By the column corollary this is the same as checking that every pair of columns has inner product . The matrix blocks in this lesson marked with a unitarity check are verified exactly this way by the lesson's automated test suite.
- Phases are invisible, magnitudes are not. An eigenvalue changes an eigenvector only by a phase; for a single eigenvector such a global phase has no observable effect, but relative phases between eigen-components (as produced by and ) are exactly what interference in algorithms exploits.
Hermitian operators as observables. For a Hermitian with orthonormal eigenvectors and eigenvalues , the next lesson proves . Measuring on a state yields with probability , and the average outcome is , which is real precisely because : . The Pauli observable, for example, returns on and on , and for its average is .
Quick check
Which number can be an eigenvalue of a unitary matrix?
The Pauli, Hadamard, S and T matrices#
We now verify both properties for the canonical single-qubit gates used throughout the platform (curriculum convention §1.2): A matrix that is both Hermitian and unitary satisfies — it is involutory, its own inverse — and by the two eigenvalue theorems above (Hermitian real, unitary modulus one) its eigenvalues are real numbers of modulus one, i.e. .
Pauli matrices are Hermitian, unitary and square to the identity
- Step 1:Conjugate transpose of each matrix; and are real symmetric and 's off-diagonal entries are conjugates of each other.
- Step 2:Row-times-column multiplication.
- Step 3:and .
- Step 4:Squares of diagonal entries.
- Step 5:Hermiticity plus gives unitarity.
- Step 6:Explicit product.
- Step 7:Explicit product.
- Step 8:Explicit product; .
- Step 9:Adjoint of a product reverses order; the Paulis are Hermitian, so distinct Paulis anticommute.
Result
Unitary verified: (max deviation 0.0e+0)
Unitary verified: (max deviation 0.0e+0)
Hadamard is Hermitian and unitary; and are unitary but not Hermitian
- Step 1:is real and symmetric.
- Step 2:Explicit product; hence .
- Step 3:is unitary, but its entry is not real, so is not Hermitian; its eigenvalues are and .
- Step 4:is unitary with eigenvalues on the unit circle, not Hermitian, and squares to .
Unitary verified: (max deviation 2.2e-16)
Unitary verified: (max deviation 2.2e-16)
Quick check
Using the Pauli algebra, simplify .
Check it numerically. The following NumPy cell confirms that the worked-example matrix is Hermitian with eigenvalues and , that its eigenvector matrix is unitary, and that is unitary but not Hermitian with unimodular eigenvalues.
import numpy as np
A = np.array([[2, 1 - 1j], [1 + 1j, 3]])
print(np.allclose(A, A.conj().T))
evals, V = np.linalg.eigh(A)
print(np.round(evals, 6))
print(np.allclose(V.conj().T @ V, np.eye(2)))
T = np.diag([1, np.exp(1j * np.pi / 4)])
print(np.allclose(T.conj().T @ T, np.eye(2)), np.allclose(T, T.conj().T))
print(np.round(np.abs(np.linalg.eigvals(T)), 6))Expected output
True [1. 4.] True True False [1. 1.]
References
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.1.3 (the Pauli matrices), §2.1.5 (eigenvectors and eigenvalues) and §2.1.6 (adjoints, Hermitian and unitary operators).
- S. Axler, Linear Algebra Done Right, 4th ed., Springer (2024), §7A (self-adjoint and normal operators) and §7D (isometries, unitary operators and matrix factorization).linear.axler.net
- R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed., Cambridge University Press (2013), §2.1 (unitary matrices) and §4.1 (Hermitian matrices).
Hands-on labs
Spectrum of a Hermitian matrix
2 steps · auto-gradedOpen labDiagonalise the Hermitian matrix : find its real eigenvalues from the characteristic polynomial, then the normalised eigenvector for the largest eigenvalue.