The setting
Two qubits with individual transition frequencies coupled by an isotropic XY exchange interaction are governed by a four-level Hamiltonian on . Rewriting the interaction term in single-qubit raising and lowering operators exposes the excitation-preserving exchange between the two qubits, and passing to the computational basis gives the explicit matrix of the full Hamiltonian.
The two-qubit XY Hamiltonian
The Pauli matrices are the complex matrices given by (1): (1) where is the imaginary unit. The raising operator and the lowering operator are the complex matrices defined from (1) by (2): (2)
A two-qubit operator is a complex matrix indexed by pairs in , corresponding to the computational basis of .✦ For complex matrices and , their tensor product is the two-qubit operator given by the Kronecker product, and denotes the identity matrix.
For real frequencies , the free Hamiltonian is the two-qubit operator in (3): (3)✦ Given a real coupling strength , the XY interaction Hamiltonian is the two-qubit operator in (4): (4)✦ Adding (3) and (4) yields the two-qubit XY Hamiltonian , defined by (5): (5)✦
The claim
Theorem. Let . Subtracting the free Hamiltonian from the two-qubit XY Hamiltonian expresses the interaction in terms of the raising and lowering operators as in (6): (6)✦ In the lexicographically ordered computational basis , the matrix representation of is given by (7): (7)✦
What is checked
In the Lean library, the theorem is stated for arbitrary real parameters , over the complex Pauli matrices , the raising and lowering operators , and the complex two-qubit operators , , and indexed by pairs in , with the matrix in (7) obtained by lexicographical reindexing into the computational basis .