The Transverse-Field Ising Model (TFIM) is one of the simplest many-body Hamiltonians that
exhibits a quantum phase transition. It is a canonical test case for Hamiltonian simulation
because its two terms — a nearest-neighbour ZZ interaction and a single-qubit X field —
do not commute, so Trotterisation introduces a non-trivial approximation error that can be
measured and reduced.
The Hamiltonian
For n qubits with open boundary conditions (couplings only between neighbours i and i+1),
the TFIM Hamiltonian is
H=−Ji=0∑n−2ZiZi+1−hi=0∑n−1Xi,
where J is the Ising coupling strength and h is the transverse-field amplitude. For n=2
there is exactly one ZZ coupling (between qubits 0 and 1) and two single-qubit X terms:
H=−JZ0Z1−h(X0+X1).
When J≫h the ground state is a ferromagnetic phase with spins aligned along Z;
when h≫J the ground state is a paramagnetic phase with spins aligned along X.
The quantum phase transition occurs at the critical point J=h.
Trotter decomposition
Because [ZZ,X⊗I]=0, we cannot exponentiate H exactly in closed form with simple
two-local gates. Instead we split the Hamiltonian as H=HZZ+HX and apply
the first-order Trotter formula over a step dt:
e−iHdt≈e−iHZZdte−iHXdt+O(dt2).
Each factor is itself a product of commuting terms, so it factorises exactly.
The ZZ factor
HZZ=−JZ0Z1. The Trotter factor is
e−i(−J)dtZ0Z1=e+iJdtZ0Z1.
Writing this as e−iθZZ with θ=−Jdt, and recalling the standard decomposition
from the previous lesson,
e−iθZZ=CNOT0→1(I⊗Rz(2θ))CNOT0→1,
the three-gate circuit is cx(0,1), rz(2*theta, 1), cx(0,1) with θ=−Jdt.
The X factor
HX=−h(X0+X1). The two terms commute (X0 and X1 act on different qubits), so
e−i(−h)dt(X0+X1)=e+ihdtX0e+ihdtX1.
Each factor is e−iθXq with θ=−hdt, which equals Rx(2θ)=Rx(−2hdt)
on qubit q.
Circuit for J=h=1, dt=π/8
With J=h=1 and dt=π/8, the angles simplify to
θZZ=−Jdt=−π/8 and θX=−hdt=−π/8. The corresponding gate angles are
2θZZ=−4π,2θX=−4π.
The complete first-order Trotter step is thus the five-gate sequence
Implement one first-order Trotter step for the 2-qubit TFIM with J=h=1 and dt=π/8.
The grader checks the full unitary matrix, so an empty circuit will not pass. Use the hints
if you need a reminder of the gate patterns.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.