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