Struct symmetry_group

Struct Documentation

struct symmetry_group

contains the symmetry operations of the cluster and methods to take advantage of them

The symmetry group is supposed Abelian. It is defined by a small set of generators, each being a “signed permutation”: the combination of a permutation of sites with possibly sign changes of the correponding annihilation operators

each element of the group is thus defined by a permutation ‘e’ and a sign mask ‘sign_mask’ (the set bits of the mask are associated with the orbitals that change sign under the element).

The generators are defined by a permutation ‘generator’ and a sign mask ‘generator_sign_mask’

Public Functions

symmetry_group(int _N, int _n_sites, const vector<vector<int>> &gen, bool bath_irrep)

Constructor.

bool is_valid_element(const vector<int> &v, bool full = false)

checks whether element v is a valid element

bool is_identity(const vector<int> &v, bool full = false)

checks whether this is the trivial (identity) group element

vector<int> product(const vector<int> &x, const vector<int> &y)

multiplies two group elements

vector<int> inverse(const vector<int> &x)

returns the inverse of a group element

vector<int> identity()

checks whether this is the trivial (identity) group element

int sign(const vector<int> &x)
uint32_t apply_single(const vector<int> &x, const uint32_t b)
pair<uint32_t, int> apply(const vector<int> &x, const uint32_t b)

applies the group element to the bits of b, and calculates the phase, which includes the fermionic phase from the permutation and the group phase.

the phase is an int from 0 to 2*g that becomes the complex number exp(i*phase*pi/(2*g)) returns {updated b, phase}

template<typename T>
vector<T> apply_to_vector(const vector<int> &v, const vector<T> &x)
pair<int, int> map_orbital(const vector<int> &v, int a)

returns the label of the orbital obtained by applying group element v to orbital ‘a’, along with the phase ‘phase’

Parameters:
  • a – orbital label (from 0 to 2N-1)

  • phase – exponent (in multiple of 2g/(2pi)), added to the previous value returns an orbital label between 0 and 2N-1

bool diff(const vector<int> &x, const vector<int> &y, bool full = false)
void build()

Finishes the construction of the struct following reading the generators.

pair<binary_state, int> apply(const int &elem, const binary_state &b)

Applies group element elem to the binary_state b.

Parameters:
  • elem – group element

  • b – input binary_state state returns {new binary state, phase} the phase is the fermionic phase (+1 or -1) + phase from the signed permutations + group phase The transformation is applied separately on the left and right parts. This should be changed if we extend symmetries to those that mix the up and down spin parts.

pair<binary_state, int> apply(const int &elem, const int &irrep, const binary_state &b)

Applies group element elem to the binary_state b, in representation irrep.

Parameters:
  • elem – group element

  • irrep – irreducible representation

  • b – input binary_state state returns {new binary state, phase} the phase is the net phase coming from both the fermionic phase, the signed permutations and the projection operator (characters of the irrep)

rep_map Representative(const binary_state &b, int irrep)

Transforms the binary state b into its representative in the orbit under the group, in the representation irrep.

Note: phases are in multiples of pi/g and not 2pi/g, because of groups of odd length and the necessity to represent -1 (from fermionic signs) in those terms.

Parameters:
  • b – input binary_state

  • irrep – the irreducible representation returns {new binary state, phase, length} phase : resulting phase (if multiplied by (2 pi / 2 g) ) length : the length of the cycle, zero if the state is null (=0,1,2,4,8)

void to_site_basis(int r, vector<Complex> &x, vector<Complex> &y, int n_mixed)

Converts a vector B in the basis of symmetric orbitals into a vector G in the original site basis.

Parameters:
  • r – label of the irrep

  • x – vector expressed in the irrep r (dimension site_irrep_dim[r]*n_mixed)

  • y – vector in the larger basis (dimension n_sites*n_mixed)

void to_site_basis(int r, vector<double> &x, vector<double> &y, int n_mixed)
void to_site_basis(block_matrix<Complex> &B, matrix<Complex> &G, int n_mixed)

Converts a block-diagonal matrix B in the basis of symmetric orbitals into a full matrix G in the original site basis.

Parameters:
  • B – the block diagonal matrix

  • G – the full matrix, unrolled into a vector

bool sector_is_valid(const sector &sec)

Checks whether a sector is valid output : true if valid, false otherwise.

sector shift_sector(const sector &sec, int pm, int spin, int _irrep)
bool operator!=(const symmetry_group &y)
template<typename HilbertField>
inline HilbertField phaseX(int i)
template<typename HilbertField>
void check_invariance(const map<index_pair, HilbertField> &elements, const string &name, bool interaction)
vector<vector<symmetric_orbital>> build_symmetric_orbitals(int mixing)

Building the set of symmetric orbitals.

Parameters:

mixing – mixing state of the instance

template<>
inline double phaseX(int i)
template<>
inline Complex phaseX(int i)

Public Members

bool has_complex_irrep
bool bath_irrep

if true, the bath orbitals belong to specific representations

int N

total number of sites (i.e. including bath sites)

int n_sites

number of orbitals used in Green functions (real sites)

int g

number of group elements

int L
vector<vector<int>> generator

generators

vector<vector<int>> e

group elements (cluster representation)

matrix<int> phi

phases of the group characters (if multiplied by 2\pi/g)

matrix<Complex> chi

character table (transformation matrix)

matrix<Complex> S

transforms symmetric orbitals into site orbitals

matrix<double> S_real

transforms symmetric orbitals into site orbitals (real version)

vector<bool> complex_irrep

true if the irrep requires complex numbers (has at least one complex-valued character)

vector<int> site_irrep_dim
vector<int> site_irrep_dim_cumul

number of cluster symmetric orbitals in each irrep

matrix<int> tensor

number of cluster symmetric orbitals before each irrep

matrix of the tensor products

vector<int> conjugate

label of conjugate irrep

vector<int> phaseR
vector<Complex> phaseC