# Fermion and FermionSite The Fermion class is a specialization of [[SiteSet|classes/siteset]] which initializes its sites to be of type FermionSite, representing a spinless particle with maximum site occupancy of one (a fermion or "hard-core" boson). The FermionSite class can also be used to create custom SiteSets which mix FermionSites with other types of sites. A Fermion site set (and FermionSite) accepts the optional named argument "ConserveNf" which is true by default and will make the quantum numbers carried by a FermionSite include the particle number. If set to false, the quantum numbers will only reflect the particle number modulo 2 (the "parity"). Fermion and FermionSite are defined in the file "itensor/mps/sites/fermion.h" ## Synopsis auto sites = Fermion(100); auto N_3 = op(sites,"N",3); auto A_4 = op(sites,"A",4); //Make a Fermion site set which only conserves parity auto psites = Fermion(100,{"ConserveNf",false}); ## States of a FermionSite * `"Emp"` or `"0"` — the vacuum (empty) state * `"Occ"` or `"1"` — the occupied state (one particle) ## Operators Provided by FermionSite * `"N"` — the density operator @@\hat{n}@@ * `"A"` — the annihilation operator @@\hat{a}@@ * `"Adag"` — the creation operator @@\hat{a}^\dagger@@ * `"F"` — the Jordan-Wigner fermion 'string' operator @@\hat{F}=(1-2\hat{n})=(-1)^{\hat{n}}@@ For the following fermionic operators, it is crucial to note that when obtaining them as individual tensors from a site set, they do not anti-commute with each other on different sites, only on the same site (for more details on how these operators act on a single site read more at [[this tutorial|tutorials/fermions]]). In contrast, when used as operator names in the construction of an AutoMPO, they do anti-commute but only in that context. * `"C"` — the annihilation operator @@\hat{c}@@. * `"Cdag"` — the creation operator @@\hat{c}^\dagger@@.