summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2016-03-23 18:10:17 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2016-03-23 18:10:17 -0400
commit8c9d7015d1dd0c3c909296c322124e9b7f51cb67 (patch)
treecc33bbdb992e72fa8f96295b4fd54c88b8a0cf3d
downloadnoisy_eit_xmds-8c9d7015d1dd0c3c909296c322124e9b7f51cb67.tar.gz
noisy_eit_xmds-8c9d7015d1dd0c3c909296c322124e9b7f51cb67.zip
initial release based on Melissa's code
-rw-r--r--Makefile37
-rw-r--r--delta_2photon_noise.xmds140
2 files changed, 177 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..14b0d0b
--- /dev/null
+++ b/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 = delta_2photon_noise_alpha_1.xsil
+M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES))
+
+XMDS = xmds2
+XSIL2GRAPHICS = xsil2graphics2
+
+all: $(M_FILES)
+
+%.run: %.xmds
+ $(XMDS) $<
+ mv $(patsubst %.xmds,%,$<) $@
+
+%.xsil: $(RUN_FILES)
+ ./$<
+
+%.m: %.xsil
+ $(XSIL2GRAPHICS) $<
+
+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
diff --git a/delta_2photon_noise.xmds b/delta_2photon_noise.xmds
new file mode 100644
index 0000000..bb22f3a
--- /dev/null
+++ b/delta_2photon_noise.xmds
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<simulation xmds-version="2">
+
+ <name>delta_2photon_noise</name>
+
+ <author>E. Mikhailov, M. Guidry</author>
+ <description>
+ Solving 3 level atom in lambda field configuration,
+ no field propagation included. Noise on delta_2photon.
+ </description>
+
+ <features>
+ <benchmark />
+ <bing />
+ <fftw plan="patient" />
+ <openmp />
+ <auto_vectorise />
+ <globals>
+ <![CDATA[
+ const complex g=10;
+ const complex gbc=.001;
+ const complex Split = 1;
+ const double tset=5;
+ const double alpha = 0;
+
+ complex Gab, Gca, Gcb, GCB;
+ complex Ep,Ed,Epc,Edc;
+ complex noise;
+ double delta_2photon, delta_d;
+ complex rba,rac,rbc;
+ complex rBA,rAC,rBC;
+ complex drive_field0=1, probe_field0=1;
+ ]]>
+ </globals>
+ </features>
+
+ <geometry>
+ <propagation_dimension> t </propagation_dimension>
+ <transverse_dimensions>
+ <dimension name="delta_2photon" lattice="128" domain="(-25, 25)" />
+ </transverse_dimensions>
+ </geometry>
+
+ <driver name="multi-path" paths="10" />
+
+ <noise_vector name="drivingNoise" kind="wiener" type="real" method="dsfmt" >
+ <components>Eta</components>
+ </noise_vector>
+
+ <vector name="density_matrix" type="complex" dimensions="delta_2photon">
+ <components>raa rbb rcc rab rca rcb rAB rCA rCB</components>
+ <initialisation>
+ <![CDATA[
+ raa = 0;
+ rbb = 1;
+ rcc = 0;
+ rab = 0;
+ rca = 0;
+ rcb= 0;
+ rAB = 0;
+ rCA = 0;
+ rCB= 0;
+ ]]>
+ </initialisation>
+ </vector>
+
+ <sequence>
+ <integrate algorithm="ARK45" interval="3.0" tolerance="1e-7">
+ <samples>100</samples>
+ <operators>
+ <integration_vectors>density_matrix</integration_vectors>
+ <dependencies>drivingNoise</dependencies>
+ <![CDATA[
+ delta_d=0;
+
+ noise = Eta*alpha;
+ Ed=drive_field0;
+ Ep=probe_field0;
+
+ Epc = conj(Ep);
+ Edc = conj(Ed);
+
+ Gab=g+i*(delta_d+delta_2photon+noise);
+ Gca=g-i*(delta_d);
+ Gcb=gbc+i*(Split + delta_2photon+noise);
+ GCB=gbc+i*(-Split + delta_2photon-noise);
+
+
+ rba=conj(rab);
+ rac=conj(rca);
+ rbc=conj(rcb);
+ rBA=conj(rAB);
+ rAC=conj(rCA);
+ rBC=conj(rCB);
+
+ draa_dt = -i*Epc*rab+i*Ep*rba-i*Edc*rac+i*Ed*rca-2*g*raa;
+ drbb_dt = i*Epc*rab-i*Ep*rba+g*raa-gbc*rbb+gbc*rcc;
+ drcc_dt = i*Edc*rac-i*Ed*rca+g*raa-gbc*rcc+gbc*rbb;
+ drab_dt = -Gab*rab+i*Ep*(rbb-raa)+i*Ed*rcb;
+ drca_dt = -Gca*rca+i*Edc*(raa-rcc)-i*Epc*rcb;
+ drcb_dt = -Gcb*rcb-i*Ep*rca+i*Edc*rab;
+ drAB_dt = -Gab*rAB+i*Ed*(rbb-raa)+i*Ep*rCB;
+ drCA_dt = -Gca*rCA+i*Epc*(raa-rcc)-i*Edc*rCB;
+ drCB_dt = -GCB*rCB-i*Ed*rCA+i*Epc*rAB;
+ ]]>
+ </operators>
+ </integrate>
+ </sequence>
+
+
+
+
+ <!-- The output to generate -->
+ <output format="ascii" filename="delta_2photon_noise_alpha_1.xsil">
+ <group>
+ <sampling basis="delta_2photon" initial_sample="yes">
+ <dependencies>density_matrix </dependencies>
+ <moments>eit_signal mor_signal rab_rlOut rab_imOut rca_rlOut rca_imOut raaOut rbbOut rccOut noiseOut</moments>
+ <![CDATA[
+ rab_rlOut = rab.Re();
+ rab_imOut = rab.Im();
+ rca_rlOut = rca.Re();
+ rca_imOut = rca.Im();
+ raaOut = raa.Re();
+ rbbOut = rbb.Re();
+ rccOut = rcc.Re();
+ noiseOut = noise.Re();
+ eit_signal = abs(rab + rAB) + abs(rca + rCA);
+ mor_signal = abs(rab + rAB) - abs(rca + rCA);
+ ]]>
+ </sampling>
+ </group>
+ </output>
+
+ </simulation>
+
+<!--
+vim: ts=2 sw=2 foldmethod=indent:
+-->
+