template class QPanda::FermionOp¶
Overview¶
Fermion operator class. More…
Detailed Documentation¶
Fermion operator class.
Construction¶
Constructor of FermionOp class.
Methods¶
Compute and return the normal ordered form of a FermionOperator.
In our convention, normal ordering implies terms are ordered from highest tensor factor (on left) to lowest (on right). In addition: a^dagger comes before a
Returns:
FermionOp the normal ordered form of a FermionOperator
get the max index
Returns:
size_t the max index
Judge whether it is empty.
Returns:
bool if data is empty, return true, or else return false
data to string
Returns:
std::string convert data val to string
set error threshold
Parameters:
double |
threshold val |
get error threshold
Returns:
double return the error threshold val
get data
Returns:
FermionData return fermion data
overload +
Returns:
FermionOp return (FermionOp_1 + FermionOp_2)
overload -
Returns:
FermionOp return (FermionOp_1 - FermionOp_2)
overload *
Returns:
FermionOp return (FermionOp_1 * FermionOp_2)
overload +=
Returns:
FermionOp & return (FermionOp_1 += FermionOp_2)
overload -=
Returns:
FermionOp & return (FermionOp_1 -= FermionOp_2)
overload *=
Returns:
FermionOp & return (FermionOp_1 *= FermionOp_2)