qml.qchem.fermionic_hamiltonian

fermionic_hamiltonian(mol, cutoff=1e-12, core=None, active=None)[source]

Return a function that computes the fermionic Hamiltonian.

Parameters
  • mol (Molecule) – the molecule object

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

  • core (list[int]) – indices of the core orbitals

  • active (list[int]) – indices of the active orbitals

Returns

function that computes the fermionic hamiltonian

Return type

function

Example

>>> symbols  = ['H', 'H']
>>> geometry = np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]], requires_grad = False)
>>> alpha = np.array([[3.42525091, 0.62391373, 0.1688554],
>>>                   [3.42525091, 0.62391373, 0.1688554]], requires_grad=True)
>>> mol = qml.qchem.Molecule(symbols, geometry, alpha=alpha)
>>> args = [alpha]
>>> h = fermionic_hamiltonian(mol)(*args)