dq.fdestroy
fdestroy(n: int, *, layout: Layout | None = None) -> QArray | tuple[QArray, ...]
Returns a fermionic annihilation operator, or a tuple of annihilation operators for a multi-mode system.
If n=1, it returns the single-mode annihilation operator
\(a = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}\). If n>1, it returns a tuple
with n operators \((a_1,\dots,a_n)\) acting on the composite Hilbert space of
dimension \(2^n\). To satisfy the anti-commutation relations
\(\{a_j, a_k^\dag\} = \delta_{jk}\) and \(\{a_j, a_k\} = 0\), they are constructed
with the Jordan-Wigner transformation:
$$
a_k = \sigma_z^{\otimes (k-1)} \otimes a \otimes I_2^{\otimes (n-k)}.
$$
Parameters:
-
n–Number of fermionic modes.
-
layout–Matrix layout (
dq.dense,dq.diaorNone).
Returns:
-
(qarray or tuple of qarrays, each of shape (2^n, 2^n))
–
Annihilation operator(s).
Examples:
Single-mode \(a\):
>>> dq.fdestroy(1)
QArray: shape=(2, 2), dims=(2,), dtype=complex64, layout=dia, ndiags=1
[[ â‹… 1.+0.j]
[ â‹… â‹… ]]
Multi-mode \(a_1 = a \otimes I_2\) and \(a_2 = \sigma_z \otimes a\):
>>> a1, a2 = dq.fdestroy(2)
>>> a1
QArray: shape=(4, 4), dims=(2, 2), dtype=complex64, layout=dia, ndiags=1
[[ â‹… â‹… 1.+0.j â‹… ]
[ â‹… â‹… â‹… 1.+0.j]
[ â‹… â‹… â‹… â‹… ]
[ â‹… â‹… â‹… â‹… ]]
>>> a2
QArray: shape=(4, 4), dims=(2, 2), dtype=complex64, layout=dia, ndiags=1
[[ â‹… 1.+0.j â‹… â‹… ]
[ â‹… â‹… â‹… â‹… ]
[ â‹… â‹… â‹… -1.+0.j]
[ â‹… â‹… â‹… â‹… ]]