← Atlas

Operators · Spin Hamiltonians

Classical Ising Hamiltonian operator

The classical (longitudinal-field) Ising Hamiltonian expressed as a diagonal SparsePauliOp: a foundational Z-only spin model with no quantum superposition dynamics of its own.

Exact & formalUpdated

View frozen graph

Z₀Z₁Z₂Z₃Step 1 of 4 · ZZ · on Z₀, Z₁ZZStep 2 of 4 · ZZ · on Z₁, Z₂ZZStep 3 of 4 · ZZ · on Z₂, Z₃ZZStep 4 of 4 · Z field · on Z₀, Z₁, Z₂, Z₃Z field

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

Expected outcomes

  • Ground energy (all-aligned, J>0,h=0)100%
  • Steps4
  • Wires4
  • Sites4 (chain)
  • Terms3 ZZ + 4 Z
  • Spectrum16 classical energies (diagonal)
  • Papers1
Native
ising_hamiltonian_operator.py
import numpy as np
from qiskit.quantum_info import SparsePauliOp

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

H = ising_hamiltonian(4, J=1.0, h=0.5)
diag = np.real(H.to_matrix()).diagonal()
print("Diagonal (classical energies):", diag)
print("Ground energy:", diag.min())

RESULT = {"ground_energy": float(diag.min()), "classical_energies": [float(v) for v in diag]}

References

  • Quantum Phase Transitions

    S. Sachdev · 2011

    Standard textbook treatment of the Ising Hamiltonian as the classical limit contrasted with its transverse-field quantum extension.

Exact & formal
  • Direct mathematics
  • Verified by construction
  • Textbook / standard citation
Method
Because every term is a product of Z operators, the SparsePauliOp is diagonal in the computational basis by construction; its eigenvalues were computed directly as -J*sum(s_i s_{i+1}) - h*sum(s_i) over all 2^n classical spin configurations s_i in {+1,-1} for a 4-site chain and compared to the matrix's diagonal.
Result
Pass · all 16 diagonal entries match the classical Ising energy formula exactly, confirming the operator has no off-diagonal (quantum superposition-inducing) terms.
Quantum Phase Transitions ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
ising modelspin hamiltoniandiagonal operatorclassical limit

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