The time-evolution operator for a Hamiltonian H is the unitary U(t)=e−iHt.
When H is a single Pauli operator or a tensor product of Paulis (a Pauli string),
the exponential has a closed form that maps directly to standard rotation gates.
Single-qubit Pauli rotations
For each single-qubit Pauli P∈{X,Y,Z} we use the fact that P2=I and
expand the matrix exponential as a Taylor series:
e−iθP=cosθ⋅I−isinθ⋅P.
Comparing with the standard rotation gate definitions
Rx(λ)=e−iλX/2,Ry(λ)=e−iλY/2,Rz(λ)=e−iλZ/2,
we see that
e−iθX=Rx(2θ),e−iθY=Ry(2θ),e−iθZ=Rz(2θ).
The angle passed to the rotation gate is twice the physical evolution parameter θ.
Two-qubit Pauli strings
For a two-qubit Pauli string such as Z⊗Z (often written ZZ), the eigenvalues
of the operator determine the phase each basis state acquires:
Because the ZZ eigenvalue of ∣xy⟩ is (−1)x⊕y, we can reduce the two-qubit
problem to a single-qubit one: apply a CNOT from qubit 0 to qubit 1, which maps
∣xy⟩→∣x,x⊕y⟩. Now qubit 1 alone carries the parity x⊕y,
so an Rz on qubit 1 applies the correct phase:
e−iθZ⊗Z=CNOT0→1⋅(I⊗Rz(2θ))⋅CNOT0→1.
The circuit has just three gates:
cx(0, 1) — parity-encode qubit 0 into qubit 1
rz(2 * theta, 1) — rotate by the interaction angle
cx(0, 1) — undo the encoding
This pattern generalises: for a k-qubit Pauli string, use a ladder of CNOTs to collect the
parity onto one qubit, apply Rz, then reverse the ladder.
Try it
Implement e−i(π/4)ZZ on two qubits. The grader checks the full unitary matrix,
so an empty circuit will not pass.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.