# Operator

Operators define quantum mechanical operators implemented in second quantization. The most general operator one can implement is: \begin{align} O&=\alpha^{(0,0)} \\ &+\sum_{\tau} \alpha^{(0,1)}_{\tau} a^{\phantom{\dagger}}_{\tau} + \alpha^{(1,0)}_{\tau} a^{\dagger}_{\tau} \\ &+\sum_{\tau_1,\tau_2} \alpha^{(0,2)}_{\tau_1,\tau_2} a^{\phantom{\dagger}}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2} + \alpha^{(1,1)}_{\tau_1,\tau_2} a^{\dagger}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2} + \alpha^{(2,0)}_{\tau_1,\tau_2} a^{\dagger}_{\tau_1}a^{\dagger}_{\tau_2} \\ & + \sum_{\tau_1,\tau_2,\tau_3} \alpha^{(0,3)}_{\tau_1,\tau_2,\tau_3} a^{\phantom{\dagger}}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2}a^{\phantom{\dagger}}_{\tau_3} + \alpha^{(1,2)}_{\tau_1,\tau_2,\tau_3} a^{\dagger}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2}a^{\phantom{\dagger}}_{\tau_3} + \alpha^{(2,1)}_{\tau_1,\tau_2,\tau_3} a^{\dagger}_{\tau_1}a^{\dagger}_{\tau_2}a^{\phantom{\dagger}}_{\tau_3} + \alpha^{(3,0)}_{\tau_1,\tau_2,\tau_3} a^{\dagger}_{\tau_1}a^{\dagger}_{\tau_2}a^{\dagger}_{\tau_3} \\ &+ \dots \end{align} Note that as $a^{\dagger}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2} = \delta_{\tau_1,\tau_2}-a^{\phantom{\dagger}}_{\tau_2}a^{\dagger}_{\tau_1}$ for Fermions and $a^{\dagger}_{\tau_1}a^{\phantom{\dagger}}_{\tau_2} = a^{\phantom{\dagger}}_{\tau_2}a^{\dagger}_{\tau_1}-\delta_{\tau_1,\tau_2}$ for Bosons the equation above allows for any operator to be defined. Operator defines an object that can store the most general operator. Several methods that act on this object are implemented. Furthermore one can access several properties of Operators.

Operators can act on Fermions and Bosons. An operator O has O.NF Fermions and O.NB Bosons. The Fermions are indexed from 0 to O.NF-1, the Bosons are indexed from O.NF to O.NF+O.NB-1.