Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Operators and matrix elements

Single-electron systems

Operators acting on single-electron wave functions, or spin orbitals (ignoring the freedom of charge conjugation), take the form

ω^=ω^oω^s\hat{\omega} = \hat{\omega}^\mathrm{o} \otimes \hat{\omega}^\mathrm{s}

Pure spatial (or spin) operators refer to the situation when ω^s\hat{\omega}^\mathrm{s} (ω^o\hat{\omega}^\mathrm{o}) equals the identity operator I^s\hat{I}^\mathrm{s} (I^o\hat{I}^\mathrm{o}).

Example: The kinetic energy operator can be written

T^=p^22me(1001)p^22me\hat{T} = \frac{\hat{p}^2}{2 m_\mathrm{e}} \otimes \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \equiv \frac{\hat{p}^2}{2 m_\mathrm{e}}

Many-electron systems

One-electron operators

One-electron operators take the form

Ω^=ω^I^I^++I^I^ω^\hat{\Omega} = \hat{\omega} \otimes \hat{I} \otimes \cdots \otimes \hat{I} + \cdots + \hat{I} \otimes \hat{I} \otimes \cdots \otimes \hat{\omega}

Despite the name, one-electron operators act on many-electron wave functions, but each term in the sum has a non-trivial action only in a single particle space. Furthermore, the non-trivial one-particle operator ω^\hat{\omega} is identical in all terms in the sum.

Example: The kinetic energy operator for a NN-electron system can be written

T^=i=1Np^2(i)2me\hat{T} = \sum_{i=1}^N \frac{\hat{p}^2(i)}{2 m_\mathrm{e}}

where the particle index, ii, is used to denote in which particle space the action takes place.

Action of one-electron operators on Slater determinants

Consider a one-electron operator for an NN-electron system

Ω^=i=1Nω^(i)\hat{\Omega} = \sum_{i=1}^N \hat{\omega}(i)

The action of this operator on a Slater determinant results in a sum of NN Slater determinants, each with a single modified spin-orbital

Ω^ψ1,,ψN=ψ~1,,ψN++ψ1,,ψ~N\hat{\Omega} | \psi_1, \ldots, \psi_N \rangle = | \tilde{\psi}_1, \ldots, \psi_N \rangle + \cdots + | \psi_1, \ldots, \tilde{\psi}_N \rangle

where the modified orbitals are given by

ψ~p=ω^ψp| \tilde{\psi}_p \rangle = \hat{\omega} | \psi_p \rangle

Commutator of one-electron operators

Consider two one-electron operators for an NN-electron system

Ω^=i=1Nω^(i);Λ^=i=1Nλ^(i)\hat{\Omega} = \sum_{i=1}^N \hat{\omega}(i) ; \qquad \hat{\Lambda} = \sum_{i=1}^N \hat{\lambda}(i)

The commutator of these operators results in another one-electron operator

[Ω^,Λ^]=i=1N[ω^,λ^](i)\big[ \hat{\Omega}, \hat{\Lambda} \big] = \sum_{i=1}^N [\hat{\omega}, \hat{\lambda}](i)

Two-electron operators

Two-electron operators take the form

Ω^=j>iNω^(i,j)\hat{\Omega} = \sum_{j > i}^N \hat{\omega}(i,j)

Analogous to one-electron operators, two-electron operators act on many-electron wave functions, but each term in the sum has a non-trivial action only in two particle spaces. Furthermore, the non-trivial two-particle operator ω^(i,j)\hat{\omega}(i,j) is identical in all terms in the sum, where the particle indices, ii and jj, are used to denote in which two particle spaces the action takes place.

Example: The Coulomb repulsion operator for a NN-electron system can be written

V^ee=j>iNe24πε0rirj\hat{V}^\mathrm{e-e} = \sum_{j > i}^N \frac{e^2}{4 \pi \varepsilon_0 |\mathbf{r}_i - \mathbf{r}_j|}

where ee is the elementary charge.

Matrix elements for Slater determinants

Let Ψ|\Psi \rangle be a Slater determinant for an NN-electron system.

With Ω^\hat{\Omega} being a one-electron operator, the pertinent matrix elements become

ΨΩ^Ψ=iocciω^iΨΩ^Ψia=iω^a\begin{align*} \langle \Psi | \hat{\Omega} | \Psi \rangle &= \sum_{i}^\mathrm{occ} \langle i| \hat{\omega} | i \rangle \\ \langle \Psi | \hat{\Omega} | \Psi_{i}^{a} \rangle &= \langle i| \hat{\omega} |a \rangle \end{align*}

With Ω^\hat{\Omega} being a two-electron operator, the pertinent matrix elements become

ΨΩ^Ψ=12i,jocc[ijω^ijijω^ji]ΨΩ^Ψia=jocc[ijω^ajijω^ja]ΨΩ^Ψijab=ijω^abijω^ba\begin{align*} \langle \Psi | \hat{\Omega} | \Psi \rangle &= \frac{1}{2} \sum_{i,j}^\mathrm{occ} \left[\rule{0pt}{12pt} \langle ij| \hat{\omega} | ij \rangle - \langle ij| \hat{\omega} |ji \rangle \right] \\ \langle \Psi | \hat{\Omega} | \Psi_{i}^{a} \rangle &= \sum_{j}^\mathrm{occ} \left[\rule{0pt}{12pt} \langle ij| \hat{\omega} |aj \rangle - \langle ij| \hat{\omega} |ja \rangle \right] \\ \langle \Psi | \hat{\Omega} | \Psi_{ij}^{ab} \rangle &= \langle ij| \hat{\omega} |ab \rangle - \langle ij| \hat{\omega} |ba \rangle \end{align*}

The two-electron integrals are here written in physicist’s notation and summations run over occupied spin orbitals.

Spin orbitals

Integrals with respect to spin orbitals are here expressed in the physicist’s notation:

ωab=ψaω^ψb=ψa(r)ω^ψb(r)d3r\omega_{ab} = \langle \psi_a | \hat{\omega} | \psi_b \rangle = \int \psi_a^\dagger(\mathbf{r}) \, \hat{\omega} \, \psi_b(\mathbf{r}) \, d^3\mathbf{r}

and

ωabcd=ψaψbω^ψcψd=ψa(r1)ψb(r2)ω^ψc(r1)ψd(r2)d3r1d3r2\omega_{abcd} = \langle \psi_a \psi_b | \hat{\omega} | \psi_c \psi_d \rangle = \int \psi_a^\dagger(\mathbf{r}_1) \psi_b^\dagger(\mathbf{r}_2) \, \hat{\omega} \, \psi_c(\mathbf{r}_1) \psi_d(\mathbf{r}_2) \, d^3\mathbf{r}_1 d^3\mathbf{r}_2

Molecular orbitals

Integrals with respect to spatial (or molecular) orbitals are here expressed in the chemist’s notation:

ωab=(ϕaω^ϕb)=ϕa(r)ω^ϕb(r)d3r\omega_{ab} = ( \phi_a | \hat{\omega} | \phi_b ) = \int \phi_a^\ast(\mathbf{r}) \, \hat{\omega} \, \phi_b(\mathbf{r}) \, d^3\mathbf{r}

and

ωabcd=(ϕaϕbω^ϕcϕd)=ϕa(r1)ϕb(r1)ω^ϕc(r2)ϕd(r2)d3r1d3r2\omega_{abcd} = ( \phi_a \phi_b | \hat{\omega} | \phi_c \phi_d ) = \int \phi_a^\ast(\mathbf{r}_1) \phi_b(\mathbf{r}_1) \, \hat{\omega} \, \phi_c^\ast(\mathbf{r}_2) \phi_d(\mathbf{r}_2) \, d^3\mathbf{r}_1 d^3\mathbf{r}_2

Molecular Hamiltonian

Molecular quatum mechanics is concerned with the motions of electrons and nuclei, governed in turn by the molecular Hamiltonian

H^=T^n+H^e\hat{H} = \hat{T}_\mathrm{n} + \hat{H}_\mathrm{e}

where the nuclear kinetic energy operator is given by

T^n=A=1M22MAA2\hat{T}_\mathrm{n} = - \sum_{A=1}^M \frac{\hbar^2}{2 M_A} \nabla^2_A

The electromagnetic forces acting on nuclei and electrons are of the same order of magnitude, but since nuclear masses are at least 1800 times larger (mp/me1836.15m_\mathrm{p} / m_\mathrm{e} \approx 1836.15), we expect nuclear velocities to be much smaller than those of electrons. To decouple their motions, it is a common practice to work in the basis of the eigenstates of the electronic Hamiltonian

H^e=i=1N22mei2i=1NA=1MZAe24πε0riRA+i=1Nj>iNe24πε0rirj+A=1MB>AMZAZBe24πε0RARB\begin{align*} \hat{H}_\mathrm{e} = % &- \sum_{i=1}^N \frac{\hbar^2}{2 m_\mathrm{e}} \nabla^2_i % - \sum_{i=1}^N \sum_{A=1}^M \frac{Z_A e^2}{4 \pi \varepsilon_0 |\mathbf{r}_i - \mathbf{R}_A|}\\ % &\qquad + \sum_{i=1}^N \sum_{j>i}^N \frac{e^2}{4 \pi \varepsilon_0 |\mathbf{r}_i - \mathbf{r}_j|} % + \sum_{A=1}^M \sum_{B>A}^M \frac{Z_A Z_B e^2}{4 \pi \varepsilon_0 |\mathbf{R}_A - \mathbf{R}_B|} \end{align*}

introducing in order terms associated with the electronic kinetic energy, electron–nuclear attraction, electron–electron repulsion, and nuclear–nuclear repulsion. We use variables r\mathbf{r} and R\mathbf{R} to collectively denote the sets of electronic and nuclear coordinates, respectively.

In a brief notation, the electronic Hamiltonian is expressed in terms of the one- and two-electron components in addition to the nuclear repulsion term

H^e=ih^(i)+j>ig^(i,j)+Vn,rep\hat{H}_\mathrm{e} = % \sum_{i} \hat{h}(i) + \sum_{j>i} \hat{g}(i,j) + V^\mathrm{n,rep}

For a given fixed nuclear configuration the nuclear repulsion amounts a mere scalar number as we solve the time-independent Schrödinger equation

H^eΨKe(r;R)=VK(R)ΨKe(r;R)\hat{H}_\mathrm{e} \Psi_K^\mathrm{e}(\mathbf{r}; \mathbf{R}) = V_K(\mathbf{R}) \Psi_K^\mathrm{e}(\mathbf{r}; \mathbf{R})

where it is noted that the electronic wave functions (indexed with KK) have a parametric dependence on the nuclear coordinates. We use these states as a basis in which we express a given total rovibronic molecular wave function according to

Ψ(r,R)=KΦK(R)ΨKe(r;R)\Psi(\mathbf{r}, \mathbf{R}) = \sum_K \Phi_K(\mathbf{R}) \Psi_K^\mathrm{e}(\mathbf{r}; \mathbf{R})

Adiabatic Born–Oppenheimer approximation

In view of the differences in nuclear and electronic velocities, it is reasonable to assume that the variations of the electronic wave functions with respect to nuclear displacements are small. Moreover, the summation over electronic states is often approximated with a single term. This is known as the adiabatic approximation and it is accurate as long as the electronic states are well separated in energy.

We arrive at the adiabatic Born–Oppenheimer approximation where the total molecular wave function takes the form of a product

ΨK,k(r,R)=ΦK;k(R)ΨKe(r;R)\Psi_{K, k}(\mathbf{r}, \mathbf{R}) = \Phi_{K;k}(\mathbf{R}) \Psi_K^\mathrm{e}(\mathbf{r}; \mathbf{R})

or, in a state vector notation,

K,k=KkK|K, k \rangle = | K \rangle| k \rangle_K

In cases where it is clear from the context, the electronic state index on the nuclear state vector k|k\rangle is often omitted.

Matrix element of electronic Hamiltonian

import numpy as np
import veloxchem as vlx

mol_str = """2

C        -0.71500000    0.00000000   0.00000000
O         0.71500000    0.00000000   0.00000000
"""
molecule = vlx.Molecule.read_xyz_string(mol_str)
basis = vlx.MolecularBasis.read(molecule, "cc-pVDZ", ostream=None)

scf_drv = vlx.ScfRestrictedDriver()
scf_drv.ostream.mute()
scf_results = scf_drv.compute(molecule, basis)
Loading...

From the converged SCF optimization we can retrieve information such as

nocc = molecule.number_of_alpha_electrons()
C = scf_results["C_alpha"]  # MO coefficient matrix

E_nuc = molecule.effective_nuclear_repulsion_energy(basis)
E_tot = scf_drv.get_scf_energy()
E_elec = E_tot - E_nuc

print("Number of occupied orbitals:", nocc)

print(f"Nuclear repulsion energy: {E_nuc : 19.12f}")
print(f"Electronic energy: {E_elec : 26.12f}")
print(f"Total Hartree-Fock energy: {E_tot : 18.12f}")
Number of occupied orbitals: 7
Nuclear repulsion energy:     17.762591694646
Electronic energy:          -130.366128020400
Total Hartree-Fock energy:  -112.603536325754

Expectation value of one-electron Hamiltonian

For a closed-shell Slater determinant, the expectation value of a one-electron operator becomes

ΦΩ^Φ=2iocc(iω^i)\langle \Phi | \hat{\Omega} | \Phi \rangle = 2 \sum_{i}^\mathrm{occ} ( i| \hat{\omega} | i )

where the sum now runs over doubly occpuied molecular orbitals, referring to spatial integrals.

T_ao = vlx.compute_kinetic_energy_integrals(molecule, basis)
T = np.einsum("ai, ab, bj -> ij", C, T_ao, C)

V_ao = vlx.compute_nuclear_potential_integrals(molecule, basis)
V = np.einsum("ai, ab, bj -> ij", C, V_ao, C)

# core Hamiltonian
h = T + V

h_aver = 2 * np.einsum("ii", h[:nocc, :nocc])
print("Expectation value of one-electron Hamiltonian:", h_aver)
Expectation value of one-electron Hamiltonian: -188.9792853453191

Expectation value of two-electron Hamiltonian

For a closed-shell Slater determinant, the expectation value of a two-electron operator becomes

ΦΩ^Φ=i,jocc[2(iiω^jj)(ijω^ji)]\langle \Phi | \hat{\Omega} | \Phi \rangle = \sum_{i,j}^\mathrm{occ} \left[\rule{0pt}{12pt} 2 ( ii| \hat{\omega} | jj ) - ( ij| \hat{\omega} |ji ) \right]

where the sum now runs over doubly occpuied molecular orbitals, referring to spatial two-electron integrals (Coulomb and exchange) written in the chemist’s notation.

# obtain the oooo-block
moints_drv = vlx.MOIntegralsDriver()
g_oooo = moints_drv.compute_in_memory(molecule, basis, scf_drv.mol_orbs, "chem_oooo")

g_aver = 2 * np.einsum("iijj", g_oooo) - np.einsum("ijji", g_oooo)
print("Expectation value of two-electron Hamiltonian:", g_aver)
Expectation value of two-electron Hamiltonian: 58.61315732491873

Expectation value of electronic Hamiltonian

print(f"Expectation value of electronic Hamiltonian: {h_aver + g_aver:.12f}")
Expectation value of electronic Hamiltonian: -130.366128020400