spinbra

◼ spinbra[S] returns the bras that form the basis for the spin-S representation.
◼ spinket[S] returns the kets that form the basis for the spin-S representation.
◼ spinbasis[S] returns the basis for spin S in the ket representation.

◼ S must be an integer or a half-integer.

◼ See also: nc, bra, ket, braketrule, spinketbraX, spinketbraY, spinketbraZ, spinketbraP, spinketbraM

Further examples

Load Package sneg.

<< sneg`sneg`;

Simple test

spinket[2]
conj[%] == spinbra[2]
spinket[5/2]
conj[%] == spinbra[5/2]

spinbasis returns the kets in a form appropriate for basis construction. The "invariant subspace" label is (Subscript[S, z]).

spinbasis[2] // MatrixForm

Basis states for two S=2 particles

bz1 = 
      spinket[2] /. 
        ket[i_] :> ket[i, Null]
bz2 = 
      spinket[2] /. 
        ket[i_] :> ket[Null, i]
Outer[nc, bz1, bz2] // Flatten

Alternative approach using directproductbasis

Off[General::spell1];
bz1 = 
      spinbasis[2] /. 
        ket[i_] :> ket[i, Null]
bz2 = 
      spinbasis[2] /. 
        ket[i_] :> ket[Null, i]
bz12 = 
        mergebasis @ 
          directproductbasis[bz1, bz2, Plus];
MatrixForm[bz12]