Every quantum system has a Hamiltonian — a Hermitian operator H whose eigenvalues are the
system's energy levels. To simulate H on a quantum computer we need to express it as a
sum of Pauli terms, because each individual Pauli exponential e−iθP translates
directly into a short circuit (the subject of the next lesson).
The Pauli basis
The four single-qubit Pauli matrices
I=(1001),X=(0110),Y=(0i−i0),Z=(100−1)
form an orthogonal basis for the space of all 2×2 Hermitian matrices. Any single-qubit
Hamiltonian can be written uniquely as
H=cII+cXX+cYY+cZZ,cP∈R.
For n qubits the basis extends to all 4n tensor products
P1⊗P2⊗⋯⊗Pn with Pj∈{I,X,Y,Z}, often written as
strings such as ZXI or ZZ. A general n-qubit Hamiltonian is then
H=P∈{I,X,Y,Z}n∑cPP.
Extracting Pauli coefficients
The Pauli matrices are orthonormal under the Hilbert–Schmidt inner product
⟨A,B⟩=21tr(A†B).
Concretely, 21tr(Pj†Pk)=δjk for any two Pauli
strings Pj, Pk. This orthonormality lets you read off each coefficient by a trace:
cP=2n1tr(PH).
A worked example: single-qubit Hamiltonian
Consider the 1-qubit Hamiltonian H=3Z+X. In matrix form:
H=3(100−1)+(0110)=(311−3).
Let us verify the coefficient of Z using the trace formula:
cY=21tr(YH). Since Y=(0i−i0), we get YH=(−i3i3ii), so tr(YH)=−i+i=0.
The decomposition H=0⋅I+1⋅X+0⋅Y+3⋅Z=X+3Z matches what we
started with.
Multi-qubit Hamiltonians
For two qubits the 16 Pauli strings {II,IX,IY,IZ,XI,XX,…,ZZ} span the space of
4×4 Hermitian matrices. A paradigmatic example is the transverse-field Ising model
on two sites:
HIsing=−J(Z⊗Z)−h(X⊗I+I⊗X),
where J is the coupling strength and h is the transverse field. This Hamiltonian has only
three non-zero Pauli terms, which is typical: physically motivated Hamiltonians are
sparse in the Pauli basis — they have far fewer than 4n terms — and that sparsity is
what makes Trotterisation efficient.
Why the Pauli representation matters for simulation
Each Pauli string P satisfies P2=I, so its eigenvalues are ±1. The exponential of
a single Pauli term is therefore a rotation:
e−iθP=cos(θ)I−isin(θ)P.
This closed-form expression means that any individual Pauli exponential can be realised as a
small, exact quantum circuit. When the Hamiltonian is a sum H=∑kckPk, the
Trotter–Suzuki formula decomposes e−iHt into a product of these simple rotations,
each of which maps directly to a circuit. The Pauli decomposition is therefore not just a
mathematical convenience — it is the bridge between the physical description of a system
and its gate-level implementation.
Try it
The 1-qubit Hamiltonian H=3Z+X has the matrix (311−3).
Use the trace formula cZ=21tr(ZH) to compute the coefficient of
Z and return it.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.