fh_comm.hamiltonian_ops.NumberOp

class fh_comm.hamiltonian_ops.NumberOp(i: Sequence[int], s: int, coeff: float)[source]

Bases: HamiltonianOp

Number operator \(n_{i\sigma}\).

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

__add__(other)[source]

Logical sum.

__neg__()[source]

Logical negation.

__str__() str[source]

Represent the operator as a string.

__sub__(other)[source]

Logical difference.

as_field_operator() FieldOp[source]

Represent the operator in terms of fermionic field operators.

property fermi_weight: int

Maximum number of fermionic creation and annihilation operators multiplied together.

is_zero() bool[source]

Indicate whether the operator acts as zero operator.

norm_bound() float[source]

Upper bound on the spectral norm of the operator.

normalize() tuple[source]

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

proportional(other) bool[source]

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

support() list[tuple][source]

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

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

Translate by shift and return the translated operator.