diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-11-17 17:18:38 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-09-21 16:33:21 -0400 |
commit | fb14c86de04182c3070d050b5ca0cb0f26109e7d (patch) | |
tree | 9a770fe45c4270596a0fd1ec574447fe51f7b4d6 | |
parent | 1ac97d6e7466d226fd77f94fcf3d0d073e0017fe (diff) | |
download | multi_mode_eit-fb14c86de04182c3070d050b5ca0cb0f26109e7d.tar.gz multi_mode_eit-fb14c86de04182c3070d050b5ca0cb0f26109e7d.zip |
problem case renamed
-rw-r--r-- | faraday/Makefile | 35 | ||||
-rw-r--r-- | faraday/output_faraday_results_vs_B.m | 59 | ||||
-rw-r--r-- | faraday/susceptibility_problem.m | 99 | ||||
-rwxr-xr-x | faraday/task_solver.m | 19 | ||||
-rwxr-xr-x | faraday/tasks_builder.m | 39 | ||||
-rw-r--r-- | faraday/tasks_pp.m | 35 | ||||
l--------- | faraday_and_psr/L0m.cache | 1 | ||||
-rw-r--r-- | faraday_and_psr/Makefile (renamed from squeezing_filter/Makefile) | 4 | ||||
l--------- | faraday_and_psr/basis_transformation.m (renamed from faraday/basis_transformation.m) | 0 | ||||
l--------- | faraday_and_psr/dipole_elementRb87D1line.m (renamed from faraday/dipole_elementRb87D1line.m) | 0 | ||||
-rw-r--r-- | faraday_and_psr/rb87_D1_line.m (renamed from faraday/rb87_D1_line.m) | 0 | ||||
-rw-r--r-- | faraday_and_psr/susceptibility_problem.m (renamed from squeezing_filter/susceptibility_problem.m) | 0 | ||||
-rwxr-xr-x | faraday_and_psr/task_solver.m (renamed from squeezing_filter/task_solver.m) | 0 | ||||
-rwxr-xr-x | faraday_and_psr/tasks_builder.m (renamed from squeezing_filter/tasks_builder.m) | 0 | ||||
-rw-r--r-- | faraday_and_psr/tasks_pp.m (renamed from squeezing_filter/tasks_pp.m) | 0 | ||||
l--------- | faraday_and_psr/useful_constants.m (renamed from faraday/useful_constants.m) | 0 | ||||
l--------- | faraday_and_psr/useful_functions.m (renamed from faraday/useful_functions.m) | 0 | ||||
l--------- | squeezing_filter/basis_transformation.m | 1 | ||||
l--------- | squeezing_filter/dipole_elementRb87D1line.m | 1 | ||||
-rw-r--r-- | squeezing_filter/rb87_D1_line.m | 148 | ||||
l--------- | squeezing_filter/useful_constants.m | 1 | ||||
l--------- | squeezing_filter/useful_functions.m | 1 |
22 files changed, 3 insertions, 440 deletions
diff --git a/faraday/Makefile b/faraday/Makefile deleted file mode 100644 index 0a84c81..0000000 --- a/faraday/Makefile +++ /dev/null @@ -1,35 +0,0 @@ - - -PROBLEMS = $(wildcard tasks/*.mat) -RESULTS = $(PROBLEMS:tasks/%=results/%) - - -calculate: problems solutions - -solutions: results $(RESULTS) - -results: - @mkdir results - - -problems: problems_prepared.stamp - -tasks: - @mkdir tasks - -problems_prepared.stamp: tasks tasks_builder.m - @./tasks_builder.m - @touch $@ - @echo "Please run again: make calculate" - -$(RESULTS): results/% : tasks/% - ./task_solver.m $< $@ - -clean: - rm -f problems_prepared.stamp - rm -rf tasks - rm -rf results - - -real_clean: - rm -rf L0m.cache diff --git a/faraday/output_faraday_results_vs_B.m b/faraday/output_faraday_results_vs_B.m deleted file mode 100644 index 8387a92..0000000 --- a/faraday/output_faraday_results_vs_B.m +++ /dev/null @@ -1,59 +0,0 @@ -function psr_rad=output_faraday_results_vs_B() -load '/tmp/xi_vs_B.mat' ; - -Er=(1+I*xi_right)*E_field_pos_freq.right; -El=(1+I*xi_left) *E_field_pos_freq.left; - -Ex=(Er+El)/sqrt(2); -Ey=I*(Er-El)/sqrt(2); - -%extra rotation to compensate rotation due to ellipticity -% actually no need for it since x-polarization shifts by positive phase -% and y-pol by negative phase -%el_rot=0*psi_el; -%Ex=cos(el_rot)*Ex-sin(el_rot)*Ey; -%Ey=sin(el_rot)*Ex+cos(el_rot)*Ey; - -Ipos=(abs(Ey).^2)/2; -Ineg=(abs(Ex).^2)/2; - -figure(1); -hold off; -plot(B_fields, real(xi_left-xi_right), '-'); -title("differential real xi"); -xlabel("two photon detuning (MHz)"); - -figure(2); -hold off; -plot(B_fields, imag(xi_left-xi_right), '-'); -title("differential imag xi"); -xlabel("two photon detuning (MHz)"); - -figure(3); -hold off; -plot(B_fields, real(xi_left), '-', detuning_freq, real(xi_right), '-'); -title("real xi"); -xlabel("two photon detuning (MHz)"); - -figure(4); -hold off; -plot(B_fields, imag(xi_left), '-', detuning_freq, imag(xi_right), '-'); -title("imag xi"); -xlabel("two photon detuning (MHz)"); - -figure(5); -hold off; -I_probe=E_field_probe^2; -psr_rad=(Ipos-Ineg)/(2*I_probe); -plot(B_fields, psr_rad, '-'); -subt_str=sprintf("Laser Rabi freq normalized to upper state decay %.3f, ellipticity %.1f degree, \n B field ground level splitting %.3f Gauss", I_probe, psi_el*180/pi, detuning_freq); -title(cstrcat("BPD normilized PSR signal at F_g=2 to F_e=1,2.\n ",subt_str) ); -xlabel("two photon detuning (MHz)"); -ylabel("PSR (radians)"); - -print("psr_vs_detuning.ps"); - -fname= sprintf("psr_vs_B_Fg=2toFe=1,2_Ip=%.3f_el_%.1f_detun=%.3fMHz.mat", I_probe, psi_el*180/pi,detuning_freq); -save(fname,'B_fields', 'psr_rad', 'xi_left', 'xi_right', 'xi_linear'); - -return; diff --git a/faraday/susceptibility_problem.m b/faraday/susceptibility_problem.m deleted file mode 100644 index 56808e9..0000000 --- a/faraday/susceptibility_problem.m +++ /dev/null @@ -1,99 +0,0 @@ -function [xi_linear, xi_left, xi_right]=susceptibility_problem(detuning_freq, Ep, psi_el, B_field, theta, phi) -% calculates transmission if light polarizations vs B field in the cell -% for given laser probe and B fields array -% Probe field defined by field strength (Ep) and ellipticity angle (pse_el) -% Magnetic field defined by magnitude (B_field) and angles theta and phi. -% -% Note: it is expensive to recalculate atom property for each given B_field strength -% so run as many calculation for constant magnetic field as possible - -t0 = clock (); % we will use this latter to calculate elapsed time - - -% load useful functions; -useful_functions; - -% some physical constants -useful_constants; - -basis_transformation; % load subroutines - - -% load atom energy levels and decay description -rb87_D1_line; - - -B_str=num2str(B_field(1),"%g"); -% the child file to which calculated matrices are written -cfile='L0m.cache/L0m_and_polarizability_calculated_for_B='; -cfile=strcat(cfile,B_str,'.mat'); - -need_update=true; -[s, err, msg] = stat (cfile); -if(err) - %file does not exist - need_update=true; -else - need_update=false; -endif; -if ( !need_update) - % matrices already calculated and up to date, all we need to load them - load(cfile); - else - % calculate E_field independent properties of the 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 ... - ); - save(cfile, 'L0m', 'polarizability_m'); - endif - -global atom_properties; -atom_properties.L0m=L0m; -atom_properties.polarizability_m=polarizability_m; -atom_properties.dipole_elements=dipole_elements; - -%light_positive_freq = [wp]; -E_field_drive = [0 ]; -E_field_probe = [Ep ]; -E_field_zero = [0 ]; -E_field_lab_pos_freq.linear = E_field_zero + (1.00000+0.00000i)*E_field_probe + (1.00000+0.00000i)*E_field_drive; - -% we define light as linearly polarized -% where phi is angle between light polarization and axis x -% only sign of modulation frequency is important now -% we define actual frequency later on -[E_field_lab_pos_freq.x, E_field_lab_pos_freq.y] = rotXpolarization(phi, E_field_lab_pos_freq.linear); -% we add required ellipticity -E_field_lab_pos_freq.x*=exp(I*psi_el); -E_field_lab_pos_freq.y*=exp(-I*psi_el); -E_field_lab_pos_freq.z=E_field_zero; - -E_field_pos_freq=xyz_lin2atomic_axis_polarization(theta, E_field_lab_pos_freq); - - -wp0=w_pf1-w_sf2; %Fg=2 -> Fe=1 -wp=wp0+detuning_freq; -light_positive_freq=[ wp]; -% we calculate dc and negative frequencies as well as amplitudes -[modulation_freq, E_field] = ... - light_positive_frequencies_and_amplitudes2full_set_of_modulation_frequencies_and_amlitudes(... - light_positive_freq, E_field_pos_freq); -freq_index=freq2index(wp,modulation_freq); - -atom_field_problem.E_field = E_field; -atom_field_problem.modulation_freq = modulation_freq; -atom_field_problem.freq_index = freq_index; - -problems_cell_array=atom_field_problem; - -[xi_linear, xi_left, xi_right]=susceptibility_steady_state_at_freq( problems_cell_array); - - -elapsed_time = etime (clock (), t0) -return - -endfunction - -% vim: ts=2:sw=2:fdm=indent diff --git a/faraday/task_solver.m b/faraday/task_solver.m deleted file mode 100755 index 0ba57ea..0000000 --- a/faraday/task_solver.m +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/octave -qf -% reads parameters file (argv1) and output results of the calculations into output file (argv(2) - -arg_list = argv (); - -if (nargin < 2) - error("need at least two parameters"); -end -params_file=arg_list{1}; -output_fname=arg_list{2}; - -load(params_file); - -[xi_linear, xi_left, xi_right]=susceptibility_problem(detuning_freq, Ep, psi_el, B_field, theta, phi) - -save(output_fname, 'detuning_freq', 'Ep', 'psi_el', 'B_field', 'theta', 'phi', ... - 'xi_linear', 'xi_left', 'xi_right' ... - ); - diff --git a/faraday/tasks_builder.m b/faraday/tasks_builder.m deleted file mode 100755 index 3cc76b9..0000000 --- a/faraday/tasks_builder.m +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/octave -qf - -task_dir='tasks/'; -task_base_name='task_'; -task_ext='.mat'; -data_dir='results/'; -output_dir='results/'; -detuning_freq=0; - - -% assign some defaults -gmg=.7; % gyro magnetic ration for ground level - -%[psr_rad]=psr_vs_detuning(Ep, psi_el, B_field, theta, phi) - -% phi is angle between linear polarization and axis x -%phi=pi/4; -phi=pi/2; -% theta is angle between lab z axis (light propagation direction) and magnetic field axis (z') -theta=0; -% psi_el is the ellipticity parameter (phase difference between left and right polarization) -psi_el=0/180*pi*e-8; - -Ep=sqrt(0.1); - -% we are going to sweep B so parts related to sweep paramer(s) -zeeman_splitting=+0.1; -Nsteps=100; -B_fields=linspace(-zeeman_splitting/gmg, zeeman_splitting/gmg, Nsteps); - -for i=1:Nsteps - filename_task=strcat(task_dir, task_base_name); - i_str=num2str(i, "%04d"); - filename_task=strcat(filename_task,i_str, task_ext); - B_field = B_fields(i); - save(filename_task, 'detuning_freq', 'Ep', 'psi_el', 'B_field', 'theta', 'phi'); -endfor - -disp("Tasks creation done"); diff --git a/faraday/tasks_pp.m b/faraday/tasks_pp.m deleted file mode 100644 index f17d0d1..0000000 --- a/faraday/tasks_pp.m +++ /dev/null @@ -1,35 +0,0 @@ -basis_transformation; - -fnames=glob('results/*.mat'); - -Nsteps=length(fnames) -B_field=zeros(1,Nsteps); -xi_linear=zeros(1,Nsteps); -xi_left=zeros(1,Nsteps); -xi_right=zeros(1,Nsteps); - -% read the information from resulting files -for i=1:Nsteps - d=load(fnames{i}); - B_field(i)=d.B_field; - xi_linear(i)=d.xi_linear; - xi_left(i)=d.xi_left; - xi_right(i)=d.xi_right; -endfor - -figure(1); -plot(B_field, real((xi_right+xi_left))/sqrt(2)); -title('phase of linear x-polarization'); - -figure(2); -plot(B_field, imag((xi_right+xi_left))/sqrt(2)); -title('absorption of linear x-polarization'); - -figure(3); -plot(B_field, real((1i*xi_right-1i*xi_left))/sqrt(2)); -title('phase of linear y-polarization'); - -figure(4); -plot(B_field, imag((1i*xi_right-1i*xi_left))/sqrt(2)); -title('absorption of linear y-polarization'); - diff --git a/faraday_and_psr/L0m.cache b/faraday_and_psr/L0m.cache new file mode 120000 index 0000000..c9b0aa9 --- /dev/null +++ b/faraday_and_psr/L0m.cache @@ -0,0 +1 @@ +../L0m.cache
\ No newline at end of file diff --git a/squeezing_filter/Makefile b/faraday_and_psr/Makefile index 1cfd0de..39f5e1e 100644 --- a/squeezing_filter/Makefile +++ b/faraday_and_psr/Makefile @@ -12,7 +12,7 @@ results: @mkdir results -problems: problems_prepared.stamp +problems: tasks problems_prepared.stamp tasks: @mkdir tasks @@ -36,7 +36,7 @@ clean: tasks_clean results_clean rm -f problems_prepared.stamp -real_clean: +real_clean: clean rm -rf tasks rm -rf results rm -rf L0m.cache diff --git a/faraday/basis_transformation.m b/faraday_and_psr/basis_transformation.m index 28d8beb..28d8beb 120000 --- a/faraday/basis_transformation.m +++ b/faraday_and_psr/basis_transformation.m diff --git a/faraday/dipole_elementRb87D1line.m b/faraday_and_psr/dipole_elementRb87D1line.m index 6a11745..6a11745 120000 --- a/faraday/dipole_elementRb87D1line.m +++ b/faraday_and_psr/dipole_elementRb87D1line.m diff --git a/faraday/rb87_D1_line.m b/faraday_and_psr/rb87_D1_line.m index 74a52f0..74a52f0 100644 --- a/faraday/rb87_D1_line.m +++ b/faraday_and_psr/rb87_D1_line.m diff --git a/squeezing_filter/susceptibility_problem.m b/faraday_and_psr/susceptibility_problem.m index 140204c..140204c 100644 --- a/squeezing_filter/susceptibility_problem.m +++ b/faraday_and_psr/susceptibility_problem.m diff --git a/squeezing_filter/task_solver.m b/faraday_and_psr/task_solver.m index c044cf6..c044cf6 100755 --- a/squeezing_filter/task_solver.m +++ b/faraday_and_psr/task_solver.m diff --git a/squeezing_filter/tasks_builder.m b/faraday_and_psr/tasks_builder.m index 78eea9e..78eea9e 100755 --- a/squeezing_filter/tasks_builder.m +++ b/faraday_and_psr/tasks_builder.m diff --git a/squeezing_filter/tasks_pp.m b/faraday_and_psr/tasks_pp.m index 82bcdac..82bcdac 100644 --- a/squeezing_filter/tasks_pp.m +++ b/faraday_and_psr/tasks_pp.m diff --git a/faraday/useful_constants.m b/faraday_and_psr/useful_constants.m index fc5b92d..fc5b92d 120000 --- a/faraday/useful_constants.m +++ b/faraday_and_psr/useful_constants.m diff --git a/faraday/useful_functions.m b/faraday_and_psr/useful_functions.m index a2d3237..a2d3237 120000 --- a/faraday/useful_functions.m +++ b/faraday_and_psr/useful_functions.m diff --git a/squeezing_filter/basis_transformation.m b/squeezing_filter/basis_transformation.m deleted file mode 120000 index 28d8beb..0000000 --- a/squeezing_filter/basis_transformation.m +++ /dev/null @@ -1 +0,0 @@ -../basis_transformation.m
\ No newline at end of file diff --git a/squeezing_filter/dipole_elementRb87D1line.m b/squeezing_filter/dipole_elementRb87D1line.m deleted file mode 120000 index 6a11745..0000000 --- a/squeezing_filter/dipole_elementRb87D1line.m +++ /dev/null @@ -1 +0,0 @@ -../dipole_elementRb87D1line.m
\ No newline at end of file diff --git a/squeezing_filter/rb87_D1_line.m b/squeezing_filter/rb87_D1_line.m deleted file mode 100644 index 74a52f0..0000000 --- a/squeezing_filter/rb87_D1_line.m +++ /dev/null @@ -1,148 +0,0 @@ -1; -useful_constants; - -% note all frequency values are in MHz - -% 87Rb D1 line -% -% m=-2 m=-1 m=0 m=1 m=2 -% ---- ---- ---- ---- ---- |P,F=2> -% -% ---- ---- ---- |P,F=1> -% m=-1 m=0 m=1 -% -% -% -% -% -% m=-2 m=-1 m=0 m=1 m=2 -% ---- ---- ---- ---- ---- |S,F=2> -% -% ---- ---- ---- |S,F=1> -% m=-1 m=0 m=1 - - -w_hpf_ground=6834; -w_hpf_exited=817; -w_sf2 = w_hpf_ground; % Distance from |S,F=1> to |S,F=2> -w_pf1 =1e9; % something big Distance from |S,F=1> to |P,F=1> -w_pf2 = w_pf1+w_hpf_exited; %Distance from |S,F=1> to |P,F=2> -gmg=.7; % gyro magnetic ration for ground level -gme=.23; % gyro magnetic ration for exited level % CHECKME - - -%bottom level |F=1> -levels( 1)=struct( "ang_momentum", 0, "total_momentum", 1, "m", -1, "energy", 0, "gm", -gmg); -levels( 2)=struct( "ang_momentum", 0, "total_momentum", 1, "m", 0, "energy", 0, "gm", -gmg); -levels( 3)=struct( "ang_momentum", 0, "total_momentum", 1, "m", 1, "energy", 0, "gm", -gmg); - -%second bottom level |F=2> -levels( 4)=struct( "ang_momentum", 0, "total_momentum", 2, "m", -2, "energy", w_sf2, "gm", gmg); -levels( 5)=struct( "ang_momentum", 0, "total_momentum", 2, "m", -1, "energy", w_sf2, "gm", gmg); -levels( 6)=struct( "ang_momentum", 0, "total_momentum", 2, "m", 0, "energy", w_sf2, "gm", gmg); -levels( 7)=struct( "ang_momentum", 0, "total_momentum", 2, "m", 1, "energy", w_sf2, "gm", gmg); -levels( 8)=struct( "ang_momentum", 0, "total_momentum", 2, "m", 2, "energy", w_sf2, "gm", gmg); - -% first exited level |F=1> -levels( 9)=struct( "ang_momentum", 1, "total_momentum", 1, "m", -1, "energy", w_pf1, "gm", -gme); -levels(10)=struct( "ang_momentum", 1, "total_momentum", 1, "m", 0, "energy", w_pf1, "gm", -gme); -levels(11)=struct( "ang_momentum", 1, "total_momentum", 1, "m", 1, "energy", w_pf1, "gm", -gme); - -% second exited level |F=2> -levels(12)=struct( "ang_momentum", 1, "total_momentum", 2, "m", -2, "energy", w_pf2, "gm", gme); -levels(13)=struct( "ang_momentum", 1, "total_momentum", 2, "m", -1, "energy", w_pf2, "gm", gme); -levels(14)=struct( "ang_momentum", 1, "total_momentum", 2, "m", 0, "energy", w_pf2, "gm", gme); -levels(15)=struct( "ang_momentum", 1, "total_momentum", 2, "m", 1, "energy", w_pf2, "gm", gme); -levels(16)=struct( "ang_momentum", 1, "total_momentum", 2, "m", 2, "energy", w_pf2, "gm", gme); - -Nlevels=size(levels)(2); - - -H0=zeros(Nlevels); -energy = [1:Nlevels].*0; -ang_momentum = [1:Nlevels].*0; -total_momentum = [1:Nlevels].*0; -m = [1:Nlevels].*0; -gm = [1:Nlevels].*0; - -for i=1:Nlevels - energy(i) = levels(i).energy; - ang_momentum(i) = levels(i).ang_momentum; - total_momentum(i) = levels(i).total_momentum; - m(i) = levels(i).m; - gm(i) = levels(i).gm; -endfor -H0=diag(energy)*hbar; - - -dipole_elements.left = zeros(Nlevels); -dipole_elements.right = zeros(Nlevels); -dipole_elements.linear = zeros(Nlevels); -% define dipole elements for transition from level j->k -for j=1:Nlevels - for k=1:Nlevels - if ( abs(ang_momentum(j) - ang_momentum(k)) == 1) - %transition allowed for L =L' +/- 1 - % but they correct within a factor, but not sign - if ( ( H0(j,j) < H0(k,k)) ) - de=dipole_elementRb87D1line(... - total_momentum(j),m(j), ... - total_momentum(k),m(k) ... - ); - dipole_elements.left(j,k) = de.left; - dipole_elements.right(j,k) = de.right; - dipole_elements.linear(j,k) = de.linear; - endif - endif - endfor -endfor -dipole_elements.linear+=dipole_elements.linear'; -dipole_elements.left+=dipole_elements.left'; -dipole_elements.right+=dipole_elements.right'; - -maximum_dipole_elements=abs(dipole_elements.linear) + abs(dipole_elements.left) + abs(dipole_elements.right); - -%defasing matrix -g_deph=0; -g_dephasing=zeros(Nlevels); -% dephasing only for non zero dipole elements (am I right?) -g_dephasing=g_deph*(abs(maximum_dipole_elements) != 0); - -% decay matrix g(i,j) correspnds to decay from i-->j -gamma=6; -g_decay=zeros(Nlevels); -for i=1:Nlevels - for j=1:Nlevels - if ( H0(i,i) > H0(j,j) ) - % only upper levels decaying and decay is always positive - g_decay(i,j)=gamma * abs( maximum_dipole_elements(i,j) ); - endif - endfor -endfor - -% ground level mixing need to be artificial -gamma_hpf=.0001; -for i=1:Nlevels - for j=1:Nlevels - % it would be better to introduce a level corresponding to the bath - % but this slows calculations - % So - % ground hyperfine are equally mixed together - if ( (abs( H0(i,i) - H0(j,j)) == w_hpf_ground*hbar ) || ... - (abs( H0(i,i) - H0(j,j)) == 0 ) ) - % i and j correspond to 2 ground levels - % we cannot decay to itself - if ( i != j ) - % total eight ground levels F=2 and F=1 so we decay in 7 channels - g_decay(i,j)+=gamma_hpf/7; - endif - endif - endfor -endfor - -% apply B field Zeeman splitting -energy+=B_field * ( gm .* m); -% convert frequency to energy units -H0=diag(energy)*hbar; - -% vim: ts=2:sw=2:fdm=indent diff --git a/squeezing_filter/useful_constants.m b/squeezing_filter/useful_constants.m deleted file mode 120000 index fc5b92d..0000000 --- a/squeezing_filter/useful_constants.m +++ /dev/null @@ -1 +0,0 @@ -../useful_constants.m
\ No newline at end of file diff --git a/squeezing_filter/useful_functions.m b/squeezing_filter/useful_functions.m deleted file mode 120000 index a2d3237..0000000 --- a/squeezing_filter/useful_functions.m +++ /dev/null @@ -1 +0,0 @@ -../useful_functions.m
\ No newline at end of file |