dq.plot.fock
fock(
state: ArrayLike,
*,
ax: Axes | None = None,
allxticks: bool = False,
ymax: float | None = 1.0,
color: str = colors["blue"],
alpha: float = 1.0,
label: str = ""
)
Plot the photon number population of a state.
Warning
Documentation redaction in progress.
Examples
>>> psi = dq.coherent(16, 2.0)
>>> dq.plot.fock(psi)
>>> # the even cat state has only even photon number components
>>> psi = dq.unit(dq.coherent(32, 3.0) + dq.coherent(32, -3.0))
>>> dq.plot.fock(psi, allxticks=False, ymax=None)
>>> dq.plot.fock(dq.coherent(16, 1.0), alpha=0.5)
>>> dq.plot.fock(dq.coherent(16, 2.0), ax=plt.gca(), alpha=0.5, color='red')