← Atlas

Operators · Fermionic Hamiltonians

Fermi-Hubbard dimer operator (Jordan-Wigner encoded)

The two-site Fermi-Hubbard dimer Hamiltonian, mapped to qubits via the Jordan-Wigner transformation: nearest-neighbor hopping competing with on-site Coulomb repulsion.

Exact & formalUpdated

View frozen graph

1↑1↓2↑2↓Step 1 of 4 · Hop (XX+YY) · on 1↑, 2↑Hop (XX+YY)Step 2 of 4 · Hop (XX+YY) · on 1↓, 2↓Hop (XX+YY)Step 3 of 4 · U n₁↑n₁↓ · on 1↑, 1↓U n₁↑n₁↓Step 4 of 4 · U n₂↑n₂↓ · on 2↑, 2↓U n₂↑n₂↓

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

Expected outcomes

  • Half-filling ground sector (N=2)100%
  • Steps4
  • Wires4
  • Sites × spins2 × 2 = 4 modes / qubits
  • Terms2 hopping (XX+YY) + 2 on-site U
  • ConservedTotal fermion number N
  • Papers2
Native
fermi_hubbard_operator.py
import numpy as np
from qiskit.quantum_info import SparsePauliOp

def hubbard_dimer(t: float, U: float) -> SparsePauliOp:
    # Mode order: 0=1up, 1=1down, 2=2up, 3=2down
    n = 4
    terms, coeffs = [], []
    # Hopping 1up-2up (modes 0,2) and 1down-2down (modes 1,3), with Z-string for JW
    for (a, b) in [(0, 2), (1, 3)]:
        for pauli, coeff in (("X", -t / 2), ("Y", -t / 2)):
            s = ["I"] * n
            s[a], s[b] = pauli, pauli
            for k in range(a + 1, b):
                s[k] = "Z"
            terms.append("".join(reversed(s)))
            coeffs.append(coeff)
    # On-site interaction U * n_i_up * n_i_down = U/4 * (I-Z_up)(I-Z_down),
    # expanded directly as Pauli strings.
    for (up, down) in [(0, 1), (2, 3)]:
        s0 = ["I"] * n
        terms.append("".join(reversed(s0))); coeffs.append(U / 4)
        s1 = ["I"] * n; s1[up] = "Z"
        terms.append("".join(reversed(s1))); coeffs.append(-U / 4)
        s2 = ["I"] * n; s2[down] = "Z"
        terms.append("".join(reversed(s2))); coeffs.append(-U / 4)
        s3 = ["I"] * n; s3[up], s3[down] = "Z", "Z"
        terms.append("".join(reversed(s3))); coeffs.append(U / 4)
    return SparsePauliOp(terms, coeffs).simplify()

H = hubbard_dimer(t=1.0, U=4.0)
N_op = SparsePauliOp(["".join(reversed(["Z" if k == i else "I" for k in range(4)])) for i in range(4)],
                      [-0.5] * 4) + SparsePauliOp("IIII", [2.0])
commutator = H.to_matrix() @ N_op.to_matrix() - N_op.to_matrix() @ H.to_matrix()
print("max |[H, N]| =", np.abs(commutator).max())  # ~0, confirming particle-number conservation

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

References

Exact & formal
  • Direct mathematics
  • Verified by construction
  • Peer-reviewed paper
Method
Total particle number N = Σ n_iσ (per-spin-orbital occupation from Jordan-Wigner) was checked to commute exactly with the assembled 4-qubit (2-site, 2-spin) SparsePauliOp Hamiltonian by explicit matrix commutator, confirming the hopping and interaction terms both conserve fermion number as required by the JW encoding.
Result
Pass · [H, N] is the zero matrix to numerical precision, confirming particle-number conservation of the encoded operator.
Strategies for solving the Fermi-Hubbard model on near-term quantum computers ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
hubbard modelfermionic simulationjordan-wignerstrongly correlated electrons

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