Learn to Use ITensor

main / classes / electron

Electron and ElectronSite

The Electron class is a specialization of SiteSet which initializes its sites to be of type ElectronSite, representing a fermion (or hardcore boson) with spin 1/2 occupying a single local orbital (meaning that the maximum occupancy of the site is two particles: one with spin up and one with spin down).

The ElectronSite class can also be used to create custom SiteSets which mix ElectronSites with other types of sites.

A Electron site set (and ElectronSite) accepts the following optional named arguments:

Electron and ElectronSite are defined in the file "itensor/mps/sites/electron.h"


auto sites = Electron(100);

auto Ntot_3 = op(sites,"Ntot",3);

auto Cup_4 = op(sites,"Cup",4);

//Make a Electron site set which only conserves parity
auto psites = Electron(100,{"ConserveNf",false});

States of a ElectronSite

Operators Provided by ElectronSite

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). In contrast, when used as operator names in the construction of an AutoMPO, they do anti-commute but only in that context.

Back to Classes
Back to Main