operatorQ

◼ operatorQ[c] returns True if c is an operator.

◼ operatorQ is used as a non-specific test of operator character of a quantity. Specific test for fermionic operators is fermionQ.

◼ Typically the head of operator expression is tested.

◼ See also: fermionQ.

Further examples

Load sneg

<< sneg`sneg`;

Let c be a fermionic operator

snegfermionoperators[c]

We can test the head or an entire operator.

operatorQ[c]
operatorQ[c[CR]]
operatorQ[c[CR, UP]]

Examples of commands that have special action on operator quantities.

conj[c[CR]]
conj[c[AN]]
vev[c[CR]]
vev[c[AN]]
invertspin[c[CR, UP]]
invertspin[c[CR, DO]]
zeroonvac[c[CR] + c[AN]]

Let d be a general (in particular non-fermionic) operator. Use pretty printing.

operatorQ[d] = True
SnegPPoperator[d]

Pauli rule is not imposed, there is no reordering.

nc[d[CR], d[CR]]
nc[d[AN], d[CR]]