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