1; Nlevels=4; w1=1e9; w2=0; w_hpf=6800; w3=w_hpf; w4=w_hpf+.1; % separation of levels |3> and |4> somewhat like Zeeman splitting w12=w1-w2; w13=w1-w3; % % ----------- |1> % / \ % E_d / \ % / \ E_p % / \ % -------- |3> \ % -------- |4> \ % \ % ___________ |2> % unperturbed Hamiltonian energy levels levels_energy=[ w1, 0, w3, w4]; levels_energy=levels_energy*hbar; H0=zeros(Nlevels); H0=diag(levels_energy); %for i=1:Nlevels %H0(i,i)=levels_energy(i); %endfor % decay matrix g(i,j) correspnds to decay from i-->j gamma=6; gamma_23=.001; g_decay=zeros(Nlevels); g_decay(1,2)=gamma; %upper level decay g_decay(1,3)=gamma; %upper level decay g_decay(1,4)=gamma; %upper level decay g_decay(3,2)=gamma_23; % lower levels mixing g_decay(2,3)=gamma_23; % lower levels mixing g_decay(4,2)=gamma_23; % lower levels mixing g_decay(2,4)=gamma_23; % lower levels mixing %defasing matris g_deph=0; g_dephasing=zeros(Nlevels); g_dephasing(1,2)=g_deph; g_dephasing(2,1)=g_dephasing(1,2); g_dephasing(1,3)=g_deph; g_dephasing(3,1)=g_dephasing(1,3); g_dephasing(1,4)=g_deph; g_dephasing(4,1)=g_dephasing(4,1); % dipole matrix dipole_elements=zeros(Nlevels); dipole_elements(1,2)=1; dipole_elements(2,1)=dipole_elements(1,2); dipole_elements(1,3)=1; dipole_elements(3,1)=dipole_elements(1,3); dipole_elements(1,4)=1; dipole_elements(4,1)=dipole_elements(1,4);