So I’m currently reading this paper and there the author has measured purity of a quantum state. where its given the Hamiltonian:
$frac{1}{2} hbar omega_{0} (hat{boldsymbol{sigma}} cdot hat{mathbf{z}}) + frac{hbar lambda}{T} (hat{boldsymbol{sigma}} cdot hat{mathbf{m}}) otimes (hat{boldsymbol{sigma}} cdot hat{mathbf{n}})$
where $hat{m} = (1,1,1)$, The initial state being $langle 0 |langle 0 |$. Now I need to evolve the state and after time T.
I check the purity.
Here is the code I’ve written. I cant seem to find anything wrong with my code. The purity should come out to be 0.82 (according to the author) and in my case its 0.71