qml.qchem.fermionic_observable

fermionic_observable(constant, one=None, two=None, cutoff=1e-12)[source]

Create a fermionic observable from molecular orbital integrals.

Parameters
  • constant (array[float]) – the contribution of the core orbitals and nuclei

  • one (array[float]) – the one-particle molecular orbital integrals

  • two (array[float]) – the two-particle molecular orbital integrals

  • cutoff (float) – cutoff value for discarding the negligible integrals

Returns

fermionic coefficients and operators

Return type

tuple(array[float], list[int])

Example

>>> constant = np.array([1.0])
>>> integral = np.array([[0.5, -0.8270995], [-0.8270995, 0.5]])
>>> coeffs, ops = fermionic_observable(constant, integral)
>>> ops
[[], [0, 0], [0, 2], [1, 1], [1, 3], [2, 0], [2, 2], [3, 1], [3, 3]]