qml.qchem.repulsion_tensor¶
- repulsion_tensor(basis_functions)[source]¶
Return a function that computes the electron repulsion tensor for a given set of basis functions.
- Parameters
basis_functions (list[BasisFunction]) – basis functions
- Returns
function that computes the electron repulsion tensor
- 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] >>> repulsion_tensor(mol.basis_set)(*args) array([[[[0.77460595, 0.56886144], [0.56886144, 0.65017747]], [[0.56886144, 0.45590152], [0.45590152, 0.56886144]]], [[[0.56886144, 0.45590152], [0.45590152, 0.56886144]], [[0.65017747, 0.56886144],[0.56886144, 0.77460595]]]])
code/api/pennylane.qchem.repulsion_tensor
Download Python script
Download Notebook
View on GitHub