qiskit-community / ffsim

Faster simulations of fermionic quantum circuits.
https://qiskit-community.github.io/ffsim/
Apache License 2.0
22 stars 5 forks source link

Add DiagonalCoulombHamiltonian #117

Closed kevinsung closed 3 months ago

kevinsung commented 5 months ago

This is a Hamiltonian with a diagonal Coulomb term. See Eq. (1) of https://arxiv.org/pdf/1711.04789.pdf. We can absorb the "number" term into the one body-part.

We can use the corresponding class in OpenFermion as a reference.

The implementation should be similar to MolecularHamiltonian or DoubleFactorizedHamiltonian. Something like this:

@dataclasses.dataclass(frozen=True)
class DiagonalCoulombHamiltonian:
    one_body_tensor: np.ndarray
    diag_coulomb_mat: np.ndarray

We can add a method

@staticmethod
def from_fermion_operator(op: FermionOperator) -> DiagonalCoulombHamiltonian

to initialize from a compatible FermionOperator, like the Hubbard model. Passing a FermionOperator with incompatible terms should raise an error.

bartandrews commented 5 months ago

I would like to help out with this!