Skip to content

Commit

Permalink
import FermionOperator from operators (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung authored Aug 20, 2024
1 parent 69b1caa commit 02ec556
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions python/ffsim/hamiltonians/diagonal_coulomb_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
from pyscf.fci.direct_uhf import make_hdiag
from scipy.sparse.linalg import LinearOperator

from ffsim._lib import FermionOperator
from ffsim.contract.diag_coulomb import diag_coulomb_linop
from ffsim.contract.num_op_sum import num_op_sum_linop
from ffsim.operators.fermion_action import cre_a, cre_b, des_a, des_b
from ffsim.operators import FermionOperator, cre_a, cre_b, des_a, des_b
from ffsim.states import dim


Expand Down
3 changes: 1 addition & 2 deletions python/ffsim/hamiltonians/molecular_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
from scipy.sparse.linalg import LinearOperator
from typing_extensions import deprecated

from ffsim._lib import FermionOperator
from ffsim.cistring import gen_linkstr_index
from ffsim.operators.fermion_action import cre_a, cre_b, des_a, des_b
from ffsim.operators import FermionOperator, cre_a, cre_b, des_a, des_b
from ffsim.states import dim


Expand Down
2 changes: 1 addition & 1 deletion python/ffsim/protocols/fermion_operator_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from typing import Any, Protocol

from ffsim._lib import FermionOperator
from ffsim.operators import FermionOperator


class SupportsFermionOperator(Protocol):
Expand Down
2 changes: 1 addition & 1 deletion python/ffsim/protocols/linear_operator_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from scipy.sparse.linalg import LinearOperator

from ffsim import states
from ffsim._lib import FermionOperator
from ffsim.operators import FermionOperator


class SupportsLinearOperator(Protocol):
Expand Down

0 comments on commit 02ec556

Please sign in to comment.