Skip to main content

sites

Method of FermionOperatorBase.

sites() -> List

Returns the sites of a fermion operator in definition order. Unlike support(), this preserves the order of sites as they appear in the operator definition. Note: This function only works with fermion operators. For OperatorProduct or OperatorSum, use support() instead. Important: The order returned is the constructor order, not necessarily the order of mathematical application.

Returns

A list of indices representing the fermionic modes the operator acts on, in the order they were specified in the constructor.

Example

var op = Create(0)
var sites = sites(op) // Returns [0]