qit.ho.husimi

qit.ho.husimi(rho, alpha=None, z=0, *, res=(40, 40), lim=(- 2, 2, - 2, 2))

Husimi probability distribution.

Parameters
  • rho (State) – harmonic oscillator state (truncated)

  • alpha (array[complex]) – displacement parameters of the reference state

  • z (complex) – squeezing parameter of the reference state

  • res (tuple[int]) – if alpha is None: number of points in the alpha grid, (nx, ny)

  • lim (tuple[float]) – if alpha is None: limits of the alpha grid, (xmin, xmax, ymin, ymax)

Returns

Husimi distribution H_rho(alpha), H.shape == alpha.shape

Return type

array[float] [, array[float], array[float]]

Returns the Husimi probability distribution \(H(\im{\alpha}, \re{\alpha})\) corresponding to the harmonic oscillator state rho given in the number basis:

\[H(\rho, \alpha, z) = \frac{1}{\pi} \bra{\alpha, z} \rho \ket{\alpha, z}\]

z is the optional squeezing parameter for the reference state: \(\ket{\alpha, z} := D(\alpha) S(z) \ket{0}\). The integral of \(H(\alpha)\) over \(\alpha\) is normalized to unity.

If alpha is None it is set to a 2d grid of points with the resolution and limits set by res and lim. In addition to H, the 1d x and y coordinate vectors of the grid are returned.