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,\; …,\; -s \quad \text{(row/column 1 = highest weight)}\]
Symmetry sectors
| Symmetry | Physical meaning | Sector label | Single-site block structure |
|---|---|---|---|
Trivial | none | — | full $(2s{+}1)×(2s{+}1)$ matrix |
U1Irrep | rotation around z-axis | charge $m ∈ \{-s,…,+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 $𝐒_1{⋅}𝐒_2$ representable |
The $\mathbf{Z}_2$ symmetry implemented here is generated by $e^{iπ S^x}$, not by $e^{iπ S^z}$. The two $\mathbf{Z}_2$ sectors correspond to the eigenstates of $S^x$:
- sector 0: $|{+x}⟩$ (eigenvalue $+\tfrac{1}{2}$)
- sector 1: $|{-x}⟩$ (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 ($|\!↑⟩$, $|\!↓⟩$) 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 — Method
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
\[𝐒_1 ⋅ 𝐒_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 — Method
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 $⟨m{-}1 | S^- | m⟩ = \sqrt{s(s+1) - m(m-1)}$.
Supported symmetries: Trivial.
See also σ⁻ (Pauli version $σ^- = 2S^-$).
TensorKitTensors.SpinOperators.S_min_S_plus — Method
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^- ⊗ S^+$.
Supported symmetries: Trivial, U1Irrep.
TensorKitTensors.SpinOperators.S_plus — Method
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 $⟨m{+}1 | S^+ | m⟩ = \sqrt{s(s+1) - m(m+1)}$.
Supported symmetries: Trivial.
See also σ⁺ (Pauli version $σ^+ = 2S^+$).
TensorKitTensors.SpinOperators.S_plus_S_min — Method
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^+ ⊗ S^-$.
Supported symmetries: Trivial, U1Irrep.
TensorKitTensors.SpinOperators.S_x — Method
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 $σ^x = 2S^x$).
TensorKitTensors.SpinOperators.S_x_S_x — Method
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 ⊗ S^x$.
Supported symmetries: Trivial, Z2Irrep.
TensorKitTensors.SpinOperators.S_y — Method
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 $σ^y = 2S^y$).
TensorKitTensors.SpinOperators.S_y_S_y — Method
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 ⊗ S^y$.
Supported symmetries: Trivial, Z2Irrep.
TensorKitTensors.SpinOperators.S_z — Method
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 ∈ \{s,\, s{-}1,\, …,\, -s\}$.
Supported symmetries: Trivial, U1Irrep.
See also σᶻ (Pauli version $σ^z = 2S^z$).
TensorKitTensors.SpinOperators.S_z_S_z — Method
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 ⊗ S^z$.
Supported symmetries: Trivial, U1Irrep, Z2Irrep.
TensorKitTensors.SpinOperators.basis_transform — Method
basis_transform(symmetry::Type{<:Sector}; spin = 1 // 2)Return the unitary basis transformation that maps the standard spin basis $\{|s⟩, |s-1⟩, …, |-s⟩\}$ (the eigenbasis of $S^z$ in descending order of $m$, as used by the Trivial operators) onto the basis of spin_space(symmetry; spin), as a TensorMap on spin_space(Trivial; spin) to desymmetrize(spin_space(symmetry; spin)). See also symmetrize.
| Symmetry | Transformation |
|---|---|
Trivial | identity |
Z2Irrep | Hadamard matrix $\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}/√2$ |
U1Irrep | permutation to the order of sectors(spin_space(U1Irrep; spin)) |
SU2Irrep | identity |
For Z2Irrep (spin-1/2 only), the symmetry is the $ℤ₂$ spin-flip generated by $2S^x$, and the Hadamard matrix maps onto its eigenbasis $|±⟩ = (|↑⟩ ± |↓⟩)/√2$, where Z2Irrep(0) labels the flip-symmetric state $|+⟩$.
For U1Irrep, the $S^z$ eigenvalue $m$ is used as the $U(1)$ charge, and the transformation is the permutation from descending-$m$ order to TensorKit's charge order ($0, 1, -1, 2, …$ for integer spin, $1/2, -1/2, 3/2, …$ for half-integer spin).
For SU2Irrep, TensorKit's basis convention within an irrep is descending $m$, which coincides with the standard spin basis, such that the transformation is the identity.
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 $σ^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 $σ^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 $σ^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 $σ^+ = 2S^+$.
Supported symmetries: Trivial.
See also S_plus.
TensorKitTensors.SpinOperators.σ⁻ — Function
σ⁻([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)The Pauli lowering operator $σ^- = 2S^-$.
Supported symmetries: Trivial.
See also S_min.