OpenFermion icon indicating copy to clipboard operation
OpenFermion copied to clipboard

Refactoring hermitian conjugation etc functions out of operator_utils

Open obriente opened this issue 5 years ago • 1 comments

PR #632 has cleaned up most of operator_utils, but the hermitian conjugation routines remain there. I'd like to refactor them into SymbolicOperator/PolynomialTensor - perhaps as an op.hc() or op.herm() routine (kinda tempting to go the numpy route and make op.conj().T but the extra processing requirements to implement this function twice seems like a bad idea). Also, this will break a lot of code (both internally and externally), what do people think?

(I guess we can perhaps implement hermitian_conjugated as a function for a while and then depreciate it later.)

Starting this issue to discuss the best way to implement what is a pretty important routine --- it's probably best we get this right the first time.

obriente avatar Jul 30 '20 21:07 obriente

Why not leave hermitian conjugation as a util function and add an abstract method on SymbolicOperator, hc(), where each subclass implements their own version of .hc()?

kharazity avatar Mar 02 '21 03:03 kharazity