2
$\begingroup$

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 enter image description here

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 readsenter image description here 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?

$\endgroup$
4
  • $\begingroup$ I didn't use this package. But from your output I guess Jplus and Jminus are not treated as quantum object correctly. You see the quantum objects are connected by CenterDot instead of Times while Jplus and Jminus are not. I guess the reason is that Subscript[J,-] is interpreted as SubMinus[J] automatically. Could you try by changing Jplus and Jminus to e.g. J_p and J_m? $\endgroup$
    – lilyric
    Aug 5 at 16:34
  • $\begingroup$ Does this change give the correct result? Instead of (Subscript[J, a_])^2 := Subscript[J, 0] define Subscript[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$
    – LouisB
    Aug 5 at 19:43
  • $\begingroup$ @lilyric This suggestion is not compatible with the notation. This is because a and b are not operators and thus, CenterDot should not be used. $\endgroup$
    – Shasa
    Aug 5 at 19:51
  • $\begingroup$ @LouisB Sadly, this also didn't help. I want my final results to be only expressed in terms of kets and no remaining $J_{\pm}$ operators. $\endgroup$
    – Shasa
    Aug 5 at 19:53

1 Answer 1

4
$\begingroup$

The reason is simple: this package uses CenterDot as multiplication, while Series of Exp gives commutative polynomials wrt. Times instead of CenterDot.

The relevant codes are

Block[{Print},Needs["Quantum`Notation`"]];
SetQuantumAliases[];

SetQuantumObject[J];
SetQuantumScalar[a,b];

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[Subscript[J, p], {\!\(\*
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[Subscript[J, m], {\!\(\*
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]\)}]

enter image description here

Now let's define the non-commutative Exp as

opExp[op_,n_Integer]:=Sum[1/$$i! CenterDot@@Table[op,$$i],{$$i,0,n}]

Then we have the correct result,

op=opExp[(a Subscript[J, p]+b Subscript[J, m]),2]//ExpandAll
op\[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]\)

enter image description here

$\endgroup$
1
  • $\begingroup$ +1 This works! Thank you for your effort! $\endgroup$
    – Shasa
    Aug 6 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.