Loading [MathJax]/jax/output/HTML-CSS/jax.js

qml.qchem.mol_density_matrix

mol_density_matrix(n_electron, c)[source]

Compute the molecular density matrix.

The density matrix P is computed from the molecular orbital coefficients C as

Pμν=Ni=1CμiCνi,

where N=Nelectrons/2 is the number of occupied orbitals. Note that the total density matrix is the sum of the α and β density matrices, P=Pα+Pβ.

Parameters
  • n_electron (integer) – number of electrons

  • c (array[array[float]]) – molecular orbital coefficients

Returns

density matrix

Return type

array[array[float]]

Example

>>> c = np.array([[-0.54828771,  1.21848441], [-0.54828771, -1.21848441]])
>>> n_electron = 2
>>> mol_density_matrix(n_electron, c)
array([[0.30061941, 0.30061941], [0.30061941, 0.30061941]])