I am using the "Quantum" add-on package to perform some quantum mechanical calculations using SU(1,1) generators. The code that I've developed reads
Needs["Quantum`Notation`"]
SetQuantumAliases[];
Clear[J];
SetQuantumObject[J];
SetQuantumScalar[a, b];
Subscript[J, a_]\[CenterDot]Subscript[J, 0] := Subscript[J, a];
Subscript[J, 0]\[CenterDot]Subscript[J, b_] := Subscript[J, b];
(Subscript[J, a_])^2 := Subscript[J, 0];
Subscript[J, a_]\[CenterDot]Subscript[J, b_] :=
KroneckerDelta[a, b] + I *\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(c\), \(3\)]\(Signature[{a, b, c}]*
\*SubscriptBox[\(J\), \(c\)]\)\);
\!\(\*
TagBox[
SubscriptBox[
RowBox[{"[[",
TagBox[
RowBox[{
SubscriptBox["J", "a_"], ",",
SubscriptBox["J", "b_"]}],
Quantum`Notation`zz080KetArgs,
Editable->True,
Selectable->True], "]]"}], "-"],
Quantum`Notation`zz050Commutator,
Editable->False,
Selectable->False]\) := I *\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(c\), \(3\)]\(Signature[{a, b, c}]*
\*SubscriptBox[\(J\), \(c\)]\)\);
\!\(\*
TagBox[
SubscriptBox[
RowBox[{"[[",
TagBox[
RowBox[{
SubscriptBox["J", "0"], ",",
SubscriptBox["J", "+"]}],
Quantum`Notation`zz080KetArgs,
Editable->True,
Selectable->True], "]]"}], "-"],
Quantum`Notation`zz050Commutator,
Editable->False,
Selectable->False]\) = SubPlus[J];
\!\(\*
TagBox[
SubscriptBox[
RowBox[{"[[",
TagBox[
RowBox[{
SubscriptBox["J", "0"], ",",
SubscriptBox["J", "-"]}],
Quantum`Notation`zz080KetArgs,
Editable->True,
Selectable->True], "]]"}], "-"],
Quantum`Notation`zz050Commutator,
Editable->False,
Selectable->False]\) = SubMinus[J];
\!\(\*
TagBox[
SubscriptBox[
RowBox[{"[[",
TagBox[
RowBox[{
SubscriptBox["J", "+"], ",",
SubscriptBox["J", "-"]}],
Quantum`Notation`zz080KetArgs,
Editable->True,
Selectable->True], "]]"}], "-"],
Quantum`Notation`zz050Commutator,
Editable->False,
Selectable->False]\) = 2*Subscript[J, 0];
DefineOperatorOnKets[Subscript[J, 0], {\!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j_",
OverscriptBox["h", "^"]], ",",
SubscriptBox["n_",
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\) :> n \!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j",
OverscriptBox["h", "^"]], ",",
SubscriptBox[
RowBox[{"(", "n", ")"}],
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\)}]
DefineOperatorOnKets[SubPlus[J], {\!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j_",
OverscriptBox["h", "^"]], ",",
SubscriptBox["n_",
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\) :> Sqrt[(n + 1) (j - n)] \!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j",
OverscriptBox["h", "^"]], ",",
SubscriptBox[
RowBox[{"(",
RowBox[{"n", "+", "1"}], ")"}],
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\)}]
DefineOperatorOnKets[SubMinus[J], {\!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j_",
OverscriptBox["h", "^"]], ",",
SubscriptBox["n_",
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\) :> Sqrt[n (j - n + 1)] \!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j",
OverscriptBox["h", "^"]], ",",
SubscriptBox[
RowBox[{"(",
RowBox[{"n", "-", "1"}], ")"}],
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\)}]
I have also attached a screenshot of my code for better readability
Having this script, I tried to evaluate $\exp[a J_{+} - bJ_{-}] | j, 0 \rangle$. Following the documentation on the power series of operators in here and using the following script, I expanded the exponential to some order, say 2.
expande =
Normal[
Series[
Exp[(a*SubPlus[J] - b*SubMinus[J])], {SubPlus[J], 0,
2}, {SubMinus[J], 0, 2}]];
opt = expande // ExpandAll
opt\[CenterDot]\!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["j",
OverscriptBox["h", "^"]], ",",
SubscriptBox["0",
OverscriptBox["l", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\) // Simplify
The outcome reads
As it is evident from the screenshot, the action of some operators, such as $J_{-}J_{+} | j, 0 \rangle$, are not evaluated. Do you have any suggestions on how to fix this issue?
CenterDot
instead ofTimes
while Jplus and Jminus are not. I guess the reason is thatSubscript[J,-]
is interpreted asSubMinus[J]
automatically. Could you try by changing Jplus and Jminus to e.g. J_p and J_m? $\endgroup$(Subscript[J, a_])^2 := Subscript[J, 0]
defineSubscript[J, a_]\[CenterDot]Subscript[J, a_] := Subscript[J, 0]
. With this change, the result is $\frac{1}{4} \left(a^2 J_+^2+2 a J_++2\right) \left(b^2 J_-^2-2 b J_-+2\right) \left|j_{\hat{h}},0_{\hat{l}}\right\rangle$ $\endgroup$a
andb
are not operators and thus,CenterDot
should not be used. $\endgroup$