Yet another follow-up on this thread: eigfields
documentation says Int
is given in (MHz2/mT2).
Are the same units used in resfields
for Amp
?
Thanks!
Yet another follow-up on this thread: eigfields
documentation says Int
is given in (MHz2/mT2).
Are the same units used in resfields
for Amp
?
Thanks!
Yes. Both functions calculate the same quantity.
I am trying to calculate the transition probability for a spin-5/2 system using the following code:
Code: Select all
clear, clc
Sys = struct('S',5/2,'g',2, 'D', -256*[0 0 0; 0 0 0; 0 0 1]);
Exp.Range = [0 1500];
Exp.Temperature = 4.2;
Exp.mwFreq = 9.708;
[B,TransRate0] = resfields(Sys,Exp);
for k = 1:length(B)
H = sham(Sys,[0 0 1]*B(k));
[V,E] = eig(H);
for i = 1:6
for j = i+1:6
u = V(:,i);
v = V(:,j);
[S_x,S_y,S_z] = sop(Sys.S,'x','y','z');
c = bmagn*2/planck/1e9;
pop_diff = (-1/exp(abs(E(i, i))*1e6*planck/boltzm/Exp.Temperature) + 1/exp(abs(E(j, j))*1e6*planck/boltzm/Exp.Temperature));
TransRate(i, j) = c^2 * pop_diff * (abs(u'*S_x*v)^2 + abs(u'*S_y*v)^2)/2/Sys.g;
end
end
TransRate1(k) = sum(TransRate, 'all');
end
When I compare TransRate0 (the estimate given by resfields) and TransRate1 (my estimate), they do not coincide. Can you see where I got wrong?
Thanks!
It looks like your population difference is not correct.
Try something like:
Code: Select all
pop = exp(-diag(E)*1e6*planck/boltzm/Exp.Temperature);
pop = pop/sum(pop);
pop_diff = pop - pop.';