0
|
7522 Views
|
5 Replies
|
7 Total Likes
View groups...
Share
GROUPS:

# Von Neumann equation

Posted 11 years ago
 I'm trying to symbolically integrate the Von Neumann equation for a two-level system with some basic Hamiltonians. Thus, I want to solveI \[HBar] \[Rho]'[t] = H[t].\[Rho] - \[Rho].H[t]Where \[Rho] is a 2x2 matrix. In the simplest case, H[t] will be the Pauli sigma X matrix.What's the proper way of setting this problem up using DSolve?
5 Replies
Sort By:
Posted 11 years ago
 Perfect, thank you.
Posted 11 years ago
 You can also try this:\[Rho]M[t_] = Table[\[Rho][i, j][t], {i, 2}, {j, 2}]H = PauliMatrixsol1 = DSolve[{I \[HBar] \[Rho]M'[t] ==     H.\[Rho]M[t] - \[Rho]M[t].H, \[Rho]M ==     Table[\[Rho]0[i, j], {i, 2}, {j, 2}]}, Flatten[\[Rho]M[t]], t]or more elegantlysol2 = MatrixExp[-I t H/\[HBar]].Table[\[Rho]0[i, j], {i, 2}, {j,     2}].Simplify[ConjugateTranspose[MatrixExp[-I t H/\[HBar]]],    Element[{t, \[HBar]}, Reals]]
Posted 11 years ago
 They key point is that you can't just define H and ? to be interpreted as matrix values functions, since by default symbols are interpreted as complex numbers. So you have to define ? and H to be matrices, like thisIn:= \[Rho][t_] := {{a[t], b[t]}, {c[t], d[t]}}In:= H[t_] := PauliMatrixYou can then type in commutation relation pretty much as expected, except you must remember that your unknowns are a,b,c, and d.In:= DSolve[{I \[HBar] \[Rho]'[t] ==H[t].\[Rho][t] - \[Rho][t].H[t], \[Rho] == PauliMatrix}, {a, b, c,d}, t]Out= {{a -> Function[{t}, Cos[(2 t)/\[HBar]]],b -> Function[{t}, I Sin[(2 t)/\[HBar]]],c -> Function[{t}, -I Sin[(2 t)/\[HBar]]],d -> Function[{t}, -Cos[(2 t)/\[HBar]]]}}You can now substitute this into to get your solution. Note the use if Set (=) rather than SetDelayed (:=) to make sure the substitution is done immediately, rather than each time you evaluate ?.In:= \[Rho][t_] = \[Rho][t] /. First[%]Out= {{Cos[(2 t)/\[HBar]],I Sin[(2 t)/\[HBar]]}, {-I Sin[(2 t)/\[HBar]], -Cos[(2 t)/\[HBar]]}}
Posted 11 years ago
 Thanks for the help.Itai, that looks like exactly what I wanted. However, I still seem to get an error when I run the code you suggested In:= \[Rho][t_] := {{a[t], b[t]}, {c[t], d[t]}} H[t_] := PauliMatrix DSolve[{I \[HBar] \[Rho]'[t] ==     H[t].\[Rho] - \[Rho].H[t], \[Rho] == PauliMatrix}, {a, b, c,    d}, t]  During evaluation of In:= DSolve::nolist: List encountered within {{{I \[HBar] (a^\[Prime])[t],I \[HBar] (b^\[Prime])[t]},{I \[HBar] (c^\[Prime])[t],I \[HBar] (d^\[Prime])[t]}}==-\[Rho].{{0,1},{1,0}}+{{0,1},{1,0}}.\[Rho]}. There should be no lists on either side of the equations. >>  Out= DSolve[{{{I \[HBar] Derivative[a],      I \[HBar] Derivative[b]}, {I \[HBar] Derivative[c],      I \[HBar] Derivative[d][       t]}} == -\[Rho].{{0, 1}, {1, 0}} + {{0, 1}, {1,        0}}.\[Rho], {{a, b}, {c, d}} == {{1,      0}, {0, -1}}}, {a, b, c, d}, t][/b]Do you know what this means?
Posted 11 years ago
 There was a copy/paste problem.  On the RHS of the equation, it should have beenH[t].\[Rho][t] - \[Rho][t] . H[t](Notice that the ? is now ?[ t ]).  I have fixed my original post, so copy and pasting it out should work now.