# Overlaps with odd number of fermion operators

+1 vote

I am using the Julia version of ITensor (v"0.2.4") to study fermionic systems where a degeneracy of the ground state is expected. As a simple example let us consider a doubly degenerate ground state with two wavefunctions say @@ |\Psi \rangle @@ and @@ |\Phi \rangle @@. Due to the nature of the problem, the wavefunctions differ by parity. In order to characterize the real space structure of the ground state I would like to calculate, among other things, overlaps of the following form:

$$\langle \Psi | c^\dagger_i | \Phi \rangle$$

In order to calculate this overlap, I tried to define, using AutoMPO(), a MPO containing only a single local fermionic operator, which resulted in the following error:

"Parity-odd fermionic terms not yet supported by AutoMPO"

Is there a way around this? Is this possible in ITensor at all (either Julia or C++)?

commented by (14.1k points)
Right, I totally forgot about the Jordan-Wigner string. Thanks for the correction Miles.
commented by (160 points)
Ok, this is Great!  Are there any extra precautions for spin-full systems?
Also, Miles in your code above does the line
apply(Fj,phi)
automatically update phi in-place?  or it should rather be something like:
phi=apply(Fj,phi) # I am not sure what this does in Julia but it is legit in python
commented by (70.1k points)
(1) good catch, yes it should be phi = apply(Fj,phi). I edited my comment above to reflect this.

(2) for spinful systems there can a subtlety depending on how the Jordan-Wigner mapping is defined. You can still just apply "F" on all of the sites to the left of site i. But then on site i the operator you need to apply can require on extra piece of string in certain cases i.e. when the Jordan-Wigner transformation maps completely to a bosonic operator obeying bosonic commutation relations.

*However* the operators "Cdagup", "Cdagdn", "Cup", and "Cdn" in the "Electron" site type in ITensor already include these extra, local minus signs that correspond to the "piece of string" I mentioned. So really the code above should 'just work' for spinful electrons too, as long as you just write "Cdagup" or "Cdagdn" for the operator whose matrix element you want and leave the rest of the code the same.
commented by (160 points)
Great! Now Everything works like a charm!
Thank you guys for the quick help! ITensor was the best thing that happened to me in 2021!
commented by (70.1k points)
Nice to hear that! Glad it's all working now.