Author Topic: how to convert density matrix into density operator?  (Read 4766 times)

Ronghui

  • Member
  • *
  • Posts: 16
    • View Profile
how to convert density matrix into density operator?
« on: September 09, 2012, 04:01:05 AM »
If I have the density matrix for para-Hydrogen as 1/2 {{0,0,0,0},....}, how can I convert it into Bra and Ket form? Thanks.

Ronghui

« Last Edit: September 14, 2012, 09:43:37 PM by Ronghui »

kuprov

  • Administrator
  • Member
  • *****
  • Posts: 58
    • View Profile
Re: how to convert density matrix into density operator?
« Reply #1 on: September 17, 2012, 05:34:29 PM »
One way is to get your bra-ket 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.

Ronghui

  • Member
  • *
  • Posts: 16
    • View Profile
Re: how to convert density matrix into density operator?
« Reply #2 on: September 23, 2012, 01:09:24 PM »
Thank you very much.

MichaelTayler

  • Member
  • *
  • Posts: 14
    • View Profile
    • Visit my website
Re: how to convert density matrix into density operator?
« Reply #3 on: December 18, 2012, 10:50:24 AM »
Hi Ronghui,

There is a neat trick for this, which is used internally in SpinDynamica.  If the density matrix is represented in the Zeeman ket-bra basis, it can be flattened to a vector corresponding to the coefficients of the Zeeman ket-bra operators.  One can then take the dot product with the appropriately-ordered list of basis operators.

To solve your problem in SpinDynamica you can use the ExpressOperator routine, which works more-or-less in the way that Ilya (kuprov) has described:

Code: [Select]
op=opI[1].opI[2]

ExpressOperator[
op,ZeemanKetBraOperatorBasis[]
]

For more information you can look up the help message by executing

Code: [Select]
?ExpressOperator