qit.ho.wigner

qit.ho.wigner(rho, alpha=None, *, res=(20, 20), lim=(- 2, 2, - 2, 2), method=0)

Wigner quasi-probability distribution.

Parameters
  • rho (State) – harmonic oscillator state

  • alpha (array[complex]) – phase space points for which to compute the Wigner function

  • 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

wigner(alpha), alpha_re, alpha_im

Return type

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

Returns the Wigner quasi-probability distribution \(W(\im{\alpha}, \re{\alpha})\) corresponding to the harmonic oscillator state rho given in the number basis.

For a normalized state, the integral of W is normalized to unity.

NOTE: The truncation of the number state space to a finite dimension results in spurious circular ripples in the Wigner function outside a given radius. To increase the accuracy, increase the truncation dimension.