← Atlas

Operators · Spin Hamiltonians

Heisenberg XXZ spin-chain operator

The anisotropic Heisenberg (XXZ) spin-chain Hamiltonian: exchange-coupled spins with tunable easy-axis/easy-plane anisotropy Δ, U(1)-symmetric under total-Sz rotation.

Exact & formalUpdated

View frozen graph

S₀S₁S₂S₃Step 1 of 4 · XX · on S₀, S₁XXStep 2 of 4 · YY · on S₀, S₁YYStep 3 of 4 · ΔZZ · on S₀, S₁ΔZZStep 4 of 4 · … · on S₁, S₂…

4 steps across 4 wires. Hover a step, or press play to go through them in order.

Expected outcomes

  • Sz sectors block-diagonal100%
  • Steps4
  • Wires4
  • Sites4 (chain)
  • Terms3 XX + 3 YY + 3 ZZ
  • SymmetryU(1) total-Sz conservation
  • Papers1
Native
heisenberg_xxz_operator.py
import numpy as np
from qiskit.quantum_info import SparsePauliOp

def xxz_hamiltonian(n: int, J: float, delta: float) -> SparsePauliOp:
    terms, coeffs = [], []
    for i in range(n - 1):
        for pauli, coeff in (("X", J), ("Y", J), ("Z", J * delta)):
            s = ["I"] * n
            s[i], s[i + 1] = pauli, pauli
            terms.append("".join(reversed(s)))
            coeffs.append(coeff)
    return SparsePauliOp(terms, coeffs)

n = 4
H = xxz_hamiltonian(n, J=1.0, delta=1.0)  # isotropic Heisenberg point
Sz_tot = SparsePauliOp(["".join(reversed(["Z" if k == i else "I" for k in range(n)])) for i in range(n)],
                        [0.5] * n)
commutator = H.to_matrix() @ Sz_tot.to_matrix() - Sz_tot.to_matrix() @ H.to_matrix()
print("max |[H, Sz_tot]| =", np.abs(commutator).max())  # ~0, confirming U(1) symmetry

RESULT = {"max_commutator_norm": float(np.abs(commutator).max()), "conserves_total_sz": bool(np.abs(commutator).max() < 1e-9)}

References

Exact & formal
  • Direct mathematics
  • Verified by construction
  • Textbook / standard citation
Method
Total Sz = (1/2)Σ Zᵢ was checked to commute exactly with the assembled 4-site SparsePauliOp matrix ([H, Sz] = 0, the U(1) symmetry expected from XX+YY+ΔZZ terms), and the isotropic point Δ=1 was checked to reduce to the SU(2)-symmetric Heisenberg operator by comparing coefficients termwise.
Result
Pass · [H, Sz] is the zero matrix to numerical precision for a 4-site chain, and the Δ=1 coefficients match the isotropic XXX Heisenberg form exactly.
An introduction to integrable techniques for one-dimensional quantum systems ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
heisenberg modelxxz chainspin hamiltonianbethe ansatzu(1) symmetry

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.