Free Fermion Rotations on QN conserved state

Hi all,

I’m trying to understand how best to apply a Free Fermion rotation on a QN conserved state. For an example, assume I have previously defined an electronic Hamiltonian I would like to perform DMRG on, and that Hamiltonian has good quantum numbers that I fixed.

sites = siteinds("Electron",N,conserve_qns=true)
states = ["0" for n=1:N]
states[1] = "Up"
states[2] = "Dn"
psi = productMPS(sites,states)
sweeps = Sweeps(10); setmaxdim!(10); setcutoff!(sweeps, 1e-7)
energy, psi = dmrg(H, psi, sweeps, outputlevel=0);

This is all fine. However, what if afterwards I wanted to perform a free fermion rotation on psi, for example to represent a state with respect to a momenta basis rather than occpuation/fock basis? Is there a way to apply a givens rotation, for example, which could perform a free fermion rotation between two fermionic sites only within the spin up sector? Is there a way to do so in which I contract a local gate into local sites, or am I forced to take psi to dense and perform the rotations out of the iTensor supported object?

I appreciate any wisdom!

A Givens rotation gate would look something like this:

function givens(theta::Number, s1::Index, s2::Index)
  U = [
    1 0 0 0
    0 cos(theta) sin(theta) 0
    0 -conj(sin(theta)) cos(theta) 0
    0 0 0 1
  ]
  return ITensor(U, s2', s1', dag(s2), dag(s1))
end

You can apply those kinds of gates to an MPS using the apply function. That’s the design used in GitHub - ITensor/ITensorGaussianMPS.jl.

Hey Matt,

I am familiar with the form of the givens rotation. I am unsure how to make sure that this givens rotation is actually applied to the QN adapted solution to the dmrg correctly. I also do not see use of the applyfunction in the GaussianMPS library outside of the src, in which this site issue is not mentioned.

To rephrase my question in the context of your reply, how do I guarantee that s1 and s2 are indices which are aware of both fermionic site and spin? Or is it that applying the gate while only specifying the physical indices will automatically perform rotations in each spin sector independently?

apply is a function from ITensorMPS.jl for applying gates to an MPS.

I understand your question now, it is a little bit trickier dealing with "Electron" sites because the form of the Givens gates becomes more complicated (since they have to account for the separate rotations in the up and down sectors).

In ITensorGaussianMPS.jl, our approach is to temporarily use "Fermion" sites (with alternating up and down spin sites), apply Givens gates of the form I show above to the even and odd sites, and then recombine the neighboring sites into "Electron" sites. That logic can be found here: ITensorGaussianMPS.jl/src/gmps.jl at v0.1.12 · ITensor/ITensorGaussianMPS.jl · GitHub.

Honestly, it may be easiest to run DMRG using separate up and down sites:

space_up = [QN(("Nf", 0, -1), ("Sz", 0)) => 1, QN(("Nf", 1, -1), ("Sz", 1)) => 1]
space_dn = [QN(("Nf", 0, -1), ("Sz", 0)) => 1, QN(("Nf", 1, -1), ("Sz", -1)) => 1]
sites_up = [Index(space_up, "Fermion,Site,n=$(2n-1)") for n in 1:N]
sites_dn = [Index(space_dn, "Fermion,Site,n=$(2n)") for n in 1:N]
sites = collect(Iterators.flatten(zip(sites_up, sites_dn)))

and then you’ll just have to rewrite your Hamiltonian to account for the up and down spins being on separate sites. That way, you can using the form of the Givens rotation I showed above, applying the rotations separately to the up (odd) and down (even) sites.

Ah, I didn’t realize I could specify the QNs in each sector individually and stitch them together while still preserving QNs. I agree that separating sites and re-expressing the Hamiltonian for this initialization of sites is probably best. Many thanks!

Glad that was helpful. You can of course write an “Electron” version of a Givens gate, which is an outer product of two Givens gates (one for spin up and one for spin down), with an additional (fermionic) swap of indices. In that past I did it that way and it is definitely feasible, but maybe a bit more error prone since you have to be careful handling the fermion sign yourself within the composite Givens gate (while in the strategy I describe above the fermion sign should be handled automatically with fermionic swap gates inside of apply).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.