Observables
Operators for commonly used observables.
- triqs.operators.util.observables.N_op(spin_names, n_orb, off_diag=None, map_operator_structure=None, orb_names=None)[source]
Create an operator of the total number of particles.
\[\hat N = \sum_{i\sigma} a_{i\sigma}^\dagger a_{i\sigma}.\]- Parameters:
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.
- Returns:
N – The total number of particles.
- Return type:
- triqs.operators.util.observables.S_op(component, spin_names, n_orb, off_diag=None, map_operator_structure=None, orb_names=None)[source]
Create a component of the spin vector operator.
\[\hat S_{x,y,z} = \frac{1}{2}\sum_{i\sigma\sigma'} a^\dagger_{i\sigma} \mathbf{\tau}^{x,y,z}_{\sigma\sigma'} a_{i\sigma'}, \quad\hat S_\pm = \hat S_x \pm i \hat S_y.\]- Parameters:
component (string) – Component to be created, one of ‘x’, ‘y’, ‘z’, ‘+’, or ‘-‘.
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.
- Returns:
S – The component of the spin vector operator.
- Return type:
- triqs.operators.util.observables.S2_op(spin_names, n_orb, off_diag=None, map_operator_structure=None, orb_names=None)[source]
Create the square of the total spin operator.
\[\hat S^2 = \hat S_x^2 + \hat S_y^2 + \hat S_z^2.\]- Parameters:
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.
- Returns:
S2 – The square of the total spin operator.
- Return type:
- triqs.operators.util.observables.L_op(component, spin_names, n_orb, off_diag=None, map_operator_structure=None, basis='spherical', T=None, orb_names=None)[source]
Create a component of the orbital momentum vector operator.
\[\begin{split}\hat L_{z,+,-} &= \sum_{ii'\sigma} a^\dagger_{i\sigma} L^{z,+,-}_{ii'} a_{i'\sigma},\\ \hat L_x &= \frac{1}{2}(\hat L_+ + \hat L_-),\ \hat L_y = \frac{1}{2i}(\hat L_+ - \hat L_-),\\ L^z_{ii'} &= i\delta_{i,i'}, \ L^+_{ii'} = \delta_{i,i'+1}\sqrt{l(l+1)-i'(i'+1)}, \ L^+_{ii'} = \delta_{i,i'-1}\sqrt{l(l+1)-i'(i'-1)}.\end{split}\]- Parameters:
component (string) – Component to be created, one of ‘x’, ‘y’, ‘z’, ‘+’, or ‘-‘.
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.basis (string, optional) –
The basis in which the interaction matrix should be computed. Takes the values
’spherical’: spherical harmonics,
’cubic’: cubic harmonics (valid only for the integer orbital momenta, i.e. for odd values of n_orb),
’other’: other basis type as given by the transformation matrix T.
T (real/complex numpy array, optional) – Transformation matrix for basis change. Must be provided if basis=’other’.
- Returns:
L – The component of the orbital momentum vector operator.
- Return type:
- triqs.operators.util.observables.L2_op(spin_names, n_orb, off_diag=None, map_operator_structure=None, basis='spherical', T=None, orb_names=None)[source]
Create the square of the orbital momentum operator.
\[\hat L^2 = \hat L_x^2 + \hat L_y^2 + \hat L_z^2.\]- Parameters:
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.basis (string, optional) –
The basis in which the interaction matrix should be computed. Takes the values
’spherical’: spherical harmonics,
’cubic’: cubic harmonics (valid only for the integer orbital momenta, i.e. for odd values of n_orb),
’other’: other basis type as given by the transformation matrix T.
T (real/complex numpy array, optional) – Transformation matrix for basis change. Must be provided if basis=’other’.
- Returns:
L2 – The square of the orbital momentum operator.
- Return type:
- triqs.operators.util.observables.LS_op(spin_names, n_orb, off_diag=None, map_operator_structure=None, basis='spherical', T=None, orb_names=None)[source]
Create a spin-orbital coupling operator.
\[\mathbf{\hat L\cdot\hat S} = \hat L_x \hat S_x + \hat L_y \hat S_y + \hat L_z \hat S_z.\]- Parameters:
spin_names (list of strings) – Names of the spins, e.g. [‘up’,’down’].
n_orb (int) – Number of orbitals.
off_diag (boolean) – Do we have (orbital) off-diagonal elements? If yes, the operators and blocks are denoted by (‘spin’, ‘orbital’), otherwise by (‘spin_orbital’,0).
map_operator_structure (dict) – Mapping of names of GF blocks names from one convention to another, e.g. {(‘up’, 0): (‘up_0’, 0), (‘down’, 0): (‘down_0’,0)}. If provided, the operators and blocks are denoted by the mapping of
('spin', 'orbital')
.basis (string, optional) –
The basis in which the interaction matrix should be computed. Takes the values
’spherical’: spherical harmonics,
’cubic’: cubic harmonics (valid only for the integer orbital momenta, i.e. for odd values of n_orb),
’other’: other basis type as given by the transformation matrix T.
T (real/complex numpy array, optional) – Transformation matrix for basis change. Must be provided if basis=’other’.
- Returns:
LS – The spin-orbital coupling operator.
- Return type: