dq.zero
zero(*dims: int) -> Array
Returns the null operator.
If multiple dimensions are provided \(\mathtt{dims}=(n_1,\dots,n_N)\), it returns the null operator of the composite Hilbert space of dimension \(n=\prod n_k\): $$ 0_n = 0_{n_1}\otimes\dots\otimes 0_{n_N}. $$
Parameters
-
*dims
–
Hilbert space dimension of each subsystem.
Returns
(array of shape (n, n)) Null operator, with n = prod(dims).
Examples
Single-mode \(0_4\):
>>> dq.zero(4)
Array([[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, 0.+0.j]], dtype=complex64)
Multi-mode \(0_2 \otimes 0_3\):
>>> dq.zero(2, 3)
Array([[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, 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],
[0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j]], dtype=complex64)