Spin Dynamics Forum
General Discussions => General Discussion => Topic started by: Ronghui on September 09, 2012, 04:01:05 AM

If I have the density matrix for paraHydrogen as 1/2 {{0,0,0,0},....}, how can I convert it into Bra and Ket form? Thanks.
Ronghui

One way is to get your braket density matrices (using kronecker products) and then compute the expansion coefficients with your density matrix, i.e.
rho=a1*A1+a2*A2+... =>
a_k=trace(A_k'*rho)/norm(A_k);
So standard orthogonal expansion in matrix space, see Lecture 12 of the Spin Dynamics course.

Thank you very much.

Hi Ronghui,
There is a neat trick for this, which is used internally in SpinDynamica. If the density matrix is represented in the Zeeman ketbra basis, it can be flattened to a vector corresponding to the coefficients of the Zeeman ketbra operators. One can then take the dot product with the appropriatelyordered list of basis operators.
To solve your problem in SpinDynamica you can use the ExpressOperator routine, which works moreorless in the way that Ilya (kuprov) has described:
op=opI[1].opI[2]
ExpressOperator[
op,ZeemanKetBraOperatorBasis[]
]
For more information you can look up the help message by executing
?ExpressOperator