QuantumCore

Lesson 6 · 50 min · core

Hermitian & Unitary Operators

Loading progress…

Two classes of operators carry all of quantum mechanics: Hermitian operators A=A†A=A^\dagger (observables) and unitary operators U†U=IU^\dagger U=I (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, SS and TT matrices.

Prerequisites: Linear Operators & Matrix Representations

Objectives and key results
  • Test whether a matrix is Hermitian (A=A†A=A^\dagger) or unitary (U†U=IU^\dagger U=I) 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 UU†=IUU^\dagger=I whenever U†U=IU^\dagger U=I.

  • Compute the eigenvalues of any 2×22\times2 matrix from λ2−(TrA)λ+det⁡A=0\lambda^2-(\mathrm{Tr}A)\lambda+\det A=0.

definition · Hermitian operator
A=A†  ⟺  Aij=Aji‾A=A^\dagger\iff A_{ij}=\overline{A_{ji}}
theorem · Spectrum of a Hermitian operator
A=A†, A∣v⟩=λ∣v⟩ ⇒ λ∈R;λ≠μ ⇒ ⟨u∣v⟩=0A=A^\dagger,\ A\lvert v\rangle=\lambda\lvert v\rangle\ \Rightarrow\ \lambda\in\mathbb R;\quad \lambda\ne\mu\ \Rightarrow\ \langle u\vert v\rangle=0
theorem · Unitaries preserve inner products
U†U=I ⇒ ⟨Uu∣Uv⟩=⟨u∣v⟩, ∣λ∣=1U^\dagger U=I\ \Rightarrow\ \langle Uu\vert Uv\rangle=\langle u\vert v\rangle,\ \lvert\lambda\rvert=1
identity · Pauli algebra
X2=Y2=Z2=I,XY=iZ, YZ=iX, ZX=iYX^2=Y^2=Z^2=I,\quad XY=iZ,\ YZ=iX,\ ZX=iY
formula · 2×2 characteristic polynomial
λ2−(TrA) λ+det⁡A=0\lambda^2-(\mathrm{Tr}A)\,\lambda+\det A=0

Hermitian operators and their real spectra#

In the previous lesson we defined the adjoint A†A^\dagger by ⟨u∣Av⟩=⟨A†u∣v⟩\langle u\vert Av\rangle=\langle A^\dagger u\vert v\rangle 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

AA is Hermitian if A=A†A=A^\dagger, i.e. ⟨u∣Av⟩=⟨Au∣v⟩\langle u\vert Av\rangle=\langle Au\vert v\rangle for all u,vu,v. In matrix form Aij=Aji‾A_{ij}=\overline{A_{ji}}: the diagonal entries are real (Aii=Aii‾A_{ii}=\overline{A_{ii}}) and entries mirrored across the diagonal are complex conjugates. Example: A=(21−i1+i3)A=\begin{pmatrix}2&1-i\\1+i&3\end{pmatrix} is Hermitian because 1−i‾=1+i\overline{1-i}=1+i.

Theorem

Eigenvalues of a Hermitian operator are real

If A=A†A=A^\dagger and A∣v⟩=λ∣v⟩A\lvert v\rangle=\lambda\lvert v\rangle with ∣v⟩≠0\lvert v\rangle\ne0, then λ∈R\lambda\in\mathbb R.

Proof (5 steps)
  1. Step 1:
    ⟨v∣v⟩=1\langle v\vert v\rangle=1
    Rescale the eigenvector to unit norm; eigenvectors are non-zero so this is possible and does not change λ\lambda.
  2. Step 2:
    ⟨v∣Av⟩=⟨v∣λv⟩=λ⟨v∣v⟩=λ\langle v\vert Av\rangle=\langle v\vert\lambda v\rangle=\lambda\langle v\vert v\rangle=\lambda
    Use the eigen-equation in the second slot; the inner product is linear in the second argument.
  3. Step 3:
    ⟨v∣Av⟩=⟨A†v∣v⟩=⟨Av∣v⟩\langle v\vert Av\rangle=\langle A^\dagger v\vert v\rangle=\langle Av\vert v\rangle
    Definition of the adjoint, then A†=AA^\dagger=A.
  4. Step 4:
    ⟨Av∣v⟩=⟨λv∣v⟩=λˉ⟨v∣v⟩=λˉ\langle Av\vert v\rangle=\langle\lambda v\vert v\rangle=\bar\lambda\langle v\vert v\rangle=\bar\lambda
    The inner product is antilinear in the first argument, so the scalar comes out conjugated.
  5. Step 5:
    λ=λˉ ⟹ Im⁡λ=0\lambda=\bar\lambda\ \Longrightarrow\ \operatorname{Im}\lambda=0
    Both computations evaluate the same number ⟨v∣Av⟩\langle v\vert Av\rangle; a complex number equal to its conjugate is real.

∎

Theorem

Eigenvectors of distinct eigenvalues are orthogonal

If A=A†A=A^\dagger, A∣v⟩=λ∣v⟩A\lvert v\rangle=\lambda\lvert v\rangle, A∣u⟩=μ∣u⟩A\lvert u\rangle=\mu\lvert u\rangle and λ≠μ\lambda\ne\mu, then ⟨u∣v⟩=0\langle u\vert v\rangle=0.

Proof (5 steps)
  1. Step 1:
    ⟨u∣Av⟩=⟨u∣λv⟩=λ⟨u∣v⟩\langle u\vert Av\rangle=\langle u\vert\lambda v\rangle=\lambda\langle u\vert v\rangle
    Apply the eigen-equation of vv in the second slot.
  2. Step 2:
    ⟨u∣Av⟩=⟨Au∣v⟩=⟨μu∣v⟩=μˉ⟨u∣v⟩\langle u\vert Av\rangle=\langle Au\vert v\rangle=\langle\mu u\vert v\rangle=\bar\mu\langle u\vert v\rangle
    Move AA to the first slot using A†=AA^\dagger=A and apply the eigen-equation of uu; antilinearity conjugates μ\mu.
  3. Step 3:
    μˉ=μ\bar\mu=\mu
    By the previous theorem every eigenvalue of a Hermitian operator is real.
  4. Step 4:
    (λ−μ) ⟨u∣v⟩=0(\lambda-\mu)\,\langle u\vert v\rangle=0
    Subtract the two expressions for the same number ⟨u∣Av⟩\langle u\vert Av\rangle.
  5. Step 5:
    λ≠μ ⟹ ⟨u∣v⟩=0\lambda\ne\mu\ \Longrightarrow\ \langle u\vert v\rangle=0
    Divide by the non-zero scalar λ−μ\lambda-\mu.

∎

Derivation

Eigenvalues of a 2×2 matrix from trace and determinant

  1. Step 1:
    A∣v⟩=λ∣v⟩, v≠0  ⟺  (A−λI)v=0 has a non-zero solutionA\lvert v\rangle=\lambda\lvert v\rangle,\ v\ne0\iff (A-\lambda I)v=0\ \text{has a non-zero solution}
    Rewrite the eigen-equation as a homogeneous linear system.
  2. Step 2:
      ⟺  det⁡(A−λI)=0\iff\det(A-\lambda I)=0
    A square homogeneous system has a non-trivial solution exactly when its matrix is singular.
  3. Step 3:
    det⁡(a−λbcd−λ)=(a−λ)(d−λ)−bc\det\begin{pmatrix}a-\lambda&b\\c&d-\lambda\end{pmatrix}=(a-\lambda)(d-\lambda)-bc
    Write A=(abcd)A=\begin{pmatrix}a&b\\c&d\end{pmatrix} and use the 2×22\times2 determinant formula.
  4. Step 4:
    =λ2−(a+d)λ+(ad−bc)=λ2−(TrA)λ+det⁡A=\lambda^2-(a+d)\lambda+(ad-bc)=\lambda^2-(\mathrm{Tr}A)\lambda+\det A
    Expand and recognise a+d=TrAa+d=\mathrm{Tr}A and ad−bc=det⁡Aad-bc=\det A.
  5. Step 5:
    λ±=TrA±(TrA)2−4det⁡A2\lambda_\pm=\frac{\mathrm{Tr}A\pm\sqrt{(\mathrm{Tr}A)^2-4\det A}}{2}
    Quadratic formula.
  6. Step 6:
    A=A†: (TrA)2−4det⁡A=(a−d)2+4∣b∣2≥0A=A^\dagger:\ (\mathrm{Tr}A)^2-4\det A=(a-d)^2+4\lvert b\rvert^2\ge0
    For Hermitian AA, a,d∈Ra,d\in\mathbb R and c=bˉc=\bar b, so (a+d)2−4(ad−∣b∣2)=(a−d)2+4∣b∣2(a+d)^2-4(ad-\lvert b\rvert^2)=(a-d)^2+4\lvert b\rvert^2: the discriminant is non-negative, consistent with real eigenvalues.
Derivation

Worked example: spectrum of (21−i1+i3)\begin{pmatrix}2&1-i\\1+i&3\end{pmatrix}

  1. Step 1:
    TrA=2+3=5,det⁡A=2⋅3−(1−i)(1+i)=6−2=4\mathrm{Tr}A=2+3=5,\qquad \det A=2\cdot3-(1-i)(1+i)=6-2=4
    (1−i)(1+i)=1−i2=2(1-i)(1+i)=1-i^2=2.
  2. Step 2:
    λ2−5λ+4=(λ−1)(λ−4)=0 ⇒ λ∈{1,4}\lambda^2-5\lambda+4=(\lambda-1)(\lambda-4)=0\ \Rightarrow\ \lambda\in\{1,4\}
    Characteristic polynomial; both roots are real as the theorem guarantees.
  3. Step 3:
    (A−4I)v=(−21−i1+i−1)(v1v2)=0 ⇒ v1=1−i2v2(A-4I)v=\begin{pmatrix}-2&1-i\\1+i&-1\end{pmatrix}\begin{pmatrix}v_1\\v_2\end{pmatrix}=0\ \Rightarrow\ v_1=\tfrac{1-i}{2}v_2
    First row: −2v1+(1−i)v2=0-2v_1+(1-i)v_2=0.
  4. Step 4:
    v2=1+i ⇒ v1=(1−i)(1+i)2=1,v(4)=13(11+i)v_2=1+i\ \Rightarrow\ v_1=\tfrac{(1-i)(1+i)}{2}=1,\qquad v^{(4)}=\tfrac1{\sqrt3}\begin{pmatrix}1\\1+i\end{pmatrix}
    Choose v2v_2 to make v1v_1 real and positive; the squared norm is 1+∣1+i∣2=31+\lvert1+i\rvert^2=3.
  5. Step 5:
    (A−I)v=(11−i1+i2)v=0 ⇒ v(1)=13(1−i−1)(A-I)v=\begin{pmatrix}1&1-i\\1+i&2\end{pmatrix}v=0\ \Rightarrow\ v^{(1)}=\tfrac1{\sqrt3}\begin{pmatrix}1-i\\-1\end{pmatrix}
    First row gives v1=−(1−i)v2v_1=-(1-i)v_2; take v2=−1v_2=-1, norm squared ∣1−i∣2+1=3\lvert1-i\rvert^2+1=3.
  6. Step 6:
    ⟨v(4)∣v(1)⟩=13(1ˉ (1−i)+(1+i)‾ (−1))=13((1−i)−(1−i))=0\langle v^{(4)}\vert v^{(1)}\rangle=\tfrac13\big(\bar1\,(1-i)+\overline{(1+i)}\,(-1)\big)=\tfrac13\big((1-i)-(1-i)\big)=0
    The eigenvectors are orthogonal, as the second theorem predicts.
  7. Step 7:
    Av(4)=13(2+(1−i)(1+i)(1+i)+3(1+i))=13(44+4i)=4v(4)Av^{(4)}=\tfrac1{\sqrt3}\begin{pmatrix}2+(1-i)(1+i)\\(1+i)+3(1+i)\end{pmatrix}=\tfrac1{\sqrt3}\begin{pmatrix}4\\4+4i\end{pmatrix}=4v^{(4)}
    Direct verification of the eigen-equation.

Result

λ1=1: 13(1−i, −1)T,λ2=4: 13(1, 1+i)T(orthonormal)\boxed{\lambda_1=1:\ \tfrac1{\sqrt3}(1-i,\,-1)^T,\qquad \lambda_2=4:\ \tfrac1{\sqrt3}(1,\,1+i)^T\quad\text{(orthonormal)}}

Quick check

Which matrix is Hermitian?

Select one answer

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 ⟨u∣v⟩\langle u\vert v\rangle 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 UU is unitary if U†U=IU^\dagger U=I. Equivalently (proved below) UU†=IUU^\dagger=I, so U−1=U†U^{-1}=U^\dagger: undoing a gate means applying its conjugate transpose.

Theorem

Unitaries preserve inner products and norms

If U†U=IU^\dagger U=I then ⟨Uu∣Uv⟩=⟨u∣v⟩\langle Uu\vert Uv\rangle=\langle u\vert v\rangle for all u,vu,v, and in particular ∥Uv∥=∥v∥\lVert Uv\rVert=\lVert v\rVert.

Proof (3 steps)
  1. Step 1:
    ⟨Uu∣Uv⟩=⟨U†(Uu)∣v⟩\langle Uu\vert Uv\rangle=\langle U^\dagger(Uu)\vert v\rangle
    Defining identity of the adjoint, ⟨a∣Ub⟩=⟨U†a∣b⟩\langle a\vert Ub\rangle=\langle U^\dagger a\vert b\rangle, with a=Uua=Uu and b=vb=v.
  2. Step 2:
    =⟨(U†U)u∣v⟩=⟨Iu∣v⟩=⟨u∣v⟩=\langle (U^\dagger U)u\vert v\rangle=\langle Iu\vert v\rangle=\langle u\vert v\rangle
    Associativity of composition and the hypothesis U†U=IU^\dagger U=I.
  3. Step 3:
    ∥Uv∥2=⟨Uv∣Uv⟩=⟨v∣v⟩=∥v∥2\lVert Uv\rVert^2=\langle Uv\vert Uv\rangle=\langle v\vert v\rangle=\lVert v\rVert^2
    Take u=vu=v; both norms are non-negative, so ∥Uv∥=∥v∥\lVert Uv\rVert=\lVert v\rVert.

∎

Corollary

Eigenvalues of a unitary lie on the unit circle

If U†U=IU^\dagger U=I and U∣v⟩=λ∣v⟩U\lvert v\rangle=\lambda\lvert v\rangle with v≠0v\ne0, then ∣λ∣=1\lvert\lambda\rvert=1, i.e. λ=eiφ\lambda=e^{i\varphi} for some real φ\varphi.

Proof (3 steps)
  1. Step 1:
    ⟨Uv∣Uv⟩=⟨λv∣λv⟩=λˉλ⟨v∣v⟩=∣λ∣2⟨v∣v⟩\langle Uv\vert Uv\rangle=\langle\lambda v\vert\lambda v\rangle=\bar\lambda\lambda\langle v\vert v\rangle=\lvert\lambda\rvert^2\langle v\vert v\rangle
    Substitute the eigen-equation; antilinearity in the first slot gives λˉ\bar\lambda.
  2. Step 2:
    ⟨Uv∣Uv⟩=⟨v∣v⟩\langle Uv\vert Uv\rangle=\langle v\vert v\rangle
    Norm preservation (previous theorem).
  3. Step 3:
    (∣λ∣2−1)⟨v∣v⟩=0 ⇒ ∣λ∣=1(\lvert\lambda\rvert^2-1)\langle v\vert v\rangle=0\ \Rightarrow\ \lvert\lambda\rvert=1
    ⟨v∣v⟩>0\langle v\vert v\rangle>0 because v≠0v\ne0; take the non-negative square root.

∎

Proposition

For square matrices, U†U=IU^\dagger U=I implies UU†=IUU^\dagger=I

Let UU be a d×dd\times d matrix with U†U=IU^\dagger U=I. Then UU is invertible, U−1=U†U^{-1}=U^\dagger and UU†=IUU^\dagger=I.

Proof (4 steps)
  1. Step 1:
    Uv=0 ⇒ v=Iv=U†Uv=U†0=0Uv=0\ \Rightarrow\ v=Iv=U^\dagger Uv=U^\dagger0=0
    UU has trivial kernel, i.e. it is injective.
  2. Step 2:
    dim⁡ran⁡U=d−dim⁡ker⁡U=d\dim\operatorname{ran}U=d-\dim\ker U=d
    Rank–nullity theorem in finite dimension dd; so UU is also surjective, hence invertible with some inverse U−1U^{-1}.
  3. Step 3:
    U†=U†(UU−1)=(U†U)U−1=U−1U^\dagger=U^\dagger(UU^{-1})=(U^\dagger U)U^{-1}=U^{-1}
    Insert I=UU−1I=UU^{-1} and use associativity and the hypothesis.
  4. Step 4:
    UU†=UU−1=IUU^\dagger=UU^{-1}=I
    Substitute U†=U−1U^\dagger=U^{-1}. This step fails in infinite dimension (the shift operator), which is why "finite dimension" matters.

∎

Corollary

The columns (and rows) of a unitary are orthonormal

Let uju_j denote column jj of UU. Then U†U=I  ⟺  ⟨ui∣uj⟩=δijU^\dagger U=I\iff\langle u_i\vert u_j\rangle=\delta_{ij}, and likewise UU†=IUU^\dagger=I says the rows are orthonormal. Hence a unitary maps an orthonormal basis to an orthonormal basis.

Proof (4 steps)
  1. Step 1:
    (U†U)ij=∑k(U†)ikUkj=∑kUki‾ Ukj(U^\dagger U)_{ij}=\sum_k(U^\dagger)_{ik}U_{kj}=\sum_k\overline{U_{ki}}\,U_{kj}
    Product rule and (U†)ik=Uki‾(U^\dagger)_{ik}=\overline{U_{ki}}.
  2. Step 2:
    =⟨ui∣uj⟩=\langle u_i\vert u_j\rangle
    The sum is the inner product of column ii with column jj.
  3. Step 3:
    U†U=I  ⟺  ⟨ui∣uj⟩=δijU^\dagger U=I\iff\langle u_i\vert u_j\rangle=\delta_{ij}
    Compare entry by entry with the identity matrix.
  4. Step 4:
    U∣j⟩=uj ⇒ {U∣j⟩} orthonormalU\lvert j\rangle=u_j\ \Rightarrow\ \{U\lvert j\rangle\}\ \text{orthonormal}
    Column jj is the image of basis vector ∣j⟩\lvert j\rangle.

∎

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 U−1=U†U^{-1}=U^\dagger, every gate sequence Uk⋯U2U1U_k\cdots U_2U_1 can be undone by U1†U2†⋯Uk†U_1^\dagger U_2^\dagger\cdots U_k^\dagger — 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 ∑k∣ψk∣2\sum_k\lvert\psi_k\rvert^2 stays equal to one after every gate, so recomputing ∑k∣ψk∣2\sum_k\lvert\psi_k\rvert^2 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 11 by more than 10−1010^{-10}.
  • Checking unitarity numerically. To test a matrix UU we form U†UU^\dagger U and measure its largest deviation from II. By the column corollary this is the same as checking that every pair of columns has inner product δij\delta_{ij}. 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 eiφe^{i\varphi} 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 SS and TT) are exactly what interference in algorithms exploits.

Hermitian operators as observables. For a Hermitian AA with orthonormal eigenvectors ∣ak⟩\lvert a_k\rangle and eigenvalues aka_k, the next lesson proves A=∑kak∣ak⟩⟨ak∣A=\sum_k a_k\lvert a_k\rangle\langle a_k\rvert. Measuring AA on a state ∣ψ⟩\lvert\psi\rangle yields aka_k with probability ∣⟨ak∣ψ⟩∣2\lvert\langle a_k\vert\psi\rangle\rvert^2, and the average outcome is ⟨ψ∣A∣ψ⟩\langle\psi\vert A\vert\psi\rangle, which is real precisely because A=A†A=A^\dagger: ⟨ψ∣Aψ⟩‾=⟨Aψ∣ψ⟩=⟨ψ∣Aψ⟩\overline{\langle\psi\vert A\psi\rangle}=\langle A\psi\vert\psi\rangle=\langle\psi\vert A\psi\rangle. The Pauli ZZ observable, for example, returns +1+1 on ∣0⟩\lvert0\rangle and −1-1 on ∣1⟩\lvert1\rangle, and for ∣+⟩\lvert+\rangle its average is ⟨+∣Z∣+⟩=12(1−1)=0\langle+\vert Z\vert+\rangle=\tfrac12(1-1)=0.

Quick check

Which number can be an eigenvalue of a unitary matrix?

Select one answer

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): X=(0110),  Y=(0−ii0),  Z=(100−1),  H=12(111−1),  S=(100i),  T=(100eiπ/4).X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\;Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix},\;Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\;H=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\;S=\begin{pmatrix}1&0\\0&i\end{pmatrix},\;T=\begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix}. A matrix that is both Hermitian and unitary satisfies A2=AA=A†A=IA^2=AA=A^\dagger A=I — it is involutory, its own inverse — and by the two eigenvalue theorems above (Hermitian ⇒\Rightarrow real, unitary ⇒\Rightarrow modulus one) its eigenvalues are real numbers of modulus one, i.e. ±1\pm1.

Derivation

Pauli matrices are Hermitian, unitary and square to the identity

  1. Step 1:
    X†=X‾T=X,Y†=(0i‾−i‾0)=(0−ii0)=Y,Z†=ZX^\dagger=\overline{X}^T=X,\quad Y^\dagger=\begin{pmatrix}0&\overline{i}\\\overline{-i}&0\end{pmatrix}=\begin{pmatrix}0&-i\\i&0\end{pmatrix}=Y,\quad Z^\dagger=Z
    Conjugate transpose of each matrix; XX and ZZ are real symmetric and YY's off-diagonal entries are conjugates of each other.
  2. Step 2:
    X2=(0⋅0+1⋅10⋅1+1⋅01⋅0+0⋅11⋅1+0⋅0)=IX^2=\begin{pmatrix}0\cdot0+1\cdot1&0\cdot1+1\cdot0\\1\cdot0+0\cdot1&1\cdot1+0\cdot0\end{pmatrix}=I
    Row-times-column multiplication.
  3. Step 3:
    Y2=(0⋅0+(−i)i0⋅(−i)+(−i)⋅0i⋅0+0⋅ii(−i)+0⋅0)=(1001)Y^2=\begin{pmatrix}0\cdot0+(-i)i&0\cdot(-i)+(-i)\cdot0\\i\cdot0+0\cdot i&i(-i)+0\cdot0\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}
    (−i)(i)=−i2=1(-i)(i)=-i^2=1 and i(−i)=1i(-i)=1.
  4. Step 4:
    Z2=diag(12,(−1)2)=IZ^2=\mathrm{diag}(1^2,(-1)^2)=I
    Squares of diagonal entries.
  5. Step 5:
    σ†σ=σσ=I(σ∈{X,Y,Z})\sigma^\dagger\sigma=\sigma\sigma=I\quad(\sigma\in\{X,Y,Z\})
    Hermiticity plus σ2=I\sigma^2=I gives unitarity.
  6. Step 6:
    XY=(0110)(0−ii0)=(i00−i)=iZXY=\begin{pmatrix}0&1\\1&0\end{pmatrix}\begin{pmatrix}0&-i\\i&0\end{pmatrix}=\begin{pmatrix}i&0\\0&-i\end{pmatrix}=iZ
    Explicit product.
  7. Step 7:
    YZ=(0−ii0)(100−1)=(0ii0)=iXYZ=\begin{pmatrix}0&-i\\i&0\end{pmatrix}\begin{pmatrix}1&0\\0&-1\end{pmatrix}=\begin{pmatrix}0&i\\i&0\end{pmatrix}=iX
    Explicit product.
  8. Step 8:
    ZX=(100−1)(0110)=(01−10)=iYZX=\begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}0&1\\1&0\end{pmatrix}=\begin{pmatrix}0&1\\-1&0\end{pmatrix}=iY
    Explicit product; iY=(0−i2i20)=(01−10)iY=\begin{pmatrix}0&-i^2\\i^2&0\end{pmatrix}=\begin{pmatrix}0&1\\-1&0\end{pmatrix}.
  9. Step 9:
    YX=(XY)†=(iZ)†=−iZ=−XYYX=(XY)^\dagger=(iZ)^\dagger=-iZ=-XY
    Adjoint of a product reverses order; the Paulis are Hermitian, so distinct Paulis anticommute.

Result

σaσb=δabI+i∑cεabcσca,b,c∈{X,Y,Z}\boxed{\sigma_a\sigma_b=\delta_{ab}I+i\sum_c\varepsilon_{abc}\sigma_c\qquad a,b,c\in\{X,Y,Z\}}
Y=(0−ii0)=Y†=Y−1Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}=Y^\dagger=Y^{-1}
Pauli-Y2×2

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

Z=(100−1)Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}
Pauli-Z2×2

Unitary verified: U†U=IU^\dagger U = I (max deviation 0.0e+0)

Derivation

Hadamard is Hermitian and unitary; SS and TT are unitary but not Hermitian

  1. Step 1:
    H†=12(111−1)T=HH^\dagger=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}^T=H
    HH is real and symmetric.
  2. Step 2:
    H2=12(1+11−11−11+1)=IH^2=\tfrac12\begin{pmatrix}1+1&1-1\\1-1&1+1\end{pmatrix}=I
    Explicit product; hence H†H=H2=IH^\dagger H=H^2=I.
  3. Step 3:
    S†S=(100−i)(100i)=(100−i2)=I,S†≠SS^\dagger S=\begin{pmatrix}1&0\\0&-i\end{pmatrix}\begin{pmatrix}1&0\\0&i\end{pmatrix}=\begin{pmatrix}1&0\\0&-i^2\end{pmatrix}=I,\qquad S^\dagger\ne S
    SS is unitary, but its (1,1)(1,1) entry ii is not real, so SS is not Hermitian; its eigenvalues are 11 and ii.
  4. Step 4:
    T†T=diag(1, e−iπ/4eiπ/4)=I,T2=diag(1,eiπ/2)=ST^\dagger T=\mathrm{diag}\big(1,\,e^{-i\pi/4}e^{i\pi/4}\big)=I,\qquad T^2=\mathrm{diag}(1,e^{i\pi/2})=S
    TT is unitary with eigenvalues 1,eiπ/41,e^{i\pi/4} on the unit circle, not Hermitian, and squares to SS.
T=(100eiπ/4),eiπ/4=1+i2T=\begin{pmatrix}1&0\\0&e^{i\pi/4}\end{pmatrix},\qquad e^{i\pi/4}=\tfrac{1+i}{\sqrt2}
T gate2×2

Unitary verified: U†U=IU^\dagger U = I (max deviation 2.2e-16)

V=13(1−i1−11+i),V†AV=diag(1,4)V=\frac1{\sqrt3}\begin{pmatrix}1-i&1\\-1&1+i\end{pmatrix},\qquad V^\dagger AV=\mathrm{diag}(1,4)
Unitary with the orthonormal eigenvectors of the worked example as columns2×2

Unitary verified: U†U=IU^\dagger U = I (max deviation 2.2e-16)

Quick check

Using the Pauli algebra, simplify XYZXYZ.

Select one answer

Check it numerically. The following NumPy cell confirms that the worked-example matrix is Hermitian with eigenvalues 11 and 44, that its eigenvector matrix is unitary, and that TT is unitary but not Hermitian with unimodular eigenvalues.

Pythonrunnable
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

  1. 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).
  2. 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
  3. 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-graded

    Diagonalise the Hermitian matrix A=(21−i1+i3)A=\begin{pmatrix}2 & 1-i\\ 1+i & 3\end{pmatrix}: find its real eigenvalues from the characteristic polynomial, then the normalised eigenvector for the largest eigenvalue.

    Open lab