dq.vacuum
vacuum(dim: int) -> QArray
Returns the ket of the vacuum state.
It is the Fock state with zero photon, defined by \(\ket{0} = \begin{pmatrix}1\\0\\\vdots\end{pmatrix}\).
Parameters:
-
dim–Hilbert space dimension of the mode.
Returns:
-
(qarray of shape (dim, 1))
–
Ket \(\ket{0}\).
Examples:
>>> dq.vacuum(4)
QArray: shape=(4, 1), dims=(4,), dtype=complex64, layout=dense
[[1.+0.j]
[0.+0.j]
[0.+0.j]
[0.+0.j]]