triqs.operators.operators

Second-quantization operators and many-body operator algebra.

The Operator class represents an element of the fermionic operator algebra: a linear combination of normally ordered monomials in creation and annihilation operators, with real or complex coefficients. It supports the full set of arithmetic operations (+, -, *, / by a scalar) and preserves normal ordering as terms are combined.

Operators are built from the canonical factories:

  • c() — annihilation operator \(\hat{c}_\alpha\),

  • c_dag() — creation operator \(\hat{c}_\alpha^\dagger\),

  • n() — number operator \(\hat{n}_\alpha = \hat{c}_\alpha^\dagger \hat{c}_\alpha\).

The single-particle state index \(\alpha\) is an arbitrary sequence of integers, strings or floats; new indices are introduced on the fly as expressions are constructed. The Hermitian conjugate is computed by the free function dagger(). Higher-level utilities (model Hamiltonians, observables, Coulomb tensors, coefficient extractors) are provided in triqs.operators.util.

Functions

c

Create an annihilation operator \(\hat{c}_{\alpha}\).

c_dag

Create a creation operator \(\hat{c}_{\alpha}^{\dagger}\).

dagger

Compute the Hermitian conjugate (dagger) of the many-body operator \(\hat{O}\).

is_op_hermitian

Check if a many-body operator is Hermitian within a given precision.

n

Create a number operator \(\hat{n}_{\alpha} = \hat{c}_{\alpha}^{\dagger} \hat{c}_{\alpha}\).

Classes

CanonicalOpsT

Second quantization creation/annihilation operator.

Operator

Generic many-body operator.