triqs.operators.util.observables.S2_op

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:

Operator