summaryrefslogtreecommitdiff
path: root/xmds2
diff options
context:
space:
mode:
authorSimon Rochester <simon.rochester@gmail.com>2011-08-21 17:33:33 -0700
committerSimon Rochester <simon.rochester@gmail.com>2011-08-21 17:33:33 -0700
commita6dad51ad585a235dc7bfe89ba1b488037642b9a (patch)
treed60db3823edd86316eb3dda562c53e5714b638cf /xmds2
parent04cb902513d09f3d762bf65bc87c521b0497b08a (diff)
downloadNresonances-a6dad51ad585a235dc7bfe89ba1b488037642b9a.tar.gz
Nresonances-a6dad51ad585a235dc7bfe89ba1b488037642b9a.zip
xmds2 model of Gena's 4-level system.
GenerateGenasSystem.nb: generate evolution equations GenasSystemPlots: code for reading output data, converting complex field amplitudes to rotation angle/ellipticity, and plotting
Diffstat (limited to 'xmds2')
-rwxr-xr-xxmds2/Genas_system/GenasSystemPlots.nb458
-rwxr-xr-xxmds2/Genas_system/Genas_system.xmds218
-rwxr-xr-xxmds2/Genas_system/GenerateGenasSystem.nb2722
-rwxr-xr-xxmds2/Genas_system/Makefile37
4 files changed, 3435 insertions, 0 deletions
diff --git a/xmds2/Genas_system/GenasSystemPlots.nb b/xmds2/Genas_system/GenasSystemPlots.nb
new file mode 100755
index 0000000..c347101
--- /dev/null
+++ b/xmds2/Genas_system/GenasSystemPlots.nb
@@ -0,0 +1,458 @@
+(* Content-type: application/mathematica *)
+
+(*** Wolfram Notebook File ***)
+(* http://www.wolfram.com/nb *)
+
+(* CreatedBy='Mathematica 7.0' *)
+
+(*CacheID: 234*)
+(* Internal cache information:
+NotebookFileLineBreakTest
+NotebookFileLineBreakTest
+NotebookDataPosition[ 145, 7]
+NotebookDataLength[ 15335, 449]
+NotebookOptionsPosition[ 14375, 415]
+NotebookOutlinePosition[ 14740, 431]
+CellTagsIndexPosition[ 14697, 428]
+WindowFrame->Normal*)
+
+(* Beginning of Notebook Content *)
+Notebook[{
+
+Cell[CellGroupData[{
+Cell["Functions for field parameterization conversion", "Section"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{
+ RowBox[{"Ax", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"0", ",", "0"}], "}"}], ",", "ComplexAmplitude"}], "]"}], "=",
+ "0"}], ";"}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"Ax", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], ":=",
+ FractionBox[
+ RowBox[{"Abs", "[", "Ex", "]"}],
+ SqrtBox[
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"Abs", "[", "Ex", "]"}], "2"], "+",
+ SuperscriptBox[
+ RowBox[{"Abs", "[", "Ey", "]"}], "2"]}]]]}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{
+ RowBox[{"Ay", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"0", ",", "0"}], "}"}], ",", "ComplexAmplitude"}], "]"}], "=",
+ "0"}], ";"}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"Ay", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], ":=",
+ FractionBox[
+ RowBox[{"Abs", "[", "Ey", "]"}],
+ SqrtBox[
+ RowBox[{
+ SuperscriptBox[
+ RowBox[{"Abs", "[", "Ex", "]"}], "2"], "+",
+ SuperscriptBox[
+ RowBox[{"Abs", "[", "Ey", "]"}], "2"]}]]]}]], "Input"],
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"\[Phi]", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"0", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], "=",
+ "0"}], ";"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"\[Phi]", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "0"}], "}"}], ",", "ComplexAmplitude"}], "]"}], "=",
+ "0"}], ";"}]}], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"\[Phi]", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], ":=",
+ RowBox[{"Arg", "[",
+ RowBox[{
+ FractionBox["Ey",
+ RowBox[{"Abs", "[", "Ey", "]"}]],
+ FractionBox[
+ RowBox[{"Abs", "[", "Ex", "]"}], "Ex"]}], "]"}]}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"AmplitudePhase", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], ":=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Ax", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}], ",",
+ RowBox[{"Ay", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}], ",",
+ RowBox[{"\[Phi]", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}]}], "}"}], "&"}], "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex", ",", "Ey"}], "}"}], ",", "ComplexAmplitude"}],
+ "]"}]}]], "Input"],
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{"S1", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax_", ",", "Ay_", ",", "\[Phi]_"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ":=",
+ RowBox[{
+ SuperscriptBox["Ax", "2"], "-",
+ SuperscriptBox["Ay", "2"]}]}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"S2", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax_", ",", "Ay_", ",", "\[Phi]_"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ":=",
+ RowBox[{"2", "Ax", " ", "Ay", " ",
+ RowBox[{"Cos", "[", "\[Phi]", "]"}]}]}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"S3", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax_", ",", "Ay_", ",", "\[Phi]_"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ":=",
+ RowBox[{"2", "Ax", " ", "Ay", " ",
+ RowBox[{"Sin", "[", "\[Phi]", "]"}]}]}]}], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"Stokes", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax_", ",", "Ay_", ",", "\[Phi]_"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ":=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"S1", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}], ",",
+ RowBox[{"S2", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}], ",",
+ RowBox[{"S3", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}]}], "}"}], "&"}], "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax", ",", "Ay", ",", "\[Phi]"}], "}"}], ",", "AmplitudePhase"}],
+ "]"}]}]], "Input"],
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{"\[Alpha]", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"S1_", ",", "S2_", ",", "S3_"}], "}"}], ",", "Stokes"}], "]"}], ":=",
+ RowBox[{
+ FractionBox["1", "2"],
+ RowBox[{"ArcTan", "[",
+ RowBox[{"S1", ",", "S2"}], "]"}]}]}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"\[Epsilon]", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"S1_", ",", "S2_", ",", "S3_"}], "}"}], ",", "Stokes"}], "]"}], ":=",
+ RowBox[{
+ FractionBox["1", "2"],
+ RowBox[{"ArcSin", "[", "S3", "]"}]}]}]}], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"S1_", ",", "S2_", ",", "S3_"}], "}"}], ",", "Stokes"}], "]"}], ":=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[Alpha]", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}], ",",
+ RowBox[{"\[Epsilon]", "[",
+ RowBox[{"#1", ",", "#2"}], "]"}]}], "}"}], "&"}], "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"S1", ",", "S2", ",", "S3"}], "}"}], ",", "Stokes"}],
+ "]"}]}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax_", ",", "Ay_", ",", "\[Phi]_"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ":=",
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{
+ RowBox[{"Stokes", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ax", ",", "Ay", ",", "\[Phi]"}], "}"}], ",",
+ "AmplitudePhase"}], "]"}], ",", "Stokes"}], "]"}]}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex_", ",", "Ey_"}], "}"}], ",", "ComplexAmplitude"}], "]"}], ":=",
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{
+ RowBox[{"AmplitudePhase", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"Ex", ",", "Ey"}], "}"}], ",", "ComplexAmplitude"}], "]"}],
+ ",", "AmplitudePhase"}], "]"}]}]], "Input"]
+}, Open ]],
+
+Cell[CellGroupData[{
+
+Cell["Read and plot data", "Section"],
+
+Cell["\<\
+SetDirectory[NotebookDirectory[]];
+fpDat = OpenRead[\"Genas_system_mg0.dat\",BinaryFormat -> True];
+z1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+z1 = Flatten[BinaryReadList[fpDat, {\"Real64\"}, z1Len, ByteOrdering->-1]];
+t1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+t1 = Flatten[BinaryReadList[fpDat, {\"Real64\"}, t1Len, ByteOrdering->-1]];
+Exreout1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+Exreout1 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t1Len, \
+ByteOrdering->-1],{j1,1,z1Len}],{{1},{2,3}}];
+Eximout1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+Eximout1 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t1Len, \
+ByteOrdering->-1],{j1,1,z1Len}],{{1},{2,3}}];
+Eyreout1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+Eyreout1 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t1Len, \
+ByteOrdering->-1],{j1,1,z1Len}],{{1},{2,3}}];
+Eyimout1Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+Eyimout1 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t1Len, \
+ByteOrdering->-1],{j1,1,z1Len}],{{1},{2,3}}];
+Close[fpDat];
+ResetDirectory[];
+SetDirectory[NotebookDirectory[]];
+fpDat = OpenRead[\"Genas_system_mg1.dat\",BinaryFormat -> True];
+z2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+z2 = Flatten[BinaryReadList[fpDat, {\"Real64\"}, z2Len, ByteOrdering->-1]];
+t2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+t2 = Flatten[BinaryReadList[fpDat, {\"Real64\"}, t2Len, ByteOrdering->-1]];
+r11out2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r11out2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r22out2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r22out2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r33out2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r33out2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r44out2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r44out2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r12reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r12reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r12imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r12imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r13reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r13reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r13imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r13imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r14reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r14reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r14imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r14imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r23reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r23reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r23imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r23imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r24reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r24reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r24imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r24imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r34reout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r34reout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+r34imout2Len = BinaryRead[fpDat, \"UnsignedInteger32\", ByteOrdering->-1];
+r34imout2 = Flatten[Table[BinaryReadList[fpDat, {\"Real64\"}, t2Len, \
+ByteOrdering->-1],{j1,1,z2Len}],{{1},{2,3}}];
+Close[fpDat];
+ResetDirectory[];
+
+declaredVariables={\"z1\", \"t1\", \"Exreout1\", \"Eximout1\", \"Eyreout1\", \
+\"Eyimout1\", \"z2\", \"t2\", \"r11out2\", \"r22out2\", \"r33out2\", \
+\"r44out2\", \"r12reout2\", \"r12imout2\", \"r13reout2\", \"r13imout2\", \
+\"r14reout2\", \"r14imout2\", \"r23reout2\", \"r23imout2\", \"r24reout2\", \
+\"r24imout2\", \"r34reout2\", \"r34imout2\"}
+\
+\>", "Input"],
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{"Exout1", "=",
+ RowBox[{"Exreout1", "+",
+ RowBox[{"\[ImaginaryI]", " ", "Eximout1"}]}]}],
+ ";"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"Eyout1", "=",
+ RowBox[{"Eyreout1", "+",
+ RowBox[{"\[ImaginaryI]", " ", "Eyimout1"}]}]}],
+ ";"}], "\[IndentingNewLine]",
+ RowBox[{"ListAnimate", "@",
+ RowBox[{"Table", "[", "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"intens", "=",
+ RowBox[{
+ RowBox[{
+ RowBox[{".5", " ",
+ SuperscriptBox["10",
+ RowBox[{"-", "7"}]],
+ RowBox[{"Abs", "[", "#", "]"}]}], "&"}], "/@",
+ RowBox[{"Transpose", "@",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Exout1", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "i"}], "]"}], "]"}], ",",
+ RowBox[{"Eyout1", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "i"}], "]"}], "]"}]}], "}"}]}]}]}], ";",
+ "\[IndentingNewLine]",
+ RowBox[{"mask", "=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"If", "[",
+ RowBox[{
+ RowBox[{"#", "<", ".1"}], ",", "Null", ",", "1"}], "]"}], "&"}], "/@",
+ RowBox[{"intens", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "1"}], "]"}], "]"}]}]}], ";",
+ "\[IndentingNewLine]",
+ RowBox[{"alep", "=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"AngleEllipticity", "[",
+ RowBox[{"#", ",", "ComplexAmplitude"}], "]"}], "&"}], "/@",
+ RowBox[{"Transpose", "@",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Exout1", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "i"}], "]"}], "]"}], ",",
+ RowBox[{"Eyout1", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "i"}], "]"}], "]"}]}], "}"}]}]}]}], ";",
+ RowBox[{"ListLinePlot", "[",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Transpose", "[",
+ RowBox[{"{",
+ RowBox[{"z1", ",",
+ RowBox[{"mask", " ",
+ RowBox[{"alep", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "1"}], "]"}], "]"}]}]}], "}"}], "]"}], ",",
+ RowBox[{"Transpose", "[",
+ RowBox[{"{",
+ RowBox[{"z1", ",",
+ RowBox[{"intens", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "1"}], "]"}], "]"}]}], "}"}], "]"}]}],
+ "}"}], ",",
+ RowBox[{"PlotRange", "\[Rule]",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[Pi]"}], "/", "2"}], ",",
+ RowBox[{"\[Pi]", "/", "2"}]}], "}"}]}]}], "]"}]}], ",",
+ RowBox[{"{",
+ RowBox[{"i", ",", "1", ",",
+ RowBox[{"Length", "[", "t1", "]"}], ",", "1"}], "}"}]}],
+ "]"}]}]}], "Input"]
+}, Open ]]
+},
+WindowSize->{844, 920},
+WindowMargins->{{-4, Automatic}, {2, Automatic}},
+ShowSelection->True,
+FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (February 18, 2009)",
+StyleDefinitions->"Default.nb"
+]
+(* End of Notebook Content *)
+
+(* Internal cache information *)
+(*CellTagsOutline
+CellTagsIndex->{}
+*)
+(*CellTagsIndex
+CellTagsIndex->{}
+*)
+(*NotebookFileOutline
+Notebook[{
+Cell[CellGroupData[{
+Cell[567, 22, 66, 0, 71, "Section"],
+Cell[636, 24, 194, 7, 31, "Input"],
+Cell[833, 33, 388, 13, 57, "Input"],
+Cell[1224, 48, 194, 7, 31, "Input"],
+Cell[1421, 57, 388, 13, 57, "Input"],
+Cell[1812, 72, 403, 14, 52, "Input"],
+Cell[2218, 88, 342, 11, 49, "Input"],
+Cell[2563, 101, 582, 19, 52, "Input"],
+Cell[3148, 122, 807, 25, 72, "Input"],
+Cell[3958, 149, 602, 20, 52, "Input"],
+Cell[4563, 171, 543, 17, 83, "Input"],
+Cell[5109, 190, 524, 17, 31, "Input"],
+Cell[5636, 209, 431, 13, 52, "Input"],
+Cell[6070, 224, 413, 12, 52, "Input"]
+}, Open ]],
+Cell[CellGroupData[{
+Cell[6520, 241, 37, 0, 71, "Section"],
+Cell[6560, 243, 5029, 84, 1017, "Input"],
+Cell[11592, 329, 2767, 83, 177, "Input"]
+}, Open ]]
+}
+]
+*)
+
+(* End of internal cache information *)
diff --git a/xmds2/Genas_system/Genas_system.xmds b/xmds2/Genas_system/Genas_system.xmds
new file mode 100755
index 0000000..e855e4f
--- /dev/null
+++ b/xmds2/Genas_system/Genas_system.xmds
@@ -0,0 +1,218 @@
+<?xml version="1.0"?>
+<simulation xmds-version="2">
+
+ <name>Genas_system</name>
+
+ <author>Eugeniy Mikhailov and Simon Rochester</author>
+ <description>
+ License GPL.
+
+ Solving 4 level atom in 0->1 configuration,
+ with field propagation along spatial axis Z
+ no Doppler broadening
+
+ We are solving
+ dE/dz+(1/c)*dE/dt=i*eta*rho_ij, where j level is higher then i.
+ Note that E is actually a Rabi frequency of electromagnetic field not the EM field
+ in xmds terms it looks like
+ dE_dz = i*eta*rhoij - 1/c*L[E], here we moved t dependence to Fourier space
+
+ VERY IMPORTANT: all Rabi frequency should be given in [1/s], if you want to
+ normalize it to something else look drho/dt equation.
+ No need to renormalizes eta as long as its express through i
+ the upper level decay rate in the same units as Rabi frequency.
+ </description>
+
+ <features>
+ <globals>
+ <![CDATA[
+ const double pi = M_PI;
+ const double c=3.e8;
+ const double lambda=794.7e-9; //wavelength in m
+ const double N=1e6*(1e6); //number of particles per cubic m i.e. density
+ const double Gamma=6*(2*M_PI*1e6); // characteristic decay rate of upper level used for eta calculations expressed in [1/s]
+ const double eta = 3*lambda*lambda*N*Gamma/16.0/M_PI; // eta constant in the wave equation for Rabi frequency. Units are [1/(m s)]
+
+ // repopulation rate (atoms flying in/out the laser beam) in [1/s]
+ const double gt=0.01*(2*M_PI*1e6);
+ // Natural linewidth of upper state in [1/s]
+ const double g0=1.*(2*M_PI*1e6);
+
+ complex Exc, Eyc; // Complex-conjugated Rabi frequency
+
+ complex r21, r31, r41, r32, r42, r43, r44; // density matrix elements
+ ]]>
+ </globals>
+ <benchmark />
+ <arguments>
+ <!-- Real and imaginary parts of complex Rabi frequency in [1/s] -->
+ <argument name="ExReo" type="real" default_value="(3.+0.001)*(2*M_PI*1.e6)" />
+ <argument name="ExImo" type="real" default_value="0." />
+ <argument name="EyReo" type="real" default_value="0." />
+ <argument name="EyImo" type="real" default_value="(3.-0.001)*(2*M_PI*1.e6)" />
+ <!-- light detuning in [1/s] -->
+ <argument name="delta" type="real" default_value="3.0*(2*M_PI*1e6)" />
+ <!--shift of upper-state M=0 sublevel-->
+ <argument name="delta0" type="real" default_value="1.*(2*M_PI*1e6)" />
+ <!--Static B-field Larmor frequency-->
+ <argument name="OL" type="real" default_value="4.*(2*M_PI*1e6)" />
+ <!--rf Rabi frequency-->
+ <argument name="Orf" type="real" default_value="0.1*(2*M_PI*1e6)" />
+ <!--rf frequency-->
+ <argument name="orf" type="real" default_value="4.*(2*M_PI*1e6)" />
+ </arguments>
+ <bing />
+ <fftw plan="patient" />
+ <openmp />
+ <auto_vectorise />
+ </features>
+
+ <!-- 'z' and 't' to have dimensions [m] and [s] -->
+ <geometry>
+ <propagation_dimension> z </propagation_dimension>
+ <transverse_dimensions>
+ <dimension name="t" lattice="1000" domain="(-1.5e-7, 2.5e-7)" />
+ </transverse_dimensions>
+ </geometry>
+
+ <!-- Rabi frequency -->
+ <vector name="E_field" type="complex" initial_space="t">
+ <components>Ex Ey</components>
+ <initialisation>
+ <![CDATA[
+ // Initial (at starting 'z' position) electromagnetic field does not depend on detuning
+ // as well as time
+ Ex=(ExReo+i*ExImo)*exp(-pow( ((t-0.0)/1e-7),2) );
+ Ey=(EyReo+i*EyImo)*exp(-pow( ((t-0.0)/1e-7),2) );
+ ]]>
+ </initialisation>
+ </vector>
+
+ <vector name="density_matrix" type="complex" initial_space="t">
+ <components>r11 r22 r33 r12 r13 r14 r23 r24 r34 r44</components>
+ <initialisation>
+ <![CDATA[
+ r11 = 1; r22 = 0; r33 = 0; r44 = 0;
+ r12 = 0; r13 = 0; r14 = 0;
+ r23 = 0; r24 = 0;
+ r34 = 0;
+ ]]>
+ </initialisation>
+ </vector>
+
+ <vector name="rfField" type="real">
+ <components> rf </components>
+ <initialisation>
+ <![CDATA[
+ rf = Orf*sin(orf*t);
+ ]]>
+ </initialisation>
+ </vector>
+
+ <sequence>
+ <integrate algorithm="ARK45" tolerance="0.05e-7" interval="1e1">
+ <samples>200 200</samples>
+ <operators>
+ <operator kind="cross_propagation" algorithm="SI" propagation_dimension="t">
+ <integration_vectors>density_matrix</integration_vectors>
+ <dependencies>E_field rfField</dependencies>
+ <boundary_condition kind="left">
+ <![CDATA[
+ r11 = 1; r22 = 0; r33 = 0; r44 = 0;
+ r12 = 0; r13 = 0; r14 = 0;
+ r23 = 0; r24 = 0;
+ r34 = 0;
+ ]]>
+ </boundary_condition>
+ <![CDATA[
+ Exc = conj(Ex);
+ Eyc = conj(Ey);
+
+ r21=conj(r12);
+ r31=conj(r13);
+ r41=conj(r14);
+ r32=conj(r23);
+ r42=conj(r24);
+ r43=conj(r34);
+
+ // Equations of motions according to Simon's mathematica code
+ dr11_dt = gt - gt*r11 + (-Ey - Ex*i)*r12 + i*(Ex + Ey*i)*r14 + i*(Exc + Eyc*i)*r21 + (-Eyc - Exc*i)*r41 + g0*(r22 + r33 + r44);
+ dr12_dt = (2*(Eyc - Exc*i)*r11 - i*((2*delta - (g0 + 2*gt)*i - 2*OL - 2*rf)*r12 - 2*(Exc + Eyc*i)*r22 + 2*(Exc - Eyc*i)*r42))/2.;
+ dr13_dt = (-g0/2. - gt - delta*i + delta0*i)*r13 + i*(Exc + Eyc*i)*r23 + (-Eyc - Exc*i)*r43;
+ dr14_dt = -(i*((2*delta - (g0 + 2*gt)*i + 2*OL + 2*rf)*r14 - 2*(Exc + Eyc*i)*r24 - 2*(Exc - Eyc*i)*(r11 - r44)))/2.;
+ dr22_dt = (Ey + Ex*i)*r12 + (Eyc - Exc*i)*r21 - (g0 + gt)*r22;
+ dr23_dt = (Ey + Ex*i)*r13 + i*(delta0 + i*(g0 + gt + i*OL) - rf)*r23;
+ dr24_dt = (Ey + Ex*i)*r14 + (Eyc + Exc*i)*r21 - (g0 + gt + 2*i*OL + 2*i*rf)*r24;
+ dr33_dt = -((g0 + gt)*r33);
+ dr34_dt = (Eyc + Exc*i)*r31 - i*(delta0 - (g0 + gt)*i + OL + rf)*r34;
+ dr44_dt = (Ey - Ex*i)*r14 + (Eyc + Exc*i)*r41 - (g0 + gt)*r44;
+ ]]>
+ </operator>
+ <operator kind="ex" constant="yes">
+ <operator_names>Lt</operator_names>
+ <![CDATA[
+ Lt = i*1./c*kt;
+ ]]>
+ </operator>
+ <integration_vectors>E_field</integration_vectors>
+ <dependencies>density_matrix</dependencies>
+ <![CDATA[
+ dEx_dz = i*eta*conj(r12-r14) - Lt[Ex] ;
+ dEy_dz = -eta*conj(r12+r14) - Lt[Ey] ;
+ ]]>
+ </operators>
+ </integrate>
+ </sequence>
+
+ <!-- The output to generate -->
+ <output format="binary" filename="Genas_system.xsil">
+ <group>
+ <sampling basis="t(100)" initial_sample="yes">
+ <dependencies>E_field</dependencies>
+ <moments>Ex_re_out Ex_im_out Ey_re_out Ey_im_out</moments>
+ <![CDATA[
+ Ex_re_out = Ex.Re();
+ Ex_im_out = Ex.Im();
+ Ey_re_out = Ey.Re();
+ Ey_im_out = Ey.Im();
+ ]]>
+ </sampling>
+ </group>
+
+ <group>
+ <sampling basis="t(100)" initial_sample="yes">
+ <dependencies>density_matrix</dependencies>
+ <moments>
+ r11_out r22_out r33_out r44_out
+ r12_re_out r12_im_out r13_re_out r13_im_out r14_re_out r14_im_out
+ r23_re_out r23_im_out r24_re_out r24_im_out
+ r34_re_out r34_im_out
+ </moments>
+ <![CDATA[
+ // populations output
+ r11_out = r11.Re();
+ r22_out = r22.Re();
+ r33_out = r33.Re();
+ r44_out = r44.Re();
+ // coherences output
+ r12_re_out = r12.Re();
+ r12_im_out = r12.Im();
+ r13_re_out = r13.Re();
+ r13_im_out = r13.Im();
+ r14_re_out = r14.Re();
+ r14_im_out = r14.Im();
+ r23_re_out = r23.Re();
+ r23_im_out = r23.Im();
+ r24_re_out = r24.Re();
+ r24_im_out = r24.Im();
+ r34_re_out = r34.Re();
+ r34_im_out = r34.Im();
+ ]]>
+ </sampling>
+ </group>
+ </output>
+</simulation>
+
+<!--
+vim: ts=2 sw=2 foldmethod=indent:
+-->
diff --git a/xmds2/Genas_system/GenerateGenasSystem.nb b/xmds2/Genas_system/GenerateGenasSystem.nb
new file mode 100755
index 0000000..ab9069b
--- /dev/null
+++ b/xmds2/Genas_system/GenerateGenasSystem.nb
@@ -0,0 +1,2722 @@
+(* Content-type: application/mathematica *)
+
+(*** Wolfram Notebook File ***)
+(* http://www.wolfram.com/nb *)
+
+(* CreatedBy='Mathematica 7.0' *)
+
+(*CacheID: 234*)
+(* Internal cache information:
+NotebookFileLineBreakTest
+NotebookFileLineBreakTest
+NotebookDataPosition[ 145, 7]
+NotebookDataLength[ 92628, 2713]
+NotebookOptionsPosition[ 89973, 2618]
+NotebookOutlinePosition[ 90340, 2634]
+CellTagsIndexPosition[ 90297, 2631]
+WindowFrame->Normal*)
+
+(* Beginning of Notebook Content *)
+Notebook[{
+
+Cell[CellGroupData[{
+Cell["setup the system", "Section"],
+
+Cell["This loads the package.", "MathCaption",
+ CellID->836781195],
+
+Cell[BoxData[
+ RowBox[{"<<", "AtomicDensityMatrix`"}]], "Input",
+ CellID->2058623809],
+
+Cell[TextData[{
+ "We define an atomic system consisting of two even-parity lower states and \
+two odd-parity upper states. We apply a light field with components at \
+frequencies ",
+ Cell[BoxData[
+ FormBox[
+ StyleBox[
+ SubscriptBox["\[Omega]", "1"], "InlineMath"], TraditionalForm]]],
+ " (near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "1"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition), ",
+ Cell[BoxData[
+ FormBox[
+ StyleBox[
+ SubscriptBox["\[Omega]", "2"], "InlineMath"], TraditionalForm]]],
+ " (near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition), and ",
+ Cell[BoxData[
+ FormBox[
+ StyleBox[
+ SubscriptBox["\[Omega]", "c"], "InlineMath"], TraditionalForm]]],
+ " (near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "4"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition)."
+}], "Text",
+ CellID->525777075],
+
+Cell["Define the atomic system.", "MathCaption",
+ CellID->429217524],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"system", "=",
+ RowBox[{"Sublevels", "[",
+ RowBox[{"{", "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"AtomicState", "[",
+ RowBox[{"1", ",",
+ RowBox[{"J", "\[Rule]", "0"}], ",",
+ RowBox[{"L", "\[Rule]", "0"}], ",",
+ RowBox[{"S", "\[Rule]", "0"}], ",",
+ RowBox[{"NaturalWidth", "\[Rule]", "0"}], ",",
+ RowBox[{"Energy", "\[Rule]", "0"}], ",",
+ RowBox[{
+ RowBox[{"Polarizability", "[", "0", "]"}], "\[Rule]", "0"}]}], "]"}],
+ ",", "\[IndentingNewLine]",
+ RowBox[{"AtomicState", "[",
+ RowBox[{"2", ",",
+ RowBox[{"J", "\[Rule]", "1"}], ",",
+ RowBox[{"L", "\[Rule]", "1"}], ",",
+ RowBox[{"S", "\[Rule]", "0"}], ",",
+ RowBox[{"NaturalWidth", "\[Rule]", "\[CapitalGamma]"}], ",",
+ RowBox[{"Energy", "\[Rule]", "\[Omega]0"}], ",",
+ RowBox[{
+ RowBox[{"Polarizability", "[", "0", "]"}], "\[Rule]",
+ RowBox[{
+ RowBox[{"-", "2"}], "/", "3"}]}], ",",
+ RowBox[{
+ RowBox[{"Polarizability", "[", "2", "]"}], "\[Rule]",
+ RowBox[{"2", "/", "3"}]}], ",",
+ RowBox[{
+ RowBox[{"BranchingRatio", "[", "1", "]"}], "\[Rule]", "1"}]}],
+ "]"}]}], "\[IndentingNewLine]", "}"}], "]"}]}], ";"}]], "Input",
+ CellID->433132487],
+
+Cell["Define the optical field ", "MathCaption",
+ CellID->133602844],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"field", "=",
+ RowBox[{
+ FractionBox[
+ RowBox[{"2",
+ SqrtBox["6"]}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]],
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]Rx"}], " ", ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]Ry"}], " ", ",", "0"}], "}"}]}]}]], "Input",
+ CellID->26742303],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ FractionBox[
+ RowBox[{"2", " ",
+ SqrtBox["6"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]Rx"}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]], ",",
+ FractionBox[
+ RowBox[{"2", " ",
+ SqrtBox["6"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]Ry"}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]], ",", "0"}],
+ "}"}]], "Output"]
+}, Open ]],
+
+Cell["\<\
+The Hamiltonian for the system subject to the optical field.\
+\>", "MathCaption",
+ CellID->462076121],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"MatrixForm", "[",
+ RowBox[{"H", "=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"Expand", "@",
+ RowBox[{"Hamiltonian", "[",
+ RowBox[{"system", ",",
+ RowBox[{"ElectricField", "\[Rule]", "field"}], ",",
+ RowBox[{"MagneticField", "\[Rule]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"0", ",", "0", ",",
+ RowBox[{"\[CapitalOmega]L", "+",
+ RowBox[{"\[CapitalOmega]rf", " ",
+ RowBox[{"Sin", "[",
+ RowBox[{"\[Omega]rf", " ", "t"}], "]"}]}]}]}], "}"}], "/",
+ "BohrMagneton"}]}]}], "]"}]}], "+",
+ RowBox[{"Hamiltonian", "[",
+ RowBox[{"system", ",",
+ RowBox[{"ElectricField", "\[Rule]",
+ RowBox[{"{",
+ RowBox[{"0", ",", "0", ",",
+ SqrtBox["\[CapitalDelta]0"]}], "}"}]}], ",",
+ RowBox[{"Interaction", "\[Rule]",
+ RowBox[{"{", "Polarizability", "}"}]}]}], "]"}]}], "//",
+ "FullSimplify"}]}], "]"}]], "Input",
+ CellID->494599775],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"0",
+ RowBox[{
+ RowBox[{"-", "2"}], " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"\[CapitalOmega]Rx", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]Ry", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}]}], ")"}]}], "0",
+ RowBox[{
+ RowBox[{"2", " ", "\[CapitalOmega]Rx", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}], "-",
+ RowBox[{"2", " ", "\[ImaginaryI]", " ", "\[CapitalOmega]Ry", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "2"}], " ", "\[CapitalOmega]Rx", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}], "+",
+ RowBox[{"2", " ", "\[ImaginaryI]", " ", "\[CapitalOmega]Ry", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}]}],
+ RowBox[{"\[Omega]0", "+", "\[CapitalOmega]L", "+",
+ RowBox[{"\[CapitalOmega]rf", " ",
+ RowBox[{"Sin", "[",
+ RowBox[{"t", " ", "\[Omega]rf"}], "]"}]}]}], "0", "0"},
+ {"0", "0",
+ RowBox[{"\[CapitalDelta]0", "+", "\[Omega]0"}], "0"},
+ {
+ RowBox[{
+ RowBox[{"2", " ", "\[CapitalOmega]Rx", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]x", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}], "+",
+ RowBox[{"2", " ", "\[ImaginaryI]", " ", "\[CapitalOmega]Ry", " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]y", "-",
+ RowBox[{"t", " ", "\[Omega]"}]}], "]"}]}]}], "0", "0",
+ RowBox[{"\[Omega]0", "-", "\[CapitalOmega]L", "-",
+ RowBox[{"\[CapitalOmega]rf", " ",
+ RowBox[{"Sin", "[",
+ RowBox[{"t", " ", "\[Omega]rf"}], "]"}]}]}]}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]]], "Output"]
+}, Open ]],
+
+Cell["The level diagram for the system.", "MathCaption",
+ CellID->358620443],
+
+Cell[BoxData[
+ RowBox[{"LevelDiagram", "[",
+ RowBox[{"system", ",",
+ RowBox[{"H", "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[Omega]0", "\[Rule]", "1"}], ",",
+ RowBox[{"\[CapitalOmega]rf", "\[Rule]", "0"}], ",",
+ RowBox[{"\[CapitalOmega]L", "\[Rule]", ".3"}], ",",
+ RowBox[{"\[CapitalDelta]0", "\[Rule]", ".2"}]}], "}"}]}]}],
+ "]"}]], "Input",
+ CellID->167259034],
+
+Cell["Apply the rotating-wave approximation to the Hamiltonian.", \
+"MathCaption",
+ CellID->577766068],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{"Hrwa", "=",
+ RowBox[{
+ RowBox[{"RotatingWaveApproximation", "[",
+ RowBox[{"system", ",", "H", ",", "\[Omega]"}], "]"}], "/.",
+ RowBox[{"\[Omega]", "\[Rule]",
+ RowBox[{"\[Omega]0", "+", "\[CapitalDelta]"}]}]}]}], ")"}], "//",
+ "MatrixForm"}]], "Input"],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"0",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]]}], " ",
+ "\[CapitalOmega]Rx"}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry"}]}], "0",
+ RowBox[{
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx"}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry"}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]]}], " ",
+ "\[CapitalOmega]Rx"}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry"}]}],
+ RowBox[{
+ RowBox[{"-", "\[CapitalDelta]"}], "+", "\[CapitalOmega]L", "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf"}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf"}]}], "0", "0"},
+ {"0", "0",
+ RowBox[{
+ RowBox[{"-", "\[CapitalDelta]"}], "+", "\[CapitalDelta]0"}], "0"},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx"}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry"}]}], "0", "0",
+ RowBox[{
+ RowBox[{"-", "\[CapitalDelta]"}], "-", "\[CapitalOmega]L", "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf"}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf"}]}]}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]]], "Output"]
+}, Open ]],
+
+Cell[TextData[{
+ Cell[BoxData[
+ ButtonBox["IntrinsicRelaxation",
+ BaseStyle->"Link",
+ ButtonData->"paclet:AtomicDensityMatrix/ref/IntrinsicRelaxation"]]],
+ " and ",
+ Cell[BoxData[
+ ButtonBox["TransitRelaxation",
+ BaseStyle->"Link",
+ ButtonData->"paclet:AtomicDensityMatrix/ref/TransitRelaxation"]]],
+ " supply the relaxation matrices."
+}], "MathCaption",
+ CellID->610306692],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"MatrixForm", "[",
+ RowBox[{"relax", "=",
+ RowBox[{
+ RowBox[{"IntrinsicRelaxation", "[", "system", "]"}], "+",
+ RowBox[{"TransitRelaxation", "[",
+ RowBox[{"system", ",", "\[Gamma]t"}], "]"}]}]}], "]"}]], "Input",
+ CellID->645617687],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"\[Gamma]t", "0", "0", "0"},
+ {"0",
+ RowBox[{"\[CapitalGamma]", "+", "\[Gamma]t"}], "0", "0"},
+ {"0", "0",
+ RowBox[{"\[CapitalGamma]", "+", "\[Gamma]t"}], "0"},
+ {"0", "0", "0",
+ RowBox[{"\[CapitalGamma]", "+", "\[Gamma]t"}]}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]]], "Output"]
+}, Open ]],
+
+Cell["Remove explict time dependence from the density matrix.", "MathCaption",
+ CellID->690131918],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"SetOptions", "[",
+ RowBox[{"DensityMatrix", ",",
+ RowBox[{"TimeDependence", "\[Rule]", "False"}], ",",
+ RowBox[{"ComplexExpandVariables", "\[Rule]", "False"}]}], "]"}]], "Input",
+ CellID->718931880],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"TimeDependence", "\[Rule]", "False"}], ",",
+ RowBox[{"Representation", "\[Rule]", "Zeeman"}], ",",
+ RowBox[{"DMSymbol", "\[Rule]", "\[Rho]"}], ",",
+ RowBox[{"Label", "\[Rule]", "None"}], ",",
+ RowBox[{"ComplexExpandVariables", "\[Rule]", "False"}], ",",
+ RowBox[{"TimeVariable", "\[Rule]", "t"}]}], "}"}]], "Output",
+ ImageSize->{432, 33},
+ ImageMargins->{{0, 0}, {0, 0}},
+ ImageRegion->{{0, 1}, {0, 1}}]
+}, Open ]],
+
+Cell[TextData[{
+ Cell[BoxData[
+ ButtonBox["OpticalRepopulation",
+ BaseStyle->"Link",
+ ButtonData->"paclet:AtomicDensityMatrix/ref/OpticalRepopulation"]]],
+ " and ",
+ Cell[BoxData[
+ ButtonBox["TransitRepopulation",
+ BaseStyle->"Link",
+ ButtonData->"paclet:AtomicDensityMatrix/ref/TransitRepopulation"]]],
+ " supply the repopulation matrices."
+}], "MathCaption",
+ CellID->854192725],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"MatrixForm", "[",
+ RowBox[{"repop", "=",
+ RowBox[{
+ RowBox[{
+ RowBox[{"OpticalRepopulation", "[", "system", "]"}], "+",
+ RowBox[{"TransitRepopulation", "[",
+ RowBox[{"system", ",", "\[Gamma]t"}], "]"}]}], "/.",
+ RowBox[{
+ RowBox[{"BranchingRatio", "[",
+ RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]",
+ SubscriptBox["R",
+ RowBox[{"a", ",", "b"}]]}]}]}], "]"}]], "Input",
+ CellID->465762594],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {
+ RowBox[{"\[Gamma]t", "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}], "0", "0", "0"},
+ {"0", "0", "0", "0"},
+ {"0", "0", "0", "0"},
+ {"0", "0", "0", "0"}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]]], "Output"]
+}, Open ]],
+
+Cell["Here are the evolution equations.", "MathCaption",
+ CellID->314466782],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"TableForm", "[",
+ RowBox[{
+ RowBox[{"eqs", "=",
+ RowBox[{
+ RowBox[{"LiouvilleEquation", "[",
+ RowBox[{"system", ",", "Hrwa", ",", "relax", ",", "repop"}], "]"}], "//",
+ "Expand"}]}], ",",
+ RowBox[{"TableHeadings", "\[Rule]",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"DMVariables", "[", "system", "]"}], ",", "None"}], "}"}]}]}],
+ "]"}]], "Input",
+ CellID->298399236],
+
+Cell[BoxData[
+ TagBox[
+ TagBox[GridBox[{
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{"\[Gamma]t", "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"2", " ", "\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[CapitalGamma]"}], " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{"2", " ", "\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "-",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalDelta]0", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[CapitalOmega]L", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ", "\[Omega]rf"}]],
+ " ", "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "t", " ", "\[Omega]rf"}]], " ",
+ "\[CapitalOmega]rf", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",", "0"}], "}"}]}]]}]}]}]},
+ {
+ TagBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]],
+ HoldForm],
+ RowBox[{"0", "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "+",
+ RowBox[{"\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[CapitalOmega]Rx", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "+",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[CapitalOmega]Ry", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}]}]]}]}]}]}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxDividers->{
+ "Columns" -> {False, {True}, False}, "ColumnsIndexed" -> {},
+ "Rows" -> {{False}}, "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.5599999999999999]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}],
+ OutputFormsDump`HeadedColumn],
+ Function[BoxForm`e$,
+ TableForm[BoxForm`e$, TableHeadings -> {{
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {1, 0}, {1, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {1, 0}, {2, 1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {1, 0}, {2, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {1, 0}, {2, -1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 1}, {1, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 1}, {2, 1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 1}, {2, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 1}, {2, -1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 0}, {1, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 0}, {2, 1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 0}, {2, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, 0}, {2, -1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, -1}, {1, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, -1}, {2, 1}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, -1}, {2, 0}],
+ Subscript[AtomicDensityMatrix`DensityMatrix`\[Rho], {2, -1}, {2, -1}]},
+ None}]]]], "Output"]
+}, Open ]],
+
+Cell["Convert to c form.", "Text"],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{"MapThread", "[",
+ RowBox[{"Equal", ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"DMVariables", "[", "system", "]"}], "/.",
+ RowBox[{"\[Rho]", "\[Rule]", "dr"}]}], ",",
+ RowBox[{"Collect", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"eqs", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]x"}]], " ", "\[Rule]",
+ RowBox[{"Ex", "/", "\[CapitalOmega]Rx"}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]x"}]], " ",
+ "\[Rule]",
+ RowBox[{"Exc", "/", "\[CapitalOmega]Rx"}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]y"}]], " ", "\[Rule]",
+ RowBox[{"Ey", "/", "\[CapitalOmega]Ry"}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]y"}]], " ",
+ "\[Rule]",
+ RowBox[{"Eyc", "/", "\[CapitalOmega]Ry"}]}], ",", " ",
+ RowBox[{"\[Gamma]t", "\[Rule]", "gt"}], ",",
+ RowBox[{"\[CapitalGamma]", "\[Rule]", "g0"}], ",",
+ RowBox[{"\[CapitalDelta]0", "\[Rule]", "delta0"}], ",",
+ RowBox[{"\[CapitalDelta]", "\[Rule]", "delta"}], ",",
+ RowBox[{"\[CapitalOmega]L", "\[Rule]", "OL"}], ",",
+ RowBox[{"\[CapitalOmega]rf", "\[Rule]", "Orf"}], ",",
+ RowBox[{"\[Omega]rf", "\[Rule]", "orf"}]}], "}"}]}], "/.",
+ RowBox[{"\[Rho]", "\[Rule]", "r"}]}], ",",
+ RowBox[{"DMElementPattern", "[", "]"}], ",", "FullSimplify"}],
+ "]"}]}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"%", "/.", " ",
+ RowBox[{
+ RowBox[{"Orf", " ",
+ RowBox[{"Sin", "[",
+ RowBox[{"orf", " ", "t"}], "]"}]}], "\[Rule]", "rf"}]}], "/.",
+ RowBox[{
+ RowBox[{"Complex", "[",
+ RowBox[{"0", ",", "a_"}], "]"}], "\[Rule]",
+ RowBox[{"a", " ", "i"}]}]}], "/.",
+ RowBox[{"Table", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Label", "[",
+ RowBox[{"system", "[",
+ RowBox[{"[", "i", "]"}], "]"}], "]"}], ",",
+ RowBox[{"M", "[",
+ RowBox[{"system", "[",
+ RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "}"}], "\[Rule]", "i"}],
+ ",",
+ RowBox[{"{",
+ RowBox[{"i", ",",
+ RowBox[{"Length", "[", "system", "]"}]}], "}"}]}], "]"}]}],
+ ";"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"DeleteCases", "[",
+ RowBox[{"%", ",",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"a_", ",", "b_"}]], "\[Equal]", "_"}], "/;",
+ RowBox[{"b", "<", "a"}]}]}], "]"}], ";"}], "\[IndentingNewLine]",
+ RowBox[{"StringJoin", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"StringReplace", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"ToString", "@",
+ RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
+ RowBox[{
+ RowBox[{
+ "\"\<Subscript(dr,\>\"", "~~", "a_", "~~", "\"\<,\>\"", "~~", "b_",
+ "~~", "\"\<)\>\""}], ":>",
+ RowBox[{"\"\<dr\>\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}],
+ ",",
+ RowBox[{
+ RowBox[{
+ "\"\<Subscript(\>\"", "~~", "r_", "~~", "\"\<,\>\"", "~~", "a_",
+ "~~", "\"\<,\>\"", "~~", "b_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"r", "<>", "a", "<>", "b"}]}]}], "}"}]}], "]"}], "&"}], "/@",
+ "%"}], "]"}], "\[IndentingNewLine]",
+ RowBox[{"Export", "[",
+ RowBox[{
+ RowBox[{"ToFileName", "[",
+ RowBox[{
+ RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\<code.txt\>\""}],
+ "]"}], ",", "%"}], "]"}]}], "Input"],
+
+Cell[BoxData["\<\"dr11_dt = gt - gt*r11 + (-Ey - Ex*i)*r12 + i*(Ex + \
+Ey*i)*r14 + i*(Exc + Eyc*i)*r21 + (-Eyc - Exc*i)*r41 + g0*(r22 + r33 + \
+r44);\\ndr12_dt = (2*(Eyc - Exc*i)*r11 - i*((2*delta - (g0 + 2*gt)*i - 2*OL - \
+2*rf)*r12 - 2*(Exc + Eyc*i)*r22 + 2*(Exc - Eyc*i)*r42))/2.;\\ndr13_dt = \
+(-g0/2. - gt - delta*i + delta0*i)*r13 + i*(Exc + Eyc*i)*r23 + (-Eyc - \
+Exc*i)*r43;\\ndr14_dt = -(i*((2*delta - (g0 + 2*gt)*i + 2*OL + 2*rf)*r14 - \
+2*(Exc + Eyc*i)*r24 - 2*(Exc - Eyc*i)*(r11 - r44)))/2.;\\ndr22_dt = (Ey + \
+Ex*i)*r12 + (Eyc - Exc*i)*r21 - (g0 + gt)*r22;\\ndr23_dt = (Ey + Ex*i)*r13 + \
+i*(delta0 + i*(g0 + gt + i*OL) - rf)*r23;\\ndr24_dt = (Ey + Ex*i)*r14 + (Eyc \
++ Exc*i)*r21 - (g0 + gt + 2*i*OL + 2*i*rf)*r24;\\ndr33_dt = -((g0 + gt)*r33);\
+\\ndr34_dt = (Eyc + Exc*i)*r31 - i*(delta0 - (g0 + gt)*i + OL + \
+rf)*r34;\\ndr44_dt = (Ey - Ex*i)*r14 + (Eyc + Exc*i)*r41 - (g0 + \
+gt)*r44;\\n\"\>"], "Output"],
+
+Cell[BoxData["\<\"C:\\\\cygwin\\\\home\\\\Simon\\\\Nresonances\\\\xmds2\\\\\
+Gena_system\\\\code.txt\"\>"], "Output"]
+}, Open ]],
+
+Cell["Find medium polarization", "Text"],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"TensorForm", "[",
+ RowBox[{"dcart", "=",
+ RowBox[{"Most", "@",
+ RowBox[{"ToCartesian", "@",
+ RowBox[{"WignerEckart", "[",
+ RowBox[{"system", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}]}], "]"}]}]}]}], "]"}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"0",
+ FractionBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}],
+ SqrtBox["6"]], "0",
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}],
+ SqrtBox["6"]]}]},
+ {
+ FractionBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}],
+ SqrtBox["6"]], "0", "0", "0"},
+ {"0", "0", "0", "0"},
+ {
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}],
+ SqrtBox["6"]]}], "0", "0", "0"}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {},
+ "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]], ",",
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"0",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]}],
+ SqrtBox["6"]], "0",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]}],
+ SqrtBox["6"]]},
+ {
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]}],
+ SqrtBox["6"]]}], "0", "0", "0"},
+ {"0", "0", "0", "0"},
+ {
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}]}],
+ SqrtBox["6"]]}], "0", "0", "0"}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Center}}, "ColumnsIndexed" -> {},
+ "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.7]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
+ Function[BoxForm`e$,
+ MatrixForm[BoxForm`e$]]]}], "}"}]], "Output"]
+}, Open ]],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ "4", "\[Pi]", " ", "\[ImaginaryI]", " ", "\[Omega]0", " ", "n", " ",
+ FractionBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}],
+ RowBox[{"2",
+ SqrtBox["6"]}]], " ",
+ RowBox[{"Sum", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"DensityMatrix", "[", "system", "]"}], "[",
+ RowBox[{"[",
+ RowBox[{"i", ",", "j"}], "]"}], "]"}],
+ RowBox[{"#", "[",
+ RowBox[{"[",
+ RowBox[{"j", ",", "i"}], "]"}], "]"}]}], ",",
+ RowBox[{"{",
+ RowBox[{"i", ",",
+ RowBox[{"Length", "[", "system", "]"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"j", ",", "i"}], "}"}]}], "]"}]}], "&"}], "/@", "dcart"}], "//",
+ "Simplify"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"ExpandDipoleRME", "[",
+ RowBox[{"system", ",", "%"}], " ", "]"}], "/.",
+ RowBox[{"\[Omega]0", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"\[Pi]", "/", "\[Lambda]"}]}]}]}], "//",
+ "Simplify"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"%", " ",
+ RowBox[{"eta", "/",
+ RowBox[{"(",
+ FractionBox[
+ RowBox[{"3", " ", "n", " ", "\[CapitalGamma]", " ",
+ SuperscriptBox["\[Lambda]", "2"], " "}],
+ RowBox[{"16", " ", "\[Pi]"}]], ")"}]}]}], "/.",
+ RowBox[{"Table", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"Label", "[",
+ RowBox[{"system", "[",
+ RowBox[{"[", "i", "]"}], "]"}], "]"}], ",",
+ RowBox[{"M", "[",
+ RowBox[{"system", "[",
+ RowBox[{"[", "i", "]"}], "]"}], "]"}]}], "}"}], "\[Rule]", "i"}],
+ ",",
+ RowBox[{"{",
+ RowBox[{"i", ",",
+ RowBox[{"Length", "[", "system", "]"}]}], "}"}]}], "]"}]}], "/.",
+ RowBox[{"\[Rho]", "\[Rule]", "r"}]}]}], "Input"],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "3"]}], " ", "\[ImaginaryI]", " ", "n", " ", "\[Pi]",
+ " ", "\[Omega]0", " ",
+ SuperscriptBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}], "2"], " ",
+ RowBox[{"(",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]], "-",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], ")"}]}], ",",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "3"]}], " ", "n", " ", "\[Pi]", " ", "\[Omega]0", " ",
+ SuperscriptBox[
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "2"}], "]"}], "2"], " ",
+ RowBox[{"(",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]], "+",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], ")"}]}]}], "}"}]], "Output"],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"3", " ", "\[ImaginaryI]", " ", "n", " ", "\[CapitalGamma]", " ",
+ SuperscriptBox["\[Lambda]", "2"], " ",
+ RowBox[{"(",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]], "-",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], ")"}]}],
+ RowBox[{"16", " ", "\[Pi]"}]]}], ",",
+ RowBox[{"-",
+ FractionBox[
+ RowBox[{"3", " ", "n", " ", "\[CapitalGamma]", " ",
+ SuperscriptBox["\[Lambda]", "2"], " ",
+ RowBox[{"(",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",",
+ RowBox[{"-", "1"}]}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]], "+",
+ SubscriptBox["\[Rho]",
+ RowBox[{
+ RowBox[{"{",
+ RowBox[{"2", ",", "1"}], "}"}], ",",
+ RowBox[{"{",
+ RowBox[{"1", ",", "0"}], "}"}]}]]}], ")"}]}],
+ RowBox[{"16", " ", "\[Pi]"}]]}]}], "}"}]], "Output"],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "eta", " ",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "+",
+ SubscriptBox["r",
+ RowBox[{"4", ",", "1"}]]}], ")"}]}], ",",
+ RowBox[{
+ RowBox[{"-", "eta"}], " ",
+ RowBox[{"(",
+ RowBox[{
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]], "+",
+ SubscriptBox["r",
+ RowBox[{"4", ",", "1"}]]}], ")"}]}]}], "}"}]], "Output"]
+}, Open ]]
+}, Open ]]
+},
+WindowSize->{871, 917},
+WindowMargins->{{67, Automatic}, {Automatic, -11}},
+ShowSelection->True,
+FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (February 18, 2009)",
+StyleDefinitions->"Default.nb"
+]
+(* End of Notebook Content *)
+
+(* Internal cache information *)
+(*CellTagsOutline
+CellTagsIndex->{}
+*)
+(*CellTagsIndex
+CellTagsIndex->{}
+*)
+(*NotebookFileOutline
+Notebook[{
+Cell[CellGroupData[{
+Cell[567, 22, 35, 0, 71, "Section"],
+Cell[605, 24, 66, 1, 43, "MathCaption",
+ CellID->836781195],
+Cell[674, 27, 85, 2, 31, "Input",
+ CellID->2058623809],
+Cell[762, 31, 1290, 44, 65, "Text",
+ CellID->525777075],
+Cell[2055, 77, 68, 1, 43, "MathCaption",
+ CellID->429217524],
+Cell[2126, 80, 1346, 33, 112, "Input",
+ CellID->433132487],
+Cell[3475, 115, 68, 1, 43, "MathCaption",
+ CellID->133602844],
+Cell[CellGroupData[{
+Cell[3568, 120, 818, 26, 53, "Input",
+ CellID->26742303],
+Cell[4389, 148, 922, 29, 52, "Output"]
+}, Open ]],
+Cell[5326, 180, 111, 3, 43, "MathCaption",
+ CellID->462076121],
+Cell[CellGroupData[{
+Cell[5462, 187, 1015, 27, 126, "Input",
+ CellID->494599775],
+Cell[6480, 216, 2675, 68, 72, "Output"]
+}, Open ]],
+Cell[9170, 287, 76, 1, 43, "MathCaption",
+ CellID->358620443],
+Cell[9249, 290, 400, 11, 31, "Input",
+ CellID->167259034],
+Cell[9652, 303, 102, 2, 43, "MathCaption",
+ CellID->577766068],
+Cell[CellGroupData[{
+Cell[9779, 309, 330, 9, 31, "Input"],
+Cell[10112, 320, 3369, 89, 96, "Output"]
+}, Open ]],
+Cell[13496, 412, 384, 12, 43, "MathCaption",
+ CellID->610306692],
+Cell[CellGroupData[{
+Cell[13905, 428, 272, 7, 31, "Input",
+ CellID->645617687],
+Cell[14180, 437, 814, 22, 72, "Output"]
+}, Open ]],
+Cell[15009, 462, 98, 1, 43, "MathCaption",
+ CellID->690131918],
+Cell[CellGroupData[{
+Cell[15132, 467, 230, 5, 31, "Input",
+ CellID->718931880],
+Cell[15365, 474, 471, 11, 50, "Output"]
+}, Open ]],
+Cell[15851, 488, 390, 12, 43, "MathCaption",
+ CellID->854192725],
+Cell[CellGroupData[{
+Cell[16266, 504, 459, 13, 52, "Input",
+ CellID->465762594],
+Cell[16728, 519, 1463, 43, 74, "Output"]
+}, Open ]],
+Cell[18206, 565, 76, 1, 43, "MathCaption",
+ CellID->314466782],
+Cell[CellGroupData[{
+Cell[18307, 570, 424, 13, 52, "Input",
+ CellID->298399236],
+Cell[18734, 585, 56724, 1597, 384, "Output"]
+}, Open ]],
+Cell[75473, 2185, 34, 0, 29, "Text"],
+Cell[CellGroupData[{
+Cell[75532, 2189, 4224, 113, 310, "Input"],
+Cell[79759, 2304, 922, 12, 278, "Output"],
+Cell[80684, 2318, 117, 1, 30, "Output"]
+}, Open ]],
+Cell[80816, 2322, 40, 0, 29, "Text"],
+Cell[CellGroupData[{
+Cell[80881, 2326, 288, 8, 31, "Input"],
+Cell[81172, 2336, 3317, 96, 260, "Output"]
+}, Open ]],
+Cell[CellGroupData[{
+Cell[84526, 2437, 1976, 61, 161, "Input"],
+Cell[86505, 2500, 1530, 49, 83, "Output"],
+Cell[88038, 2551, 1375, 42, 51, "Output"],
+Cell[89416, 2595, 529, 19, 30, "Output"]
+}, Open ]]
+}, Open ]]
+}
+]
+*)
+
+(* End of internal cache information *)
diff --git a/xmds2/Genas_system/Makefile b/xmds2/Genas_system/Makefile
new file mode 100755
index 0000000..0e82991
--- /dev/null
+++ b/xmds2/Genas_system/Makefile
@@ -0,0 +1,37 @@
+### -*- make -*-
+### This file is part of the Debian xmds package
+### Copyright (C) 2006 Rafael Laboissiere
+### This file is relased under the GNU General Public License
+### NO WARRANTIES!
+
+### This makefile can be used to build and run the XMDS examples
+
+XMDS_FILES = $(shell ls *.xmds)
+RUN_FILES = $(patsubst %.xmds,%.run,$(XMDS_FILES))
+CC_FILES = $(patsubst %.xmds,%.cc,$(XMDS_FILES))
+XSIL_FILES = $(patsubst %.xmds,%.xsil,$(XMDS_FILES))
+M_FILES = $(patsubst %.xmds,%.m,$(XMDS_FILES))
+
+XMDS = xmds2
+XSIL2GRAPHICS = xsil2graphics2
+
+all: $(M_FILES)
+
+%.run: %.xmds
+ $(XMDS) $<
+ mv $(patsubst %.xmds,%,$<) $@
+
+%.xsil: %.run
+ ./$<
+
+%.m: %.xsil
+ $(XSIL2GRAPHICS) -e $<
+
+plot: $(M_FILES)
+ octave pp.m
+
+clean:
+ rm -f $(CC_FILES) $(RUN_FILES) $(M_FILES) $(XSIL_FILES) *.wisdom.fftw3 *.dat octave-core *.wisdom *.pdf
+
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean