Skip to content

Electron

A block in an Electron (fermions with \(\uparrow, \downarrow\) spin) Hilbert space.

Sources: electron.hpp · electron.cpp

Constructors

Electron(nsites::Int64)
Electron(nsites::Int64, nup::Int64, ndn::Int64)
Electron(nsites::Int64, irrep::Representation)
Electron(nsites::Int64, nup::Int64, ndn::Int64, irrep::Representation)
Electron(int64_t nsites);
Electron(int64_t nsites, int64_t nup, int64_t ndn");
Electron(int64_t nsites, Representation irrep);
Electron(int64_t nsites, int64_t nup, int64_t ndn);
Name Description
nsites number of sites (integer)
nup number of "up" electrons (integer)
ndn number of "dn" electrons (integer)
irrep Irreducible Representation of the symmetry group

Local configurations

Each site of an Electron block carries a local dimension \(d=4\), allowing double occupancy. In a ProductState, the local configuration of every site is given by an integer with the following meaning:

Integer Configuration Symbol
0 empty
1 up-spin electron
2 down-spin electron
3 doubly occupied

The integer encodes the occupation bit-wise: bit \(0\) is the \(\uparrow\) occupation, bit \(1\) the \(\downarrow\) occupation. The normal ordering sign convention used for the fermionic operators is described in the Hilbert spaces section of the user guide.

Operators

The following operator types can be used on an Electron block. Here \(c^\dagger_{i\sigma}\), \(c_{i\sigma}\) are the electron creation and annihilation operators, \(n_{i\sigma} = c^\dagger_{i\sigma}c_{i\sigma}\), \(n_i = n_{i\uparrow} + n_{i\downarrow}\), and \(\mathbf{S}_i\) is the spin operator with \(S^z_i = \tfrac12(n_{i\uparrow} - n_{i\downarrow})\), \(S^+_i = c^\dagger_{i\uparrow}c_{i\downarrow}\).

Type Description Formula No. of sites
Cdagup creation operator (\(\uparrow\)) \(c^\dagger_{i\uparrow}\) 1
Cup annihilation operator (\(\uparrow\)) \(c_{i\uparrow}\) 1
Cdagdn creation operator (\(\downarrow\)) \(c^\dagger_{i\downarrow}\) 1
Cdn annihilation operator (\(\downarrow\)) \(c_{i\downarrow}\) 1
Hop hopping (\(\uparrow\) and \(\downarrow\)) \(-\sum_\sigma (c^\dagger_{i\sigma}c_{j\sigma} + c^\dagger_{i\sigma}c_{j\sigma})\) 2
Hopup hopping (\(\uparrow\)) \(-(c^\dagger_{i\uparrow}c_{j\uparrow} + c^\dagger_{i\uparrow}c_{j\uparrow})\) 2
Hopdn hopping (\(\downarrow\)) \(-(c^\dagger_{i\downarrow}c_{j\downarrow} + c^\dagger_{i\downarrow}c_{j\downarrow})\) 2
HopAsym, HopupAsym, HopdnAsym antisymmetric hopping variants \(-(c^\dagger_{i\sigma}c_{j\sigma} - c^\dagger_{i\sigma}c_{j\sigma})\) 2
HubbardU on-site Hubbard interaction \(\sum_i n_{i\uparrow} n_{i\downarrow}\) 0
Nup number operator (\(\uparrow\)) \(n_{i\uparrow}\) 1
Ndn number operator (\(\downarrow\)) \(n_{i\downarrow}\) 1
Ntot number operator \(n_i = n_{i\uparrow} + n_{i\downarrow}\) 1
Nupdn double occupancy \(n_{i\uparrow} n_{i\downarrow}\) 1
NtotNtot density-density interaction \(n_i n_j\) 2
NupdnNupdn double-occupancy correlation \(n_{i\uparrow}n_{i\downarrow}\, n_{j\uparrow}n_{j\downarrow}\) 2
NupNup, NupNdn, NdnNup, NdnNdn spin-resolved density-density \(n_{i\sigma} n_{j\sigma'}\) 2
SdotS Heisenberg interaction \(\mathbf{S}_i \cdot \mathbf{S}_j\) 2
SzSz Ising interaction \(S^z_i S^z_j\) 2
Exchange spin exchange interaction \(\frac{1}{2}(S^+_i S^-_j + S^-_i S^+_j)\) 2
ExchangeAsym antisymmetric exchange \(\frac{1}{2}(S^+_i S^-_j - S^-_i S^+_j)\) 2
Sz local magnetic moment (\(z\)) \(S^z_i\) 1
Sx, Sy local magnetic moment (\(x\), \(y\)) \(S^x_i\), \(S^y_i\) 1
S+, S- spin raising / lowering \(S^+_i\), \(S^-_i\) 1
TotalN total electron number \(\sum_i n_i\) 0
TotalNup, TotalNdn total spin-resolved number \(\sum_i n_{i\uparrow}\), \(\sum_i n_{i\downarrow}\) 0
TotalSz total magnetization \(\sum_i S^z_i\) 0
Id identity \(\mathbb{1}\) 0

For a full description of all operator types, see the operator types page.

Iteration

An Electron block can be iterated over, where at each iteration a ProductState representing the corresponding basis state is returned.

block = Electron(4, 2, 2)
for pstate in block
    @show pstate, index(block, pstate) 
end
auto block = Electron(4, 2, 2);
for (auto pstate : block) {
  Log("{} {}", to_string(pstate), block.index(pstate));
}

Methods

index

Returns the index of a given ProductState in the basis of the Electron block.

index(block::Electron, pstate::ProductState)::Int64
int64_t Electron::index(ProductState const &pstate);

1-indexing

In the C++ version, the index count starts from "0" whereas in Julia the index count starts from "1".

nsites

Returns the number of sites of the block.

nsites(block::Electron)::Int64
int64_t nsites(Electron const &block);

size

Returns the size of the block, i.e. its dimension.

size(block::Electron)::Int64
int64_t size(Electron const &block) const;

dim

Returns the dimension of the block, same as "size" for non-distributed blocks.

dim(block::Electron)::Int64
int64_t dim(Electron const &block) const;

isreal

Returns whether the block can be used with real arithmetic. Complex arithmetic is needed when a Representation is genuinely complex.

isreal(block::Electron)::Bool
bool isreal(Electron const &block);

Usage Example

N = 4
nup = 2
ndn = 1

# without number conservation
block = Electron(N)
@show block

# with number conservation
block_np = Electron(N, nup, ndn)
@show block_np

# with symmetries, without number conservation
p = Permutation([2, 3, 4, 1])
group = PermutationGroup([p^0, p^1, p^2, p^3])
rep = Representation(group, [1.0, -1.0, 1.0, -1.0])
block_sym = Electron(N, rep)
@show block_sym

# with symmetries and number conservation
block_sym_np = Electron(N, nup, ndn, rep)
@show block_sym_np
@show nsites(block_sym_np)
@show size(block_sym_np)

# Iteration
for pstate in block_sym_np
    @show pstate, index(block_sym_np, pstate)
end
int N = 4;
int nup = 2;
int ndn = 1;

// without number conservation
auto block = Electron(N);
XDIAG_SHOW(block);

// with number conservation
auto block_np = Electron(N, nup, ndn);
XDIAG_SHOW(block_np);

// with symmetries, without number conservation
auto p1 = Permutation({0, 1, 2, 3});
auto p2 = Permutation({1, 2, 3, 0});
auto p3 = Permutation({2, 3, 0, 1});
auto p4 = Permutation({3, 0, 1, 2});
auto group = PermutationGroup({p1, p2, p3, p4});
auto irrep = Representation(group, arma::vec{1, -1, 1, -1});
auto block_sym = Electron(N, irrep);
XDIAG_SHOW(block_sym);

// with symmetries and number conservation
auto block_sym_np = Electron(N, nup, ndn, irrep);
XDIAG_SHOW(block_sym_np);
XDIAG_SHOW(block_sym_np.nsites());
XDIAG_SHOW(block_sym_np.size());

// Iteration
for (auto pstate : block_sym_np) {
  Log("{} {}", to_string(pstate), block_sym_np.index(pstate));
}