25.07.2013 Views

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

init1 = amps/norm(amps); init1 = init1’;<br />

expsz1 = [init1’*sztot1*init1];<br />

for k = 2:length(t)<br />

curr = expm(-i*H1*t(k))*init1;<br />

expsz1 = [expsz1 curr’*sztot1*curr];<br />

end<br />

figure(1);<br />

hold on;<br />

subplot(3,1,1);<br />

ylabel(’Magnetization’);<br />

plot(t*J,expsz1)<br />

axis([min(t*J),max(t*J),-2,2]);<br />

% Now do the simulation with micromotion<br />

expsz2 = [init1’*sztot1*init1];<br />

tstep=t(2)-t(1);<br />

curr = init1;<br />

J = 1.0e3;<br />

Jt(1) = J;<br />

Bt(1) = B;<br />

for kk = 2:length(t)<br />

Jt(kk) = J*(1+A*sin(Omega*t(kk)+pi/2))^(-3);<br />

Bt(kk) = B;<br />

Ht = Jt(kk)*kron(sz,sz)+ B*(kron(eye([2 2]), sx) + kron(sx,eye([2 2])));<br />

curr = expm(-i*Ht*tstep)*curr;<br />

expsz2 = [expsz2, curr’*sztot1*curr];<br />

end<br />

Jm = mean(Jt);<br />

figure(1);<br />

hold on;<br />

subplot(3,1,2);<br />

plot(t*J,expsz2);<br />

axis([min(t*J),max(t*J),-2,2]);<br />

theerr = expsz2-expsz1;<br />

figure(1);<br />

hold on;<br />

subplot(3,1,3);<br />

ylabel(’Error’);<br />

plot(t*J,expsz2-expsz1,’r-’);<br />

xlabel(’time (J)’);<br />

axis([min(t*J),max(t*J),-0.5,0.5]);<br />

230

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!