Learn to Use ITensor

main / tutorials / fermions C++v2 | C++v3

ITensor version 3 has not been released yet. This documentation is a preview only.

Fermions and Jordan-Wigner String

Miles Stoudenmire—April 20, 2016

Operators in ITensor are "bosonic". By this we mean that an ITensor or IQTensor which represents an operator does not automatically "know" about fermion anticommutation rules. Even if we put in minus signs to correctly define the action of a fermionic operator on a single site of a lattice model, it will still lack the correct behavior in a system with multiple sites unless we enforce the right behavior.

(Note that AutoMPO does automatically give the correct behavior—more on this below.)

So in ITensor (up to and including version 2.x) the way we deal with fermionic systems is to actually work with bosonic operators plus non-local "string" operators, first discussed by Jordan and Wigner. We always refer to these string operators using the letter "F".

Let's first discuss Jordan-Wigner string in the context of spinless fermions, then turn to fermions with spin.

Spinless Fermions

The local (single site) Hilbert space of a spinless fermions has two states

• vacuum state: $|0\rangle$
• occupied state: $|1\rangle$

Basics of spinless creation and annihilation operators

The occupied state can be viewed as the result of acting on the vacuum state with the creation operator $c^\dagger$ , that is

$$|1\rangle = c^\dagger\, |0\rangle$$

The annihilation operator $c$ returns the system to the vacuum state

$$|0\rangle = c\, |1\rangle$$

You can view these equations as being the definition of these operators.

In a many-body setting, a crucial fact is that creation and annihilation operators acting on different sites anticommute

$$c_i c_j = -c_j c_i$$
$$c^\dagger_i c^\dagger_j = -c^\dagger_j c^\dagger_i$$
$$c_i c^\dagger_j = -c^\dagger_j c_i + \delta_{ij}$$

(The $\delta_{ij}$ in the last equation is important for a consistent definition of these operators but will not much concern us here.)

Spinless Jordan-Wigner transformation

The Jordan-Wigner transformation is a mathematical equivalence, or mapping, between a Hilbert space of spinless fermions and a Hilbert space of "hard core" bosons. (The term "hard core" bosons refers to the rule that these bosons cannot share the same site, as if they had an infinitely repulsive short-range interaction.) Under this mapping, the fermionic creation/annihilation operators map to non-local operators in terms of the bosons. However, most of the non-local parts of these operators typically cancel.

Historically this mapping was introduced to solve a bosonic system by mapping it to a system of non-interacting fermions. Here we are interested in the reverse: mapping fermions to bosons since it is simpler for computers to deal with bosons.

The Jordan-Wigner mapping is defined as follows:

\begin{align} c_j & = F_1 F_2 \cdots F_{j-1} \,a_j \\ c^\dagger_j & = F_1 F_2 \cdots F_{j-1} \, a^\dagger_j \end{align}

Here $a_j$ and $a^\dagger_j$ are the annihilation and creation operators for the bosons (defined identically to the fermion creation/annihilation operators except $a_i$ and $a^\dagger_j$ commute when acting on different sites). The operator $F_j$ is defined as

$$F_j = (-1)^{n_j} = 1-2 n_j \ .$$

In words, $F_j$ is a diagonal operator which takes the value +1 if the site j is empty, and -1 if it is occupied. If it helps, you can think of the mappings above as being the definition of the operators $a_j$ and $a^\dagger_j$ .

As an exercise, let us use the above mapping to check that they are consistent with the fact that fermionic operators anticommute. Assuming $i < j$ , let us first compute

\begin{align} c_i c_j & = (F_1 F_2 \cdots F_{i-1})\, a_i \, (F_1 F_2 \cdots F_{j-1})\, a_j \\ & = F_1^2 F_2^2 \cdots F_{i-1}^2\, (a_i F_{i})\, F_{i+1} \cdots F_{j-1}\, a_j \\ & = -a_i \, F_{i+1} \cdots F_{j-1}\, a_j \end{align}

In the above lines above we used three important facts:

• When acting on different sites, the "F" and "a" operators commute.
• The square of an $F_j$ operator is just the identity: $F_j^2=1$
• $a_i F_{i} = -a_i$ since either site i is occupied and the F gives a -1 or else acting with $a_i$ gives zero anyway

Now let us check that using the mapping on the reversed operators give a consistent result

\begin{align} -c_j c_i & = (F_1 F_2 \cdots F_{j-1})\, a_j \, (F_1 F_2 \cdots F_{i-1})\, a_i \\ & = - F_1^2 F_2^2 \cdots F_{i-1}^2\, (F_{i} a_i)\, F_{i+1} \cdots F_{j-1}\, a_j \\ & = - a_i \, F_{i+1} \cdots F_{j-1}\, a_j \end{align}

This time the $F_i$ operator ended up on the left of the $a_i$ operator and $F_i a_i = a_i$ . The takeaway is that we got the exact same operator in the bosonic language, so we see that the mapping is consistent with the fact that the fermions anticommute $c_i c_j = - c_j c_i$ .

Some Useful Mappings for Spinless Fermions

With the Jordan-Wigner transformation in hand, we can apply it to common operators one encounters when mapping fermionic Hamiltonians to bosonic ones, or when measuring correlation functions involving creation/annihilation operators:

1. Next-neighbor "hopping" part of a 1d fermionic Hamiltonian:

$$(c^\dagger_i c_{i+1} + c^\dagger_{i+1} c_i) = (a^\dagger_i a_{i+1} + a^\dagger_{i+1} a_i)$$

If we write the same operator, but this time keeping the operators in increasing site order, we find:

\begin{align} (c^\dagger_i c_{i+1} - c_{i} c^\dagger_{i+1}) & = (a^\dagger_i a_{i+1} + a_i a^\dagger_{i+1}) \\ & = (a^\dagger_i a_{i+1} + a^\dagger_{i+1} a_{i}) \end{align}

which is completely consistent with the other version above.

2. Further-neighbor "hopping" term, assuming $i < j$

$$(c^\dagger_i c_j + c^\dagger_j c_i) = (a^\dagger_i F_{i+1} F_{i+2} \cdots F_{j-1} a_{j} + a_{i} F_{i+1} F_{i+2} \cdots F_{j-1} a^\dagger_j)$$

In this case we see that the starting and ending operators and signs are all the same, but there is a "string" of F operators between the first and last sites.

3. Operator pairs used in correlation functions

Here we assume that i < j.

\begin{align} c^\dagger_i c_j & = \ \ a^\dagger_i \ F_{i+1} F_{i+2} \cdots F_{j-1}\ a_{j} \\ c_i c^\dagger_j & = -a_{i} \ F_{i+1} F_{i+2} \cdots F_{j-1}\ a^\dagger_{j} \end{align}

4. Next-neighbor pairing, or superconducting "field" term

$$(c^\dagger_i c^\dagger_{i+1} + c_{i+1} c_{i}) = (a^\dagger_{i} a^\dagger_{i+1} + a_i a_{i+1})$$

Fermions with Spin

Fermions with spin have a local Hilbert space with four states

• vacuum state: $|0\rangle$
• up state: $|\!\uparrow\rangle$
• down state: $|\!\downarrow\rangle$
• doubly occupied state: $|2\rangle$

These states can be thought of as being "created" from the vacuum by the operators $c^\dagger_{\uparrow}$ and $c^\dagger_{\downarrow}$ . Importantly, the state $|2\rangle$ is defined to be

$$|2\rangle = c^\dagger_{\uparrow} c^\dagger_{\downarrow} |0\rangle \ .$$

with the up operator coming before the down operator. This implies that on the one hand $c^\dagger_{\uparrow} |\!\downarrow\rangle = |2\rangle$ while on the other $c^\dagger_{\downarrow} |\!\uparrow\rangle = -|2\rangle$ .

Spinful Jordan-Wigner Transformations

With the above definitions we can map spinful fermion operators to spinful boson operators as follows

\begin{align} c_{\uparrow j} & = F_1 F_2 \cdots F_{j-1} \ \ \ a_{\uparrow j} \\ c_{\downarrow j} & = F_1 F_2 \cdots F_{j-1} \, \big( F_j\, a_{\downarrow j} \big) \end{align}

where for spinful fermions, the operator $F_j$ is defined as

\begin{align} F_j = (1-2 n_{\uparrow j}) (1-2 n_{\downarrow j}) = (-1)^{n_j} \ . \end{align}

Note the extra $F_{j}$ in the mapping for the down-spin operator. This operator gives the extra minus sign needed when annihilating a down spin from the doubly occupied state. Be careful with this extra $F_{j}$ operator because while the "F" and "a" operators commute on different sites they do not commute when sharing the same site.

Some Useful Mappings for Spinful Fermions

With the spinful Jordan-Wigner mapping thus defined, we can use it to transform common operators one encounters when mapping fermionic Hamiltonians to bosonic ones, or when measuring correlation functions involving creation/annihilation operators:

1. Next-neighbor "hopping" part of a 1d fermionic Hamiltonian:

\begin{align} \sum_\sigma (c^\dagger_{\sigma,i} c_{\sigma,i+1} + c^\dagger_{\sigma,i+1} c_{\sigma,i}) & = (a^\dagger_{\uparrow,i}\, F_i)\, a_{\uparrow,i+1} + a^\dagger_{\downarrow,i}\, (F_{i+1}\, a_{\downarrow,i+1}) \\ & \ \mbox{} - (a_{\uparrow,i} F_i)\, a^\dagger_{\uparrow,i+1} - a_{\downarrow,i}\, (F_{i+1} a^\dagger_{\downarrow,i+1}) \ \end{align}

Note the minus signs in front of the last two terms. We can interpret the F operators remaining on the right-hand side as checking whether a fermion of the other spin type is present that the particle will hop "over". The minus signs on the last two terms basically just come from writing the operators in left-to-right order (or can be found by conjugating the first two terms and using the fact that the operators anticommute).

2. Further-neighbor "hopping" term, assuming $i < j$

\begin{align} \sum_\sigma (c^\dagger_{\sigma,i} c_{\sigma,j} + c^\dagger_{\sigma,j} c_{\sigma,i}) & = (a^\dagger_{\uparrow,i} F_i)\,F_{i+1} F_{i+2} \cdots F_{j-1}\, a_{\uparrow,j} + a^\dagger_{\downarrow,i}\,F_{i+1} F_{i+2} \cdots F_{j-1} \, (F_j\, a_{\downarrow,j})\\ & \ \mbox{} - (a_{\uparrow,i}\,F_i)\, F_{i+1} F_{i+2} \cdots F_{j-1}\, a^\dagger_{\uparrow,j} - a_{\downarrow,i}\,F_{i+1} F_{i+2} \cdots F_{j-1}\, (F_j\, a^\dagger_{\downarrow,j}) \end{align}

On the Aup, Adagup, etc. versus Cup, Cdagup, etc. Hubbard SiteSet Operators

The Hubbard site set in ITensor provides operators "Cup", "Cdagup", "Cdn", "Cdagdn" as well as "Aup", "Adagup", "Adn", "Adagdn". The presence of the "C..." operators can be confusing because while these are defined to correctly behave as fermionic operators for a single site, they do not anti-commute on different sites. To correctly define many-body fermionic Hamiltonians or other many-body fermionic operators (such as a operator like $c^\dagger_i c_j$ ) it is still necessary to account for fermion anticommutation using Jordan-Wigner "F" operators.

Here is a table of how the "Aup", "Adagup", etc. operators act on a single site:

\begin{align} a_{\uparrow} |\!\uparrow\rangle & = |0\rangle & a_{\downarrow} |\!\downarrow\rangle & = |0\rangle \\ a_{\uparrow} |\!\uparrow\downarrow\rangle & = |\!\downarrow\rangle & a_{\downarrow} |\!\uparrow\downarrow\rangle & = |\!\uparrow\rangle \\ a^\dagger_{\uparrow} |0\rangle & = |\!\uparrow\rangle & a^\dagger_{\downarrow} |0\rangle & = |\!\downarrow\rangle \\ a^\dagger_{\uparrow} |\!\downarrow\rangle & = |\!\uparrow\downarrow\rangle & a^\dagger_{\downarrow} |\!\uparrow\rangle & = |\!\uparrow\downarrow\rangle \end{align}

In contrast, here is how the "Cup", "Cdagup", etc. operators act on a single site:

\begin{align} c_{\uparrow} |\!\uparrow\rangle & = |0\rangle & c_{\downarrow} |\!\downarrow\rangle & = |0\rangle \\ c_{\uparrow} |\!\uparrow\downarrow\rangle & = |\!\downarrow\rangle & c_{\downarrow} |\!\uparrow\downarrow\rangle & = -|\!\uparrow\rangle \\ c^\dagger_{\uparrow} |0\rangle & = |\!\uparrow\rangle & c^\dagger_{\downarrow} |0\rangle & = |\!\downarrow\rangle \\ c^\dagger_{\uparrow} |\!\downarrow\rangle & = |\!\uparrow\downarrow\rangle & c^\dagger_{\downarrow} |\!\uparrow\rangle & = -|\!\uparrow\downarrow\rangle \end{align}

Note the minus signs associated with adding or removing a down fermion to/from the doubly-occupied state. These minus signs occur because in our convention (and as discussed above) the up state is ordered before the down state within a single site.

Using the "Cup", "Cdn", etc. operators in ITensor is optional when doing measurements properties of MPS or when making your own MPO "by hand" (i.e. not using AutoMPO). It is often clearer to use the "Aup", "Adn", etc. operators because it makes it clear that one is working with hard-core bosons plus Jordan-Wigner string.

On the other hand, if you want to create a Hamiltonian for a fermionic system using AutoMPO, using the operator names "Cup", "Cdn" etc. is not optional. This is because AutoMPO recognizes these special operator names and uses internal rewriting rules to add Jordan-Wigner "F" string in between them. (See next section.)

Fermions and AutoMPO

The one place where fermions and Jordan-Wigner string are handled automatically for you in the ITensor library is in AutoMPO. AutoMPO recognizes operators whose names start with "C" as being fermionic, and uses special internal rewriting rules to map them to non-local bosonic operators correctly before producing the MPO tensors.

Even though AutoMPO will produce a correct MPO, if you use this MPO in DMRG, for example, to find a ground state of a fermionic system, when measuring correlation functions such as $\langle c^\dagger_i c_j \rangle$ without using an MPO generated by AutoMPO, it is still required that you insert the necessary Jordan-Wigner string operators yourself.

Back to Tutorials
Back to Main