Sign in
← Atlas
Exact & formalOperatorsSpin 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.

ising modelspin hamiltoniandiagonal operatorclassical limit

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

The Ising model was originally posed as a 1D classical statistical-mechanics problem to explain ferromagnetism, and its operator form — diagonal in the computational (Z) basis — is the natural starting point before adding a transverse field turns it into a genuinely quantum model.

Circuit & simulation
Ground energy (all-aligned, J>0,h=0)100%
What this takes and returns
TakesNothingWhat joins here

No input port, deliberately. You measure a state with this entry; you do not apply it and pass a register on.

Nothing in the Atlas meets this end.

ReturnsNothingWhat joins here

No output port, deliberately. An observable is measured with, never applied, so there is no register to hand on.

Nothing in the Atlas meets this end.

Not a stage. You measure a state with this; you do not apply it and pass a register on. It has a width and deliberately no ports. See all 60 →

Where the map uses this

This record is an instance of an object the map names, so these are the processes that consume or produce one. None of them is about this record in particular.

Hamiltonian you can query 4 of 33 processes

How it works

The classical Ising Hamiltonian on a chain of nn sites with nearest-neighbor coupling JJ and longitudinal field hh is

H=Ji=1n1ZiZi+1hi=1nZi.H = -J\sum_{i=1}^{n-1} Z_i Z_{i+1} - h\sum_{i=1}^{n} Z_i.

Diagonal structure. Every term is a product of ZZ operators, and ZZ is diagonal in the computational basis with eigenvalues ±1\pm1. Consequently HH itself is diagonal: for a basis state s1sn|s_1\cdots s_n\rangle with Zisi=(1)sisiZ_i|s_i\rangle = (-1)^{s_i}|s_i\rangle, writing σi=(1)si{+1,1}\sigma_i = (-1)^{s_i} \in \{+1,-1\},

Hs1sn=(Jiσiσi+1hiσi)s1sn,H|s_1\cdots s_n\rangle = \Big(-J\sum_i \sigma_i\sigma_{i+1} - h\sum_i \sigma_i\Big)|s_1\cdots s_n\rangle,

i.e. every computational basis state is already an exact eigenstate, with eigenvalue equal to the classical Ising energy of that spin configuration. No diagonalization or simulation is required to find the spectrum — it is read off termwise.

Physical content. For J>0J>0 (ferromagnetic) the ground state(s) align all spins (σi\sigma_i all +1+1 or all 1-1 when h=0h=0, degenerate); for J<0J<0 (antiferromagnetic) on a bipartite lattice the ground state alternates. The field hh breaks the up/down degeneracy by favoring one alignment. Because [H,Zi]=0[H, Z_i]=0 for every ii, there is no term driving transitions between basis states — this is a classical Hamiltonian dressed in quantum notation, and running it alone on a quantum computer produces no dynamics beyond an overall phase per basis state.

Role in the catalog. This diagonal operator is the baseline against which the transverse-field Ising model (adding hxXi-h_x\sum X_i, which does not commute with ZiZ_i) is compared: the transverse term is exactly what turns a classical statistical-mechanics model into a quantum many-body Hamiltonian with a genuine phase transition driven by quantum fluctuations rather than thermal fluctuations alone.

Implementation
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]}
Quantum vs classical

Classical baseline

Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.

Quantum claim

The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.

How to compare

Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Quantum Phase Transitions2011 · S. Sachdev

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

doi.org/10.1017/cbo9780511973765