diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2009-12-13 18:25:01 +0000 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2009-12-13 18:25:01 +0000 |
commit | e185567e2dbd6e3522706293da1ed0abf1e1ed1b (patch) | |
tree | 580f777a615d5370f8a2323d5aac9654c6df9c44 /test.m | |
parent | cd2b70a897ec5b7f45be9df10209f493635208d8 (diff) | |
download | multi_mode_eit-e185567e2dbd6e3522706293da1ed0abf1e1ed1b.tar.gz multi_mode_eit-e185567e2dbd6e3522706293da1ed0abf1e1ed1b.zip |
added test case
Diffstat (limited to 'test.m')
-rw-r--r-- | test.m | 80 |
1 files changed, 80 insertions, 0 deletions
@@ -0,0 +1,80 @@ +1; +clear all; + +t0 = clock (); % we will use this latter to calculate elapsed time + + +% load useful functions; +useful_functions; + +% some physical constants +useful_constants; + +% load atom energy levels and decay description +four_levels; +%three_levels; +%two_levels; + +% load EM field description +field_description; + +Nfreq=length(modulation_freq); + + + +%tune probe frequency +detuning_p=0; +N_detun_steps=100; +detuning_p_min=-1; +detuning_p_max=-detuning_p_min; +detuning_freq=zeros(1,N_detun_steps+1); +kappa_p =zeros(1,N_detun_steps+1); +kappa_m =zeros(1,N_detun_steps+1); + +wp0=w12; +wp=wp0+detuning_p_min; +wm=wd-(wp-wd); +%modulation_freq=[0, wp, wd, wm, -wp, -wd, -wm, wp-wd, wd-wp]; +%E_field =[0, Ep, Ed, Em, Epc, Edc, Emc, 0, 0 ]; +modulation_freq=[0, wp, wd, -wp, -wd, wp-wd, wd-wp]; +E_field =[0, Ep, Ed, Epc, Edc, 0, 0 ]; +Nfreq=length(modulation_freq); + +% now we create Liouville indexes list +[N, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c]=unfold_density_matrix(Nlevels,Nfreq); +rhoLiouville=zeros(N,1); + +% calculate E_field independent properties of athe atom +% to be used as sub matrix templates for Liouville operator matrix +[L0m, polarizability_m]=L0_and_polarization_submatrices( ... + Nlevels, ... + H0, g_decay, g_dephasing, dipole_elements ... + ); +% Liouville operator matrix construction +L=Liouville_operator_matrix( + N, + L0m, polarizability_m, + E_field, + modulation_freq, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c + ); + + +%use the fact that sum(rho_ii)=1 to constrain solution +[rhoLiouville_dot, L]=constrain_rho_and_match_L( + N, L, + modulation_freq, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c); + + +%solving for density matrix vector +rhoLiouville=L\rhoLiouville_dot; + + +L_new=L; +rhoLiouville_new=rhoLiouville; + +% uncomment to update reference file +% save 'L_and_rhoL_referenced.mat' L + +diff_with_reference=sum(sum(abs(L_new-L))) + +elapsed_time = etime (clock (), t0) |