summaryrefslogtreecommitdiff
path: root/xmds2/Shahriar_system
diff options
context:
space:
mode:
Diffstat (limited to 'xmds2/Shahriar_system')
-rw-r--r--xmds2/Shahriar_system/GenerateShahriarSystem_via_drive_modulation.nb1507
-rw-r--r--xmds2/Shahriar_system/Readme10
-rw-r--r--xmds2/Shahriar_system/Shahriar_system.xmds54
3 files changed, 1535 insertions, 36 deletions
diff --git a/xmds2/Shahriar_system/GenerateShahriarSystem_via_drive_modulation.nb b/xmds2/Shahriar_system/GenerateShahriarSystem_via_drive_modulation.nb
new file mode 100644
index 0000000..bd35917
--- /dev/null
+++ b/xmds2/Shahriar_system/GenerateShahriarSystem_via_drive_modulation.nb
@@ -0,0 +1,1507 @@
+(* 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[ 50325, 1498]
+NotebookOptionsPosition[ 48074, 1417]
+NotebookOutlinePosition[ 48431, 1433]
+CellTagsIndexPosition[ 48388, 1430]
+WindowFrame->Normal*)
+
+(* Beginning of Notebook Content *)
+Notebook[{
+
+Cell[CellGroupData[{
+Cell["set up 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]]],
+ " and ",
+ Cell[BoxData[
+ FormBox[
+ StyleBox[
+ SubscriptBox["\[Omega]", "3"], "InlineMath"], TraditionalForm]]],
+ "(near resonant with the ",
+ Cell[BoxData[
+ StyleBox[
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"|", "2"}], "\[RightAngleBracket]"}], "\[Rule]",
+ RowBox[{"|", "3"}]}], "\[RightAngleBracket]"}], "InlineMath"]]],
+ " transition)\[AliasDelimiter]."
+}], "Text",
+ CellChangeTimes->{{3.524013673755671*^9, 3.524013697746722*^9}},
+ CellID->525777075],
+
+Cell["\<\
+Define the atomic system. Three level \[CapitalLambda] system\
+\>", "MathCaption",
+ CellID->429217524],
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"system", "=",
+ RowBox[{"{", "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"AtomicState", "[",
+ RowBox[{"1", ",",
+ RowBox[{"NaturalWidth", "\[Rule]", "0"}], ",",
+ RowBox[{"Parity", "\[Rule]", "Even"}]}], "]"}], ",",
+ "\[IndentingNewLine]",
+ RowBox[{"AtomicState", "[",
+ RowBox[{"2", ",",
+ RowBox[{"NaturalWidth", "\[Rule]", "0"}], ",",
+ RowBox[{"Parity", "\[Rule]", "Even"}]}], "]"}], ",",
+ "\[IndentingNewLine]",
+ RowBox[{"AtomicState", "[",
+ RowBox[{"3", ",",
+ RowBox[{"NaturalWidth", "\[Rule]", "\[CapitalGamma]"}], ",",
+ RowBox[{"Energy", "\[Rule]", "0"}], ",",
+ RowBox[{
+ RowBox[{"BranchingRatio", "[", "1", "]"}], "\[Rule]",
+ RowBox[{"1", "/", "2"}]}], ",",
+ RowBox[{
+ RowBox[{"BranchingRatio", "[", "2", "]"}], "\[Rule]",
+ RowBox[{"1", "/", "2"}]}], ",",
+ RowBox[{"Parity", "\[Rule]", "Odd"}]}], "]"}]}], "\[IndentingNewLine]",
+ "}"}]}], ";"}]], "Input",
+ CellID->433132487],
+
+Cell["\<\
+Define the optical field. Field (1) is probe, fields (2) and (3) are pumps\
+\>", "MathCaption",
+ CellID->133602844],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"field", "=",
+ RowBox[{
+ RowBox[{"OpticalField", "[",
+ RowBox[{"\[Omega]1", ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[CapitalOmega]1", "/",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]}], ",",
+ "\[Phi]1"}], "}"}]}], "]"}], "+",
+ RowBox[{"OpticalField", "[",
+ RowBox[{"\[Omega]2", ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[CapitalOmega]2", "/",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"2", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]}], ",",
+ "\[Phi]2"}], "}"}]}], "]"}]}]}]], "Input",
+ CellChangeTimes->{3.524259583801378*^9}],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ FractionBox[
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]1", "-",
+ RowBox[{"t", " ", "\[Omega]1"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]1"}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"1", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]], "+",
+ FractionBox[
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ",
+ RowBox[{"(",
+ RowBox[{"\[Phi]2", "-",
+ RowBox[{"t", " ", "\[Omega]2"}]}], ")"}]}]], " ",
+ "\[CapitalOmega]2"}],
+ RowBox[{"ReducedME", "[",
+ RowBox[{"2", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "3"}], "]"}]]}], ",", "0",
+ ",", "0"}], "}"}]], "Output",
+ CellChangeTimes->{3.524014012716285*^9, 3.524259591553705*^9,
+ 3.524259626080548*^9}]
+}, Open ]],
+
+Cell["\<\
+The Hamiltonian for the system subject to the optical field. Probe couples \
+|1> and |3>, Pumps couple |2> and |3>.\
+\>", "MathCaption",
+ CellID->462076121],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"MatrixForm", "[",
+ RowBox[{"H", "=",
+ RowBox[{
+ RowBox[{"Expand", "@",
+ RowBox[{"Hamiltonian", "[",
+ RowBox[{"system", ",",
+ RowBox[{"ElectricField", "\[Rule]", "field"}]}], "]"}]}], "/.", " ",
+ RowBox[{
+ RowBox[{
+ RowBox[{"Cos", "[", "_", "]"}], " ",
+ RowBox[{"ReducedME", "[",
+ RowBox[{"_", ",",
+ RowBox[{"{",
+ RowBox[{"Dipole", ",", "1"}], "}"}], ",", "_"}], "]"}]}], "\[Rule]",
+ "0"}]}]}], "]"}]], "Input"],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {
+ RowBox[{"Energy", "[", "1", "]"}], "0",
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]1"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]1", "-",
+ RowBox[{"t", " ", "\[Omega]1"}]}], "]"}]}]},
+ {"0",
+ RowBox[{"Energy", "[", "2", "]"}],
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]2"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]2", "-",
+ RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}]},
+ {
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]1"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]1", "-",
+ RowBox[{"t", " ", "\[Omega]1"}]}], "]"}]}],
+ RowBox[{
+ RowBox[{"-", "\[CapitalOmega]2"}], " ",
+ RowBox[{"Cos", "[",
+ RowBox[{"\[Phi]2", "-",
+ RowBox[{"t", " ", "\[Omega]2"}]}], "]"}]}], "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",
+ CellChangeTimes->{3.524014012961052*^9, 3.524259598039252*^9,
+ 3.524259629043541*^9}]
+}, Open ]],
+
+Cell["The level diagram for the system.", "MathCaption",
+ CellID->358620443],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"LevelDiagram", "[",
+ RowBox[{"system", ",",
+ RowBox[{"H", "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"Energy", "[", "1", "]"}], "\[Rule]",
+ RowBox[{"-", "1.5"}]}], ",",
+ RowBox[{
+ RowBox[{"Energy", "[", "2", "]"}], "\[Rule]",
+ RowBox[{"-", "1"}]}], ",",
+ RowBox[{
+ RowBox[{"Energy", "[", "3", "]"}], "\[Rule]", ".5"}]}], "}"}]}]}],
+ "]"}]], "Input",
+ CellChangeTimes->{{3.524013707327201*^9, 3.524013712245067*^9}},
+ CellID->167259034],
+
+Cell[BoxData[
+ GraphicsBox[{{{{},
+ LineBox[{{-0.9, -1.5}, {-0.09999999999999998, -1.5}}]}, {{},
+ LineBox[{{-0.9, -1.}, {-0.09999999999999998, -1.}}]}, {{},
+ LineBox[{{0.09999999999999998, 0.}, {0.9, 0.}}]}}, {{}, {}, {}},
+ {Arrowheads[{-0.07659574468085106, 0.07659574468085106}],
+ ArrowBox[{{-0.45999999999999996`, -1.5}, {0.45999999999999996`, 0.}}],
+ ArrowBox[{{-0.45999999999999996`, -1.}, {0.45999999999999996`, 0.}}]},
+ {PointSize[0.0225]}},
+ ImagePadding->{{2., 2}, {2., 2.}},
+ ImageSize->94.]], "Output",
+ CellChangeTimes->{
+ 3.524014013119625*^9, {3.524259615431492*^9, 3.524259632461302*^9}}]
+}, Open ]],
+
+Cell["\<\
+Apply the rotating-wave approximation to the Hamiltonian. \[Delta]a is \
+average pump detuning, \[Delta] is relative pump detuning.\
+\>", "MathCaption",
+ CellID->577766068],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{"Hrwa", "=",
+ RowBox[{
+ RowBox[{"RotatingWaveApproximation", "[",
+ RowBox[{"system", ",", "H", ",",
+ RowBox[{"{",
+ RowBox[{"\[Omega]1", ",", "\[Omega]2"}], "}"}], ",",
+ RowBox[{"TransformMatrix", "\[Rule]",
+ RowBox[{"MatrixExp", "[",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "t", " ",
+ RowBox[{"DiagonalMatrix", "[",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"-", "\[Omega]1"}], ",",
+ RowBox[{"-", "\[Omega]2"}], ",", "0"}], "}"}], "]"}]}],
+ "]"}]}]}], "]"}], "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\[Omega]1", "\[Rule]",
+ RowBox[{
+ RowBox[{"-",
+ RowBox[{"Energy", "[", "1", "]"}]}], "+", "\[Delta]1"}]}], ",",
+ RowBox[{"\[Omega]2", "\[Rule]",
+ RowBox[{
+ RowBox[{"-",
+ RowBox[{"Energy", "[", "2", "]"}]}], "+", "\[Delta]2"}]}]}],
+ "}"}]}]}], ")"}], "//", "MatrixForm"}]], "Input",
+ CellChangeTimes->{{3.524259650739166*^9, 3.524259657623566*^9}, {
+ 3.524259695984735*^9, 3.524259716178644*^9}}],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"\[Delta]1", "0",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1"}]},
+ {"0", "\[Delta]2",
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2"}]},
+ {
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1"}],
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2"}],
+ "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",
+ CellChangeTimes->{3.52401401316455*^9, 3.524259664732384*^9,
+ 3.524259718048386*^9}]
+}, 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. Add additional term \[Gamma]p for \
+incoherent pumping from |1> to |3>."
+}], "MathCaption",
+ CellID->610306692],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"MatrixForm", "[",
+ RowBox[{"relax", "=",
+ RowBox[{
+ RowBox[{"IntrinsicRelaxation", "[", "system", "]"}], "+",
+ RowBox[{"TransitRelaxation", "[",
+ RowBox[{"system", ",", "\[Gamma]t"}], "]"}], "+",
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"\[Gamma]p", "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$]]]}]}], "]"}]], "Input",
+ CellID->645617687],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {
+ RowBox[{"\[Gamma]p", "+", "\[Gamma]t"}], "0", "0"},
+ {"0", "\[Gamma]t", "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",
+ CellChangeTimes->{3.524014013274888*^9, 3.524259721983669*^9}]
+}, 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[{"OpticalRepopulation", "[", "system", "]"}], "+",
+ RowBox[{"TransitRepopulation", "[",
+ RowBox[{"system", ",", "\[Gamma]t"}], "]"}], "+",
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {"0", "0", "0"},
+ {"0", "0", "0"},
+ {"0", "0",
+ RowBox[{"\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "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$]]]}]}], "]"}]], "Input",
+ CellID->465762594],
+
+Cell[BoxData[
+ TagBox[
+ RowBox[{"(", "\[NoBreak]", GridBox[{
+ {
+ RowBox[{
+ FractionBox["\[Gamma]t", "2"], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}], "0", "0"},
+ {"0",
+ RowBox[{
+ FractionBox["\[Gamma]t", "2"], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}], "0"},
+ {"0", "0",
+ RowBox[{"\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "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",
+ CellChangeTimes->{3.524014013584079*^9, 3.524259725691324*^9}]
+}, Open ]],
+
+Cell["Here are the evolution equations.", "MathCaption",
+ CellID->314466782],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ RowBox[{"TableForm", "[",
+ RowBox[{"eqs", "=",
+ RowBox[{
+ RowBox[{"LiouvilleEquation", "[",
+ RowBox[{"system", ",", "Hrwa", ",", "relax", ",", "repop"}], "]"}], "//",
+ "Expand"}]}], "]"}]], "Input",
+ CellID->298399236],
+
+Cell[BoxData[
+ TagBox[
+ TagBox[GridBox[{
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ FractionBox["\[Gamma]t", "2"], "-",
+ RowBox[{"\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ FractionBox["\[Gamma]t", "2"], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-",
+ FractionBox["1", "2"]}], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "+",
+ RowBox[{"\[ImaginaryI]", " ", "\[Delta]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]},
+ {
+ RowBox[{
+ RowBox[{
+ SuperscriptBox[
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "\[Prime]",
+ MultilineFunction->None], "[", "t", "]"}], "\[Equal]",
+ RowBox[{
+ RowBox[{"\[Gamma]p", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "1"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], " ", "\[CapitalOmega]1",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"1", ",", "3"}]], "[", "t", "]"}]}], "+",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[CapitalOmega]2",
+ " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"2", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], " ",
+ "\[CapitalOmega]1", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "1"}]], "[", "t", "]"}]}], "-",
+ RowBox[{
+ FractionBox["1", "2"], " ", "\[ImaginaryI]", " ",
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ",
+ "\[CapitalOmega]2", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "2"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[CapitalGamma]", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}], "-",
+ RowBox[{"\[Gamma]t", " ",
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"3", ",", "3"}]], "[", "t", "]"}]}]}]}]}
+ },
+ GridBoxAlignment->{
+ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
+ "RowsIndexed" -> {}},
+ GridBoxSpacings->{"Columns" -> {
+ Offset[0.27999999999999997`], {
+ Offset[0.5599999999999999]},
+ Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
+ Offset[0.2], {
+ Offset[0.4]},
+ Offset[0.2]}, "RowsIndexed" -> {}}],
+ Column],
+ Function[BoxForm`e$,
+ TableForm[BoxForm`e$]]]], "Output",
+ CellChangeTimes->{3.524014013741555*^9, 3.524259731199048*^9}]
+}, Open ]],
+
+Cell["Convert to c form.", "Text"],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"Collect", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{"eqs", "[",
+ RowBox[{"[",
+ RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]1"}]], "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"E1", "/", "\[CapitalOmega]1"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]1"}]], "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"E1c", "/", "\[CapitalOmega]1"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{"\[ImaginaryI]", " ", "\[Phi]2"}]], " ", "\[Rule]",
+ RowBox[{"2",
+ RowBox[{"Ef", "/", "\[CapitalOmega]2"}]}]}], ",",
+ RowBox[{
+ SuperscriptBox["\[ExponentialE]",
+ RowBox[{
+ RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Phi]2"}]], " ", "\[Rule]",
+ RowBox[{"2", " ",
+ RowBox[{"Efc", "/", "\[CapitalOmega]2"}]}]}], ",",
+ RowBox[{"\[CapitalGamma]", "\[Rule]",
+ RowBox[{"2", "G"}]}], ",",
+ RowBox[{"\[Gamma]p", "\[Rule]",
+ RowBox[{"2", "gp"}]}], ",",
+ RowBox[{"\[Gamma]t", "\[Rule]",
+ RowBox[{"2", "gt"}]}], ",",
+ RowBox[{"\[Delta]1", "\[Rule]", "d1"}], ",",
+ RowBox[{"\[Delta]2", "\[Rule]", "da"}]}], "}"}]}], ",",
+ RowBox[{"DMElementPattern", "[", "]"}], ",", "FullSimplify"}], "]"}], "/.",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["\[Rho]", "a__"], "[", "t", "]"}], "\[Rule]",
+ SubscriptBox["r", "a"]}]}], ";"}], "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{"MapThread", "[",
+ RowBox[{"Equal", ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ RowBox[{"DMVariables", "[", "system", "]"}], "/.",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["\[Rho]", "a__"], "[", "t", "]"}], "\[Rule]",
+ SubscriptBox["dr", "a"]}]}], ",", "%"}], "}"}]}], "]"}], "/.",
+ RowBox[{
+ RowBox[{"Complex", "[",
+ RowBox[{"0", ",", "a_"}], "]"}], "\[Rule]",
+ RowBox[{"a", " ", "i"}]}]}], "\[IndentingNewLine]",
+ 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[{
+ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\<code.txt\>\""}], ",",
+ "%"}], "]"}]}], "Input",
+ CellChangeTimes->{{3.524014168318809*^9, 3.524014208362378*^9}, {
+ 3.524259775991233*^9, 3.524259803019728*^9}, {3.524259910132192*^9,
+ 3.524259921595321*^9}, 3.524260077001915*^9, {3.524265840178889*^9,
+ 3.524265840456311*^9}, {3.524265923474642*^9, 3.524265929078822*^9}, {
+ 3.524265960227649*^9, 3.52426596652093*^9}}],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "1"}]], "\[Equal]",
+ RowBox[{"gt", "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"gp", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "-",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "+",
+ RowBox[{"G", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "2"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "gp"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"d1", " ", "i"}], "+",
+ RowBox[{"da", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "-",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "E1c"}], " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"d1", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "1"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"i", " ",
+ RowBox[{"(",
+ RowBox[{"d1", "-", "da", "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{"gp", "+",
+ RowBox[{"2", " ", "gt"}]}], ")"}], " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "-",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "2"}]], "\[Equal]",
+ RowBox[{"gt", "-",
+ RowBox[{"2", " ", "gt", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "-",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "+",
+ RowBox[{"G", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "E1c"}], " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"da", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"3", ",", "1"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "+",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "+",
+ RowBox[{"d1", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "-",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"3", ",", "2"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "+",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "+",
+ RowBox[{"da", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"3", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"2", " ", "gp", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "+",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "-",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"G", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output",
+ CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9,
+ 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9,
+ 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9,
+ 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967369995*^9}],
+
+Cell[BoxData[
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "1"}]], "\[Equal]",
+ RowBox[{"gt", "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"gp", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "-",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "+",
+ RowBox[{"G", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "2"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "gp"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"d1", " ", "i"}], "+",
+ RowBox[{"da", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "-",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"1", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "E1c"}], " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-", "gp", "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"d1", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "2"}]], "\[Equal]",
+ RowBox[{"gt", "-",
+ RowBox[{"2", " ", "gt", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "-",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "+",
+ RowBox[{"G", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"2", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{
+ RowBox[{"-", "E1c"}], " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "2"}]]}], "+",
+ RowBox[{
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"-", "G"}], "-",
+ RowBox[{"2", " ", "gt"}], "-",
+ RowBox[{"da", " ", "i"}]}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "+",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}], ",",
+ RowBox[{
+ SubscriptBox["dr",
+ RowBox[{"3", ",", "3"}]], "\[Equal]",
+ RowBox[{
+ RowBox[{"2", " ", "gp", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "1"}]]}], "+",
+ RowBox[{"E1", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"1", ",", "3"}]]}], "+",
+ RowBox[{"Ef", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"2", ",", "3"}]]}], "-",
+ RowBox[{"E1c", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "1"}]]}], "-",
+ RowBox[{"Efc", " ", "i", " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "2"}]]}], "-",
+ RowBox[{"2", " ",
+ RowBox[{"(",
+ RowBox[{"G", "+", "gt"}], ")"}], " ",
+ SubscriptBox["r",
+ RowBox[{"3", ",", "3"}]]}]}]}]}], "}"}]], "Output",
+ CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9,
+ 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9,
+ 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9,
+ 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967377494*^9}],
+
+Cell[BoxData["\<\"dr11_dt = gt - 2*(gp + gt)*r11 - E1*i*r13 + E1c*i*r31 + \
+G*r33;\\ndr12_dt = (-gp - 2*gt - d1*i + da*i)*r12 - Ef*i*r13 + \
+E1c*i*r32;\\ndr13_dt = -(E1c*i*r11) - Efc*i*r12 + (-G - gp - 2*gt - d1*i)*r13 \
++ E1c*i*r33;\\ndr22_dt = gt - 2*gt*r22 - Ef*i*r23 + Efc*i*r32 + \
+G*r33;\\ndr23_dt = -(E1c*i*r21) - Efc*i*r22 + (-G - 2*gt - da*i)*r23 + \
+Efc*i*r33;\\ndr33_dt = 2*gp*r11 + E1*i*r13 + Ef*i*r23 - E1c*i*r31 - Efc*i*r32 \
+- 2*(G + gt)*r33;\\n\"\>"], "Output",
+ CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9,
+ 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9,
+ 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9,
+ 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967380181*^9}],
+
+Cell[BoxData["\<\"/mnt/light_huge_archive/home/evmik/src/my_src/Nresonances/\
+xmds2/Shahriar_system/code.txt\"\>"], "Output",
+ CellChangeTimes->{3.524014014687035*^9, 3.524014182827821*^9,
+ 3.524014214903372*^9, 3.524259784109108*^9, 3.52425981618349*^9,
+ 3.524259922834424*^9, 3.524260078672261*^9, 3.524260324306823*^9,
+ 3.52426584452029*^9, 3.52426593042942*^9, 3.524265967566105*^9}]
+}, Open ]],
+
+Cell[BoxData[""], "Input",
+ CellChangeTimes->{{3.524260308571472*^9, 3.524260312167967*^9}}]
+}, Open ]]
+},
+WindowSize->{960, 1029},
+WindowMargins->{{Automatic, 0}, {Automatic, 0}},
+ShowSelection->True,
+FrontEndVersion->"8.0 for Linux x86 (32-bit) (February 23, 2011)",
+StyleDefinitions->"Default.nb"
+]
+(* End of Notebook Content *)
+
+(* Internal cache information *)
+(*CellTagsOutline
+CellTagsIndex->{}
+*)
+(*CellTagsIndex
+CellTagsIndex->{}
+*)
+(*NotebookFileOutline
+Notebook[{
+Cell[CellGroupData[{
+Cell[567, 22, 36, 0, 74, "Section"],
+Cell[606, 24, 66, 1, 44, "MathCaption",
+ CellID->836781195],
+Cell[675, 27, 85, 2, 30, "Input",
+ CellID->2058623809],
+Cell[763, 31, 1128, 37, 52, "Text",
+ CellID->525777075],
+Cell[1894, 70, 112, 3, 44, "MathCaption",
+ CellID->429217524],
+Cell[2009, 75, 1057, 27, 126, "Input",
+ CellID->433132487],
+Cell[3069, 104, 125, 3, 44, "MathCaption",
+ CellID->133602844],
+Cell[CellGroupData[{
+Cell[3219, 111, 784, 23, 50, "Input"],
+Cell[4006, 136, 990, 30, 52, "Output"]
+}, Open ]],
+Cell[5011, 169, 166, 4, 44, "MathCaption",
+ CellID->462076121],
+Cell[CellGroupData[{
+Cell[5202, 177, 508, 15, 50, "Input"],
+Cell[5713, 194, 1472, 42, 73, "Output"]
+}, Open ]],
+Cell[7200, 239, 76, 1, 44, "MathCaption",
+ CellID->358620443],
+Cell[CellGroupData[{
+Cell[7301, 244, 530, 16, 30, "Input",
+ CellID->167259034],
+Cell[7834, 262, 634, 12, 94, "Output"]
+}, Open ]],
+Cell[8483, 277, 182, 4, 44, "MathCaption",
+ CellID->577766068],
+Cell[CellGroupData[{
+Cell[8690, 285, 1156, 31, 69, "Input"],
+Cell[9849, 318, 1562, 45, 100, "Output"]
+}, Open ]],
+Cell[11426, 366, 456, 13, 44, "MathCaption",
+ CellID->610306692],
+Cell[CellGroupData[{
+Cell[11907, 383, 933, 25, 58, "Input",
+ CellID->645617687],
+Cell[12843, 410, 781, 21, 72, "Output"]
+}, Open ]],
+Cell[13639, 434, 390, 12, 44, "MathCaption",
+ CellID->854192725],
+Cell[CellGroupData[{
+Cell[14054, 450, 1070, 29, 58, "Input",
+ CellID->465762594],
+Cell[15127, 481, 1290, 37, 91, "Output"]
+}, Open ]],
+Cell[16432, 521, 76, 1, 44, "MathCaption",
+ CellID->314466782],
+Cell[CellGroupData[{
+Cell[16533, 526, 250, 7, 30, "Input",
+ CellID->298399236],
+Cell[16786, 535, 16111, 429, 250, "Output"]
+}, Open ]],
+Cell[32912, 967, 34, 0, 30, "Text"],
+Cell[CellGroupData[{
+Cell[32971, 971, 3830, 101, 190, "Input"],
+Cell[36804, 1074, 5940, 188, 138, "Output"],
+Cell[42747, 1264, 4060, 127, 84, "Output"],
+Cell[46810, 1393, 745, 10, 138, "Output"],
+Cell[47558, 1405, 393, 5, 29, "Output"]
+}, Open ]],
+Cell[47966, 1413, 92, 1, 30, "Input"]
+}, Open ]]
+}
+]
+*)
+
+(* End of internal cache information *)
diff --git a/xmds2/Shahriar_system/Readme b/xmds2/Shahriar_system/Readme
index c0bb248..cd74054 100644
--- a/xmds2/Shahriar_system/Readme
+++ b/xmds2/Shahriar_system/Readme
@@ -1,9 +1,9 @@
-Usual EIT only two fields probe and pump
-./Shahriar_system.run --E2o 30e6 --E3o 0 --d1 0 --da 0 --delta 0 --gp 0
+Usual EIT only two fields probe and pump i.e. no beatnote on pump
+!./Shahriar_system.run --E1o 10e-4 --E2o 20e6 --d1 0 --da 0 --delta 0 --gp 0
-Raman (far detuned) EIT only two fields probe and pump
-!./Shahriar_system.run --E2o 30e6 --E3o 0 --d1 50e6 --da 50e6 --delta 0 --gp 0
+Raman (far detuned) EIT only two fields probe and pump i.e. no beatnote on pump
+!./Shahriar_system.run --E1o 10e-4 --E2o 20e6 --d1 1000e6 --da 1000e6 --delta 0 --gp 0
Attemt for double lambda gain.
-!./Shahriar_system.run --E1o 10e-4 --E2o 10e6 --E3o 10e6 --d1 800e6 --da 800e6 --delta 100e6 --gp 30e6
+!./Shahriar_system.run --E1o 10e-4 --E2o 80e6 --d1 600e6 --da 600e6 --delta 80e6 --gp 20e6
diff --git a/xmds2/Shahriar_system/Shahriar_system.xmds b/xmds2/Shahriar_system/Shahriar_system.xmds
index 389f120..83b1b22 100644
--- a/xmds2/Shahriar_system/Shahriar_system.xmds
+++ b/xmds2/Shahriar_system/Shahriar_system.xmds
@@ -29,6 +29,10 @@
* ------- |1>
*
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ IMPORTANT simplification: E2 = E3 by magnitude then we can use a field consisting
+ of beat note between E1 and E2 oscillating at frequency wa=(w1+w2)/2
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
We are solving
dE/dz+(1/c)*dE/dt=i*eta*rho_ij, where j level is higher then i.
@@ -61,7 +65,7 @@
const double R31=0.5, R32=0.5;
- complex E1c, E2c, E3c; // Complex conjugated Rabi frequencies
+ complex E1c, E2c, E3c, Efc; // Complex conjugated Rabi frequencies
complex r21, r31, r32; // density matrix elements
]]>
@@ -100,14 +104,18 @@
<!-- Rabi frequency -->
<vector name="E_field" type="complex" initial_space="t">
- <components>E1 E2 E3</components>
+ <components>E1 Ef</components>
<initialisation>
<![CDATA[
// Initial (at starting 'z' position) electromagnetic field does not depend on detuning
// as well as time
E1=E1o*exp(-pow( ((t-0.0)/1e-6),2) );
- E2=E2o;
- E3=E3o;
+ // very dirty hack, I assume that E2=E3 then I can use beatnote formula since
+ // w1 approcimately equals w2
+ // I assign it to new combined field with amplitude Ef
+ // E*cos( (wa+d/2)*t ) * E*cos( (wa-d/2)*t ) = 2*E*cos(d*t/2)*cos(wa*t) = Ef*cos(wa*t)
+ Ef = 2*E2o*cos(delta*t/2); // E3o assumed to be equal E2o
+
]]>
</initialisation>
</vector>
@@ -136,21 +144,9 @@
</initialisation>
</vector>
- <vector name="pump_detunings" type="complex" initial_space="t">
- <components> d dc </components>
- <!--dc is probably redundant since it is just complex conjugate of d-->
- <initialisation>
- <![CDATA[
- d = exp( i*t*delta );
- dc = conj(d);
- ]]>
- </initialisation>
- </vector>
-
-
<sequence>
<!--For this set of conditions ARK45 is faster than ARK89-->
- <integrate algorithm="ARK45" tolerance="1e-5" interval="4e-2">
+ <integrate algorithm="ARK45" tolerance="1e-5" interval="7e-2">
<!--SIC algorithm seems to be much slower and needs fine 'z' step tuning and much finer time grid-->
<!--For example I had to quadruple the time grid from 1000 to 4000 when increased z distance from 0.02 to 0.04-->
@@ -159,7 +155,7 @@
<operators>
<operator kind="cross_propagation" algorithm="SI" propagation_dimension="t">
<integration_vectors>density_matrix</integration_vectors>
- <dependencies>E_field pump_detunings</dependencies>
+ <dependencies>E_field</dependencies>
<boundary_condition kind="left">
<![CDATA[
r11 = 1; r22 = 0; r33 = 0;
@@ -169,8 +165,7 @@
</boundary_condition>
<![CDATA[
E1c = conj(E1);
- E2c = conj(E2);
- E3c = conj(E3);
+ Efc = conj(Ef);
r21=conj(r12);
r31=conj(r13);
@@ -178,12 +173,11 @@
// Equations of motions according to Simon's mathematica code
dr11_dt = gt - 2*(gp + gt)*r11 - E1*i*r13 + E1c*i*r31 + G*r33;
- dr12_dt = (-gp - 2*gt - d1*i + da*i)*r12 - i*(E2*d + E3*dc)*r13 + E1c*i*r32;
- dr13_dt = -(E1c*i*r11) - i*(E3c*d + E2c*dc)*r12 + (-G - gp - 2*gt - d1*i)*r13 + E1c*i*r33;
- dr22_dt = gt - 2*gt*r22 - i*(E2*d + E3*dc)*r23 + i*(E3c*d + E2c*dc)*r32 + G*r33;
- dr23_dt = -(E1c*i*r21) - i*(E3c*d + E2c*dc)*r22 + (-G - 2*gt - da*i)*r23 + i*(E3c*d + E2c*dc)*r33;
- dr33_dt = 2*gp*r11 + E1*i*r13 + i*(E2*d + E3*dc)*r23 - E1c*i*r31 - i*(E3c*d + E2c*dc)*r32 - 2*(G + gt)*r33;
-
+ dr12_dt = (-gp - 2*gt - d1*i + da*i)*r12 - Ef*i*r13 + E1c*i*r32;
+ dr13_dt = -(E1c*i*r11) - Efc*i*r12 + (-G - gp - 2*gt - d1*i)*r13 + E1c*i*r33;
+ dr22_dt = gt - 2*gt*r22 - Ef*i*r23 + Efc*i*r32 + G*r33;
+ dr23_dt = -(E1c*i*r21) - Efc*i*r22 + (-G - 2*gt - da*i)*r23 + Efc*i*r33;
+ dr33_dt = 2*gp*r11 + E1*i*r13 + Ef*i*r23 - E1c*i*r31 - Efc*i*r32 - 2*(G + gt)*r33;
]]>
</operator>
<operator kind="ex" constant="yes">
@@ -196,8 +190,7 @@
<dependencies>density_matrix</dependencies>
<![CDATA[
dE1_dz = i*eta*conj(r13) -Lt[E1] ;
- dE2_dz = i*eta*conj(r23) -Lt[E2] ;
- dE3_dz = i*eta*conj(r23) -Lt[E3] ;
+ dEf_dz = i*eta*conj(r23) -Lt[Ef] ;
]]>
</operators>
</integrate>
@@ -208,11 +201,10 @@
<group>
<sampling basis="t(1000)" initial_sample="yes">
<dependencies>E_field</dependencies>
- <moments>I1_out I2_out I3_out</moments>
+ <moments>I1_out If_out</moments>
<![CDATA[
I1_out = mod2(E1);
- I2_out = mod2(E2);
- I3_out = mod2(E3);
+ If_out = mod2(Ef);
]]>
</sampling>
</group>