fh_comm.field_ops.FieldOp

class fh_comm.field_ops.FieldOp(terms: Sequence[ProductFieldOp])[source]

Bases: object

Sum of products of fermionic field operators.

Methods

as_compact_matrix

Generate the sparse matrix representation on a virtual lattice consisting of the sites acted on by the field operators.

as_matrix

Generate the sparse matrix representation of the operator embedded in a square lattice with dimensions latt_shape and periodic boundary conditions.

quadratic_coefficients

Find the coefficients in the representation \(\sum_{i,j} h_{ij} a^{\dagger}_i a_j\), assuming that the field operator actually has this form.

support

Support of the operator: lattice sites which it acts on (including spin).

__add__(other)[source]

Logical sum.

__matmul__(other)[source]

Logical product.

__str__() str[source]

Represent the operator as a string.

__sub__(other)[source]

Logical difference.

as_compact_matrix()[source]

Generate the sparse matrix representation on a virtual lattice consisting of the sites acted on by the field operators.

as_matrix(latt_shape: Sequence[int], translatt: SubLattice | None = None)[source]

Generate the sparse matrix representation of the operator embedded in a square lattice with dimensions latt_shape and periodic boundary conditions. Optionally using shifted copies on sublattice translatt.

quadratic_coefficients()[source]

Find the coefficients in the representation \(\sum_{i,j} h_{ij} a^{\dagger}_i a_j\), assuming that the field operator actually has this form.

support() list[tuple][source]

Support of the operator: lattice sites which it acts on (including spin).