Skip to content

dq.plot.wigner_mosaic

wigner_mosaic(
    states: ArrayLike,
    *,
    n: int = 8,
    nrows: int = 1,
    w: float = 3.0,
    h: float | None = None,
    xmax: float = 5.0,
    ymax: float | None = None,
    vmax: float = 2 / jnp.pi,
    npixels: int = 101,
    cmap: str = "dq",
    interpolation: str = "bilinear",
    cross: bool = False
)

Plot the Wigner function of multiple states in a mosaic arrangement.

Warning

Documentation redaction in progress.

See dq.plot.wigner() for more details.

Examples

>>> psis = [dq.fock(3, i) for i in range(3)]
>>> dq.plot.wigner_mosaic(psis)

plot_wigner_mosaic_fock

>>> n = 16
>>> a = dq.destroy(n)
>>> H = dq.zero(n)
>>> jump_ops = [a @ a - 4.0 * dq.eye(n)]  # cat state inflation
>>> psi0 = dq.coherent(n, 0)
>>> tsave = jnp.linspace(0, 1.0, 101)
>>> result = dq.mesolve(H, jump_ops, psi0, tsave)
>>> dq.plot.wigner_mosaic(result.states, n=6, xmax=4.0, ymax=2.0)

plot_wigner_mosaic_cat

>>> n = 16
>>> a = dq.destroy(n)
>>> H = dq.dag(a) @ dq.dag(a) @ a @ a  # Kerr Hamiltonian
>>> psi0 = dq.coherent(n, 2)
>>> tsave = jnp.linspace(0, jnp.pi, 101)
>>> result = dq.sesolve(H, psi0, tsave)
>>> dq.plot.wigner_mosaic(result.states, n=25, nrows=5, xmax=4.0)

plot_wigner_mosaic_kerr