quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.51k stars 372 forks source link

Why does MajoranaOperator not subclass SymbolicOperator? #827

Closed cvjjm closed 4 months ago

cvjjm commented 1 year ago

It seems odd that MajoranaOperator is not a sub-class of SymbolicOperator. A notable side effect is that contrary to QubitOperator and other SymbolicOperators, MajoranaOperator does not auto-remove terms that are below EQ_TOLERANCE. Not the end of the world but a strange inconsistency...

kevinsung commented 1 year ago

SymbolicOperator stores (index, action) pairs. For MajoranaOperator, there is no action, so it does not quite map onto the SymbolicOperator class.