OpenFermion
OpenFermion copied to clipboard
Improve runtime type checking in symmetry_conserving_bravyi_kitaev
Since the current runtime type checking in symmetry_conserving_bravyi_kitaev
uses type()
, it raises an error when one uses a subclass of FermionOperator
.
To cover such cases, it is better to use isinstance()
instead of type()
.