Open rmlarose opened 3 years ago
Hey Ryan, I also think it would be nice if we had a way to use FQE wavefunctions to calculate expectation values of FermionOperators that obey the symmetries of the wavefunction. The simplest thing one could do is partition the FermionOperator into individual terms and then convert to a SparseOperator and calculate the expectation value. It would be better if this happened behind an API. Any interest in implementing this?
Hey Ryan, I also think it would be nice if we had a way to use FQE wavefunctions to calculate expectation values of FermionOperators that obey the symmetries of the wavefunction. The simplest thing one could do is partition the FermionOperator into individual terms and then convert to a SparseOperator and calculate the expectation value. It would be better if this happened behind an API. Any interest in implementing this?
Sure thing! I think I have a clear idea how to do this but may need to ask some domain-specific questions, though.
There's a few things that can be cleaned up with these classes, notably the methods
diagonal_coulomb
,diagonal
, etc. Some of these can just be inferred from the type, i.e. usingisinstance(ham, DiagonalCoulomb)
instead ofAlternatively, one define
Hamiltonian
with arguments foris_diagonal
,is_diagonal_coulomb
, etc., which would clean things up.I think the inheritance structure could be fixed in some places. E.g.,
DiagonalCoulomb
should inherit fromDiagonal
instead of fromHamiltonian
as far as I understand.