Skip to content

Commit 1fa498b

Browse files
Document InteractionOperator Hermitian assumptions (#1306)
Fixes #479. This updates the `InteractionOperator` docstring to clarify that the representation is intended for Hermitian interaction Hamiltonians, such as molecular electronic-structure Hamiltonians. For arbitrary non-Hermitian fermionic operators, users should use `FermionOperator`. This is important because transform routines specialized for `InteractionOperator` may rely on Hermitian structure assumptions. Co-authored-by: Michael Hucka <mhucka@google.com>
1 parent 9fec6a2 commit 1fa498b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

src/openfermion/ops/representations/interaction_operator.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,17 @@ class InteractionOperator(PolynomialTensor):
2929
conserve particle number and spin. The most common examples of data that
3030
will use this structure are molecular Hamiltonians. In principle,
3131
everything stored in this class could also be represented using the more
32-
general FermionOperator class. However, this class is able to exploit
33-
specific properties of how fermions interact to enable more numerically
34-
efficient manipulation of the data. Note that the operators stored in this
35-
class take the form:
32+
general FermionOperator class.
33+
34+
This representation is intended for Hermitian interaction Hamiltonians,
35+
such as molecular electronic-structure Hamiltonians. It is not a
36+
general-purpose container for arbitrary non-Hermitian fermionic operators;
37+
use FermionOperator for those cases. Transform routines specialized for
38+
InteractionOperator may rely on these Hermitian structure assumptions.
39+
40+
However, this class is able to exploit specific properties of how fermions
41+
interact to enable more numerically efficient manipulation of the data. Note
42+
that the operators stored in this class take the form:
3643
3744
$$
3845
\text{constant} + \sum_{p, q} h_{p, q} a^\dagger_p a_q +

0 commit comments

Comments
 (0)