fh_comm.hamiltonian_ops.HamiltonianOp

class fh_comm.hamiltonian_ops.HamiltonianOp[source]

Bases: ABC

Parent class for fermionic Hamiltonian operators or commutators between them.

Methods

as_field_operator

Represent the operator in terms of fermionic field operators.

is_zero

Indicate whether the operator acts as zero operator.

norm_bound

Upper bound on the spectral norm of the operator.

normalize

Return a normalized copy of the operator together with its scalar prefactor.

proportional

Whether current operator is equal to 'other' up to a scalar factor.

support

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

translate

Translate by shift and return the translated operator.

Attributes

fermi_weight

Maximum number of fermionic creation and annihilation operators multiplied together.

max_nmodes_exact_norm

abstract __add__(other)[source]

Logical sum.

abstract __neg__()[source]

Logical negation.

abstract __str__() str[source]

Represent the operator as a string.

abstract __sub__(other)[source]

Logical difference.

abstract as_field_operator() FieldOp[source]

Represent the operator in terms of fermionic field operators.

abstract property fermi_weight: int

Maximum number of fermionic creation and annihilation operators multiplied together.

For example, the product of three number operators has weight 6.

abstract is_zero() bool[source]

Indicate whether the operator acts as zero operator.

abstract norm_bound() float[source]

Upper bound on the spectral norm of the operator.

abstract normalize() tuple[source]

Return a normalized copy of the operator together with its scalar prefactor.

abstract proportional(other) bool[source]

Whether current operator is equal to ‘other’ up to a scalar factor.

abstract support() list[tuple][source]

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

abstract translate(shift: Sequence[int])[source]

Translate by shift and return the translated operator.