1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
% load useful functions;
useful_functions;
% some physical constants
useful_constants;
% load atom energy levels and decay description
three_levels;
%two_levels;
% load EM field description
field_description;
Nfreq=length(modulation_freq);
%tune probe frequency
detuning_p=0;
N_detun_steps=15;
detuning_p_min=-15;
detuning_p_max=-detuning_p_min;
detuning_freq=zeros(1,N_detun_steps+1);
kappa_p =zeros(1,N_detun_steps+1);
detun_step=(detuning_p_max-detuning_p_min)/N_detun_steps;
for detuning_p_cntr=1:N_detun_steps+1;
wp0=w12;
detuning_p=detuning_p_min+detun_step*(detuning_p_cntr-1);
wp=wp0+detuning_p;
modulation_freq=[0, wp, wd, -wp, -wd, wp-wd, wd-wp];
% now we create Liouville indexes list
[N, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c]=unfold_density_matrix(Nlevels,Nfreq);
rhoLiouville=zeros(N,1);
% Liouville operator matrix construction
L=Liouville_operator_matrix(
N,
H0, g_decay, g_dephasing, dipole_elements,
E_field,
modulation_freq, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c
);
%use the fact that sum(rho_ii)=1 to constrain solution
[rhoLiouville_dot, L]=constran_rho_and_match_L(
N, L,
modulation_freq, rhoLiouville_w, rhoLiouville_r, rhoLiouville_c);
%solving for density matrix vector
rhoLiouville=L\rhoLiouville_dot;
rho_0=rhoOfFreq(rhoLiouville, 1, Nlevels, Nfreq);
rho_1=rhoOfFreq(rhoLiouville, 2, Nlevels, Nfreq);
rho_2=rhoOfFreq(rhoLiouville, 3, Nlevels, Nfreq);
%rho_l=rhoOfFreq(rhoLiouville, Nfreq, Nlevels, Nfreq)
kappa_p(detuning_p_cntr)=sum(sum(rho_1));
detuning_freq(detuning_p_cntr)=detuning_p;
%kappa_p_re=real(kappa_p);
%kappa_p_im=imag(kappa_p);
endfor
figure(1); plot(detuning_freq, real(kappa_p));
figure(2); plot(detuning_freq, imag(kappa_p));
|