6

enter image description here

I am trying to simulate a system of j qubits and for visualization of the dynamics considering the Husimi distribution of the state. To carry out the projection onto coherent states I have proceeded in the following manner

    R=LA.expm(1j*theta*(Sx*np.sin(phi)-Sy*np.cos(phi)))
    alpha=dot(R,psi0)

Where alpha represents the coherent state centered at (phi,theta), R is Rotation matrix, psi_0 spin state of |j,j> and Sx,Sy are spin operators along x and y direction respectively. I am using scipy's linalg library to carry out exponentiation of matrix. From all such alpha's I am able to construct the coherent distribution.

I am able to produce supposedly correct distribution for most cases but for some cases, I am getting negative values which should not be obtained for Husimi distribution, though the order of these are very less and might be related to an error in numerical approximation.

I am doubtful about my implementation and would like to clarify if the methodology that I have followed is correct or is there any better alternative for the same.

Sanchayan Dutta
  • 17,497
  • 7
  • 48
  • 110
Sudheesh
  • 61
  • 2
  • What is such an incorrect case? If you could do a plot that illustrates, it may be easier to identify if it is numerical error. – AHusain Oct 19 '18 at 19:59
  • @AHusain I've included the plot that shows negative value. Let me know what you think. – Sudheesh Oct 19 '18 at 20:07
  • It seems as though your negative values are tiny - on the order of $10^{-18}$. This is consistent with zero, to machine precision. How are you computing the Husimi function? If you are using pure states then you can enforce positivity by first computing the overlap between your pure state and a spin-coherent state, then taking the absolute value squared of that quantity. Similar results could be obtained using mixed states if you first decompose the state into a convex combination of pure states, find each of their absolute-squared overlaps, then sum them together. – Quantum Mechanic May 21 '21 at 19:25
  • I bet your plotting algorithm is trying to interpolate between a bunch of values of the Husimi function, and that its interpolation function is going slightly negative, which can happen because you might not have control over the interpolation algorithm. You could strictly stay away from this if you make a grid, explicitly calculate the Husimi function over that grid, then plot the value of the Husimi function pixel by pixel – Quantum Mechanic May 21 '21 at 19:27

0 Answers0