diff options
-rw-r--r-- | liouville.m | 14 | ||||
-rw-r--r-- | useful_functions.m | 28 |
2 files changed, 30 insertions, 12 deletions
diff --git a/liouville.m b/liouville.m index 9bf5753..c6603b4 100644 --- a/liouville.m +++ b/liouville.m @@ -10,7 +10,8 @@ useful_functions; useful_constants; % load atom energy levels and decay description -four_levels; +four_levels_with_polarization; +%four_levels; %three_levels; %two_levels; @@ -55,7 +56,9 @@ for detuning_p_cntr=1:N_detun_steps+1; %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 ]; + E_field.linear =[0, 0 , 0 , 0 , 0 , 0, 0 ]; + E_field.right =[0, 0 , Ed, 0 , Edc, 0, 0 ]; + E_field.left =[0, Ep, 0 , Epc, 0 , 0, 0 ]; freq_index=freq2index(wp,modulation_freq); atom_field_problem.E_field = E_field; @@ -71,11 +74,12 @@ endfor % once we define all problems the main job is done here %kappa_p=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array); -kappa_p=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); +%kappa_p=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); +[xi_linear, xi_left, xi_right]=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); -figure(1); plot(detuning_freq, real(kappa_p)); title("probe dispersion"); -figure(2); plot(detuning_freq, imag(kappa_p)); title("probe absorption"); +figure(1); plot(detuning_freq, real(xi_left)); title("probe dispersion"); +figure(2); plot(detuning_freq, imag(xi_left)); title("probe absorption"); %figure(3); plot(detuning_freq, real(kappa_m)); title("off resonant sideband dispersion"); %figure(4); plot(detuning_freq, imag(kappa_m)); title("off resonant absorption"); diff --git a/useful_functions.m b/useful_functions.m index 74dd9a5..4b239a5 100644 --- a/useful_functions.m +++ b/useful_functions.m @@ -72,7 +72,9 @@ function [L0m, polarizability_m]=L0_and_polarization_submatrices( ... decay_part_m=zeros(rho_size); % (NxN)x(NxN) matrix % polarization matrix will be multiplied by field amplitude letter % polarization is part of perturbation part of Hamiltonian - polarizability_m=zeros(rho_size); % (NxN)x(NxN) matrix + polarizability_m.linear = zeros(rho_size); % (NxN)x(NxN) matrix + polarizability_m.left = zeros(rho_size); % (NxN)x(NxN) matrix + polarizability_m.right = zeros(rho_size); % (NxN)x(NxN) matrix for p=1:rho_size % p= j*Nlevels+k % this might speed up stuff since less matrix passed back and force @@ -92,7 +94,9 @@ function [L0m, polarizability_m]=L0_and_polarization_submatrices( ... + g_dephasing(j,k) ... )* kron_delta(j,m)*kron_delta(k,n) ... - kron_delta(m,n)*kron_delta(j,k)*g_decay(m,j) ; - polarizability_m(p,s)= ( dipole_elements(j,m)*kron_delta(k,n)-dipole_elements(n,k)*kron_delta(j,m) ); + polarizability_m.linear(p,s)= ( dipole_elements.linear(j,m)*kron_delta(k,n)-dipole_elements.linear(n,k)*kron_delta(j,m) ); + polarizability_m.left(p,s)= ( dipole_elements.left(j,m)*kron_delta(k,n)-dipole_elements.left(n,k)*kron_delta(j,m) ); + polarizability_m.right(p,s)= ( dipole_elements.right(j,m)*kron_delta(k,n)-dipole_elements.right(n,k)*kron_delta(j,m) ); endfor endfor L0m=-im_one/hbar*L0m - decay_part_m; @@ -150,7 +154,10 @@ function L=Liouville_operator_matrix( ... % calculate perturbed part (Hamiltonian with EM field) % in other word interactive part of Hamiltonian L(p0:p0+rho_size-1,s0:s0+rho_size-1)= ... - -im_one/hbar*polarizability_m* E_field(w3i); + -im_one/hbar*polarizability_m.linear * E_field.linear(w3i) ... + -im_one/hbar*polarizability_m.left * E_field.left(w3i) ... + -im_one/hbar*polarizability_m.right * E_field.right(w3i) ... + ; endif % diagonal elements are self modulated % due to rotating wave approximation @@ -193,12 +200,16 @@ endfunction function kappa=susceptibility(wi, rhoLiouville, dipole_elements) % calculate susceptibility for the field at given frequency index - Nlevels=( size(dipole_elements)(1) ); + Nlevels=( size(dipole_elements.linear)(1) ); rho=rhoOfFreq(rhoLiouville, wi, Nlevels); - kappa=0; + kappa.linear=0; + kappa.left=0; + kappa.right=0; for i=1:Nlevels for j=1:Nlevels - kappa+=dipole_elements(j,i)*rho(i,j); + kappa.linear += dipole_elements.linear(j,i) * rho(i,j); + kappa.left += dipole_elements.left(j,i) * rho(i,j); + kappa.right += dipole_elements.right(j,i) * rho(i,j); endfor endfor endfunction @@ -233,7 +244,7 @@ function rhoLiouville=rhoLiouville_steady_state(L0m, polarizability_m, E_field, rhoLiouville=L\rhoLiouville_dot; endfunction -function xi=susceptibility_steady_state_at_freq( atom_field_problem) +function [xi_linear, xi_left, xi_right]=susceptibility_steady_state_at_freq( atom_field_problem) % find steady state susceptibility at particular modulation frequency element % at given E_field global atom_properties; @@ -247,6 +258,9 @@ function xi=susceptibility_steady_state_at_freq( atom_field_problem) rhoLiouville=rhoLiouville_steady_state(L0m, polarizability_m, E_field, modulation_freq); xi=susceptibility(freq_index, rhoLiouville, dipole_elements); + xi_linear = xi.linear; + xi_right = xi.right; + xi_left = xi.left; endfunction % vim: ts=2:sw=2:fdm=indent |