concept-collection / numbl-quantum-optics
numbl-quantum-optics / ex16_atomic_inversion.m
44 lines · 1.7 KBBlameHistoryRaw
1% Atomic inversion with a coherent field: collapse and revival (Sec. V)
2% Atom excited, field in a coherent state. The atomic inversion <sigma_z(t)>
3% collapses and later revives -- a hallmark of field quantization.
4%
5% Note: d = 50 and a long evolution make this the heaviest example here;
6% give it a few seconds.
8clear; % Clear memory
9clc; % Clear the command window/screen
10d = 50; % dimension of the cavity field
11hbar = 1;
12W0 = 1; % atomic frequency
13Wf = 1; % cavity field frequency
14g = 0.1; % coupling constant
15A = diag(sqrt(1:d-1), 1); % Annihilation operator
16Ad = A'; % Creation operator
17Sz = [1,0;0,-1]; % sigma_z
18Splus = [0,1;0,0]; % sigma_+
19Sminus = [0,0;1,0]; % sigma_-
20gs = [0;1]; % ground state
21es = [1;0]; % excited state
22I_a = eye(2); % identity operator for the atom
23I_f = eye(d); % identity operator for the field
24Hatom = (1/2)*hbar*W0*kron(Sz,I_f);
25Hfield = hbar*Wf*kron(I_a,Ad*A);
26Hint = hbar*g*(kron(Splus,A)+kron(Sminus,Ad));
27H = Hatom + Hfield + Hint; % JC Hamiltonian
28alpha = 3; % coherent state amplitude
29Coh = 0;
30for x = 0:d-1
31 Coh = Coh + exp(-norm(alpha)^2/2)*alpha^x/sqrt(prod(1:x))*I_f(:,x+1);
32end
33Psi = kron(es,Coh); % initial state: atom |e>, field coherent
34dt = 0.1; % time step
35U = expm(-j*H*dt); % unitary time-evolution operator
36T = 0:dt:500; % total evolution time
37for t = 1:length(T)
38 W(t) = Psi'*kron(Sz,I_f)*Psi; % <sigma_z> (atomic inversion)
39 Psi = U*Psi;
40 Psi = Psi/norm(Psi);
41end
42plot(T, W)
43title('Atomic inversion <\sigma_z(t)>: collapse and revival (\alpha = 3)')
44xlabel('t'); ylabel('<\sigma_z>')