Adding a pinning/nearest neighbor pairing/superconducting field term to a 2D Hubbard Hamiltonian

ITensors is very general, so variables relating to a specific systems would not be predefined in that way. You’ll want to modify your functions to take an h or hd or have the variables defined properly. I recommend hard coding while debugging if that is easier, then rewriting your code to be more general.

I suggest making a Hamiltonian with the OpSum system like the examples. The OpSum function has a sort of “write what you see” approach, so if you have

h c^\dagger_{\uparrow i}c_{\downarrow j}

The OpSum term would be

 os = OpSum()
# insert other terms here
# ....

i, j = 1,2 # something
os += h, "Cdagup", i, "Cdn", j

In my other reply was how to add a set of hoppings \sum_\sigma c^\dagger_{\sigma i} c_{\sigma i+1} + h.c., so you can modify this and add appropriate terms to have any number of neighbors on whatever geometry you choose.

Similar to the hopping terms, you’ll have to decompose pairing terms into strings of Cdagup & Cup and Cdagdn & Cdn. You can see all the pre-defined operators OpSum will recognize here: ITensors.jl/src/lib/SiteTypes/src/sitetypes/electron.jl at main · ITensor/ITensors.jl · GitHub
There is also a 2D hubbard model example to get you started: ITensors.jl/src/lib/ITensorMPS/examples/dmrg/2d_hubbard_conserve_particles.jl at main · ITensor/ITensors.jl · GitHub

Some other things you can do, is once you have written your Hamiltonian you can run a small number of sites and compare with ED/analytical solutions for the non-interacting Hamiltonian to check that its implemented correctly.

2 Likes