25.07.2013 Views

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

Ph.D. Thesis - Physics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A.3 Simulation with constant force in space and linear variation<br />

in time<br />

% File: ising_small_tdep.m<br />

% Author: Rob Clark<br />

% Simulates Ising model with and without micromotion,<br />

% beginning with a random two-qubit state.<br />

% The state-dependent force increases linearly in time.<br />

% Basis generated by {spin space of ion 1} \otimes {spin space of ion 2}<br />

% STAGE 1: simple calculation, ising, no vibration<br />

clear;<br />

close all;<br />

% J = 1.000e3;<br />

J = 1000; %*343.6/333.34;<br />

B = -J;<br />

A = .1;<br />

Omega = 1.0e6;<br />

t = 0:1/(2*Omega):10/J;<br />

Fr1 = t/max(t);<br />

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

sx = [0 1; 1 0];<br />

sz = [1 0; 0 -1];<br />

sztot1 = kron(eye([2 2]),sz) + kron(sz,eye([2 2]));<br />

H1 = J*kron(sz,sz) + B*(kron(eye([2 2]), sx) + kron(sx,eye([2 2])));<br />

% Randomize initial state<br />

amps = [rand(1),rand(1),rand(1),rand(1)] + i*[rand(1),rand(1),rand(1),rand(1)];<br />

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

% init1 = [1;0;0;0];<br />

curr = init1;<br />

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

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

H1 = Fr1(k)^2*J*kron(sz,sz) + B*(kron(eye([2 2]), sx) + kron(sx,eye([2 2])));<br />

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

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

end<br />

figure(1);<br />

hold on;<br />

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

235

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

Saved successfully!

Ooh no, something went wrong!