dq.destroy
destroy(*dims: int) -> Array | tuple[Array, ...]
Returns a bosonic annihilation operator, or a tuple of annihilation operators for a multi-mode system.
If multiple dimensions are provided \(\mathtt{dims}=(n_1,\dots,n_N)\), it returns a tuple with len(dims) operators \((A_1,\dots,A_N)\), where \(A_k\) is the annihilation operator acting on the \(k\)-th subsystem within the composite Hilbert space of dimension \(n=\prod n_k\): $$ A_k = I_{n_1} \otimes\dots\otimes a_{n_k} \otimes\dots\otimes I_{n_N}. $$
Parameters
-
*dims
–
Hilbert space dimension of each mode.
Returns
(array or tuple of arrays, each of shape (n, n)) Annihilation operator(s), with n = prod(dims).
Examples
Single-mode \(a\):
>>> dq.destroy(4)
Array([[0. +0.j, 1. +0.j, 0. +0.j, 0. +0.j],
[0. +0.j, 0. +0.j, 1.414+0.j, 0. +0.j],
[0. +0.j, 0. +0.j, 0. +0.j, 1.732+0.j],
[0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j]], dtype=complex64)
Mult-mode \(a\otimes I_3\) and \(I_2\otimes b\):
>>> a, b = dq.destroy(2, 3)
>>> a
Array([[0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j],
[0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j],
[0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 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, 0.+0.j, 0.+0.j, 0.+0.j]], dtype=complex64)
>>> b
Array([[0. +0.j, 1. +0.j, 0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j],
[0. +0.j, 0. +0.j, 1.414+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, 1. +0.j, 0. +0.j],
[0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j, 1.414+0.j],
[0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j]], dtype=complex64)