qrisp.operators.fermionic.FermionicOperator.coeffs#

FermionicOperator.coeffs()[source]#

Returns the coefficients of the operator.

Returns:
ndarray

The coefficients.

Examples

>>> from qrisp.operators import a, c
>>> O = a(0)*c(1)+a(1)*c(0)+0.5*a(1)+0.5*c(1)
>>> O.coeffs()
array([1. , 1. , 0.5, 0.5])