Spin operators
Conventions
Basis ordering
For Trivial symmetry, the local spin-$s$ space has dimension $2s+1$ and states are ordered from highest to lowest weight:
\[m = s,\; s-1,\; \ldots,\; -s \quad \text{(row/column 1 = highest weight)}\]
Symmetry sectors
| Symmetry | Physical meaning | Sector label | Single-site block structure |
|---|---|---|---|
Trivial | none | — | full $(2s{+}1)\times(2s{+}1)$ matrix |
U1Irrep | rotation around z-axis | charge $m \in \{-s,\ldots,+s\}$ | $S^z$ diagonal; $S^x$, $S^y$ not individually representable |
Z2Irrep | spin-flip along x-axis | see note below | $S^x$ block-diagonal; $S^z$ not individually representable |
SU2Irrep | full SU(2) rotation | spin $s$ | only scalars and $\mathbf{S}_1{\cdot}\mathbf{S}_2$ representable |
The $\mathbf{Z}_2$ symmetry implemented here is generated by $e^{i\pi S^x}$, not by $e^{i\pi S^z}$. The two $\mathbf{Z}_2$ sectors correspond to the eigenstates of $S^x$:
- sector 0: $|{+x}\rangle$ (eigenvalue $+\tfrac{1}{2}$)
- sector 1: $|{-x}\rangle$ (eigenvalue $-\tfrac{1}{2}$)
This means $S^x$ is diagonal, while $S^z$ is not a representable single-site operator under this symmetry.
If the conventional z-basis ($|\!\uparrow\rangle$, $|\!\downarrow\rangle$) is needed, you should swap the occurances of X and Z. This effectively rotates the flip symmetry to be aligned with the other axis. The basis transformation that achieves this consist of the Hadamard matrix.
Operator overview
| Function | Unicode alias | Pauli alias | Sites | Supported symmetries |
|---|---|---|---|---|
spin_space | — | — | — | Trivial, Z2Irrep, U1Irrep, SU2Irrep |
casimir | — | — | — | — |
S_x | Sˣ | σˣ | 1 | Trivial, Z2Irrep |
S_y | Sʸ | σʸ | 1 | Trivial |
S_z | Sᶻ | σᶻ | 1 | Trivial, U1Irrep |
S_plus | S⁺ | σ⁺ | 1 | Trivial |
S_min | S⁻ | σ⁻ | 1 | Trivial |
S_x_S_x | SˣSˣ | — | 2 | Trivial, Z2Irrep |
S_y_S_y | SʸSʸ | — | 2 | Trivial, Z2Irrep |
S_z_S_z | SᶻSᶻ | — | 2 | Trivial, U1Irrep, Z2Irrep |
S_plus_S_min | S⁺S⁻ | — | 2 | Trivial, U1Irrep |
S_min_S_plus | S⁻S⁺ | — | 2 | Trivial, U1Irrep |
S_exchange | SS | — | 2 | Trivial, U1Irrep, Z2Irrep, SU2Irrep |
API
TensorKitTensors.SpinOperators.S_exchange — Function
S_exchange([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
SS([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Heisenberg exchange operator
\[\mathbf{S}_1 \cdot \mathbf{S}_2 = S^x_1 S^x_2 + S^y_1 S^y_2 + S^z_1 S^z_2 = \tfrac{1}{2}(S^+_1 S^-_2 + S^-_1 S^+_2) + S^z_1 S^z_2.\]
For SU2Irrep the operator is diagonal in the total-spin basis with eigenvalue $\tfrac{1}{2}[C_2(j_{\text{tot}}) - 2C_2(s)]$, where $C_2(j) = j(j+1)$.
Supported symmetries: Trivial, U1Irrep, Z2Irrep, SU2Irrep.
TensorKitTensors.SpinOperators.S_min — Function
S_min([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
S⁻([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The spin lowering operator $S^- = S^x - iS^y$, with matrix elements $\langle m{-}1 \vert S^- \vert m \rangle = \sqrt{s(s+1) - m(m-1)}$.
Supported symmetries: Trivial.
See also σ⁻ (Pauli version $\sigma^- = 2S^-$).
TensorKitTensors.SpinOperators.S_min_S_plus — Function
S_min_S_plus([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
S⁻S⁺([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The two-site operator $S^- \otimes S^+$.
Supported symmetries: Trivial, U1Irrep.
TensorKitTensors.SpinOperators.S_plus — Function
S_plus([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
S⁺([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The spin raising operator $S^+ = S^x + iS^y$, with matrix elements $\langle m{+}1 \vert S^+ \vert m \rangle = \sqrt{s(s+1) - m(m+1)}$.
Supported symmetries: Trivial.
See also σ⁺ (Pauli version $\sigma^+ = 2S^+$).
TensorKitTensors.SpinOperators.S_plus_S_min — Function
S_plus_S_min([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
S⁺S⁻([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The two-site operator $S^+ \otimes S^-$.
Supported symmetries: Trivial, U1Irrep.
TensorKitTensors.SpinOperators.S_x — Function
S_x([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
Sˣ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The spin-x operator $S^x = \tfrac{1}{2}(S^+ + S^-)$.
Supported symmetries: Trivial, Z2Irrep.
See also σˣ (Pauli version $\sigma^x = 2S^x$).
TensorKitTensors.SpinOperators.S_x_S_x — Function
S_x_S_x([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
SˣSˣ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The two-site operator $S^x \otimes S^x$.
Supported symmetries: Trivial, Z2Irrep.
TensorKitTensors.SpinOperators.S_y — Function
S_y([eltype::Type{<:Complex}], [symmetry::Type{<:Sector}]; spin=1 // 2)
Sʸ([eltype::Type{<:Complex}], [symmetry::Type{<:Sector}]; spin=1 // 2)The spin-y operator $S^y = \tfrac{1}{2i}(S^+ - S^-)$.
Supported symmetries: Trivial.
See also σʸ (Pauli version $\sigma^y = 2S^y$).
TensorKitTensors.SpinOperators.S_y_S_y — Function
S_y_S_y([eltype::Type{<:Complex}], [symmetry::Type{<:Sector}]; spin=1 // 2)
SʸSʸ([eltype::Type{<:Complex}], [symmetry::Type{<:Sector}]; spin=1 // 2)The two-site operator $S^y \otimes S^y$.
Supported symmetries: Trivial, Z2Irrep.
TensorKitTensors.SpinOperators.S_z — Function
S_z([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
Sᶻ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The spin-z operator, diagonal in the standard basis with eigenvalues $m \in \{s,\, s{-}1,\, \ldots,\, -s\}$.
Supported symmetries: Trivial, U1Irrep.
See also σᶻ (Pauli version $\sigma^z = 2S^z$).
TensorKitTensors.SpinOperators.S_z_S_z — Function
S_z_S_z([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
SᶻSᶻ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The two-site operator $S^z \otimes S^z$.
Supported symmetries: Trivial, U1Irrep, Z2Irrep.
TensorKitTensors.SpinOperators.casimir — Method
casimir(spin::Real)
casimir(c::SU2Irrep)Return the value of the quadratic Casimir $C_2(s) = s(s+1)$ for SU(2).
TensorKitTensors.SpinOperators.spin_space — Function
spin_space([symmetry::Type{<:Sector}]; spin=1 // 2)Return the local Hilbert space for a spin-spin site with the given symmetry.
| Symmetry | Space |
|---|---|
Trivial | ComplexSpace(2s+1) |
Z2Irrep | Z2Space(0 => 1, 1 => 1) (spin-1/2 only) |
U1Irrep | U1Space(m => 1 for m in -s:s) |
SU2Irrep | SU2Space(s => 1) |
TensorKitTensors.SpinOperators.spinmatrices — Function
spinmatrices(spin [, eltype])The spinmatrices according to Wikipedia.
TensorKitTensors.SpinOperators.σʸ — Function
σʸ([eltype::Type{<:Complex}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli-y operator $\sigma^y = 2S^y$.
Supported symmetries: Trivial.
See also S_y.
TensorKitTensors.SpinOperators.σˣ — Function
σˣ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli-x operator $\sigma^x = 2S^x$.
Supported symmetries: Trivial, Z2Irrep.
See also S_x.
TensorKitTensors.SpinOperators.σᶻ — Function
σᶻ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli-z operator $\sigma^z = 2S^z$.
Supported symmetries: Trivial, U1Irrep.
See also S_z.
TensorKitTensors.SpinOperators.σ⁺ — Function
σ⁺([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli raising operator $\sigma^+ = 2S^+$.
Supported symmetries: Trivial.
See also S_plus.
TensorKitTensors.SpinOperators.σ⁻ — Function
σ⁻([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli lowering operator $\sigma^- = 2S^-$.
Supported symmetries: Trivial.
See also S_min.