Symmetries of Molecular Integrals
The inherent symmetry of the Coulomb Hamiltonian, which is the Hamiltonian given in Quantum Models for Electronic Systems, that describes electrons interacting electrically with each other and with the nuclei, leads to a number of symmetries that can be exploited to compress the terms in the Hamiltonian. In general if no further assumptions are made about the basis functions $\psi_j$ then we only have that
$$ h_{pqrs}= h_{qpsr},\tag{★}\label{eq:hpqrs} $$
which can be immediately seen from the integrals in Quantum Models for Electronic Systems upon noting that their values remain identical if $p,q$ and $r,s$ are interchanged from anti-commutation.
If we assume that the spin-orbitals are real-valued (as they are for Gaussian orbital bases) then we further have that
$$ h_{pqrs} = h_{qpsr} = h_{srqp} = h_{rspq}=h_{rqps}=h_{psrq}=h_{spqr}=h_{qrsp}.\tag{★}\label{eq:hpqrsreal} $$
Given such assumptions hold, we can use the above symmetries to reduce the data needed to store the matrix elements of the Hamiltonian by a factor of $8$; although doing so makes importing data in a consistent way slightly more challenging. Fortunately the Hamiltonian simulation library has subroutines that can be used to import integral files from either LIQUI$|\rangle$ or directly from NWChem.
Molecular orbital integrals such as these (for example, the $h_{pq}$ and $h_{pqrs}$ terms) are represented using the OrbitalIntegral type, which provides a number of helpful functions to express this symmetry.
// The code snippets in this section require the following namespaces.
// Make sure to include these at the top of your file or namespace.
using Microsoft.Quantum.Chemistry.OrbitalIntegrals;
// Create a `OrbitalIntegral` instance to store a one-electron molecular
// orbital integral data.
var oneElectronOrbitalIndices = new[] { 0, 1 };
var oneElectronCoefficient = 1.0;
var oneElectronIntegral = new OrbitalIntegral(oneElectronOrbitalIndices, oneElectronCoefficient);
// This enumerates all one-electron integrals with the same coefficient --
// an array of equivalent `OrbitalIntegral` instances is generated. In this
// case, there are two elements.
var oneElectronIntegrals = oneElectronIntegral.EnumerateOrbitalSymmetries();
// Create a `OrbitalIntegral` instance to store a two-electron molecular orbital integral data.
var twoElectronOrbitalIndices = new[] { 0, 1, 2, 3 };
var twoElectronCoefficient = 0.123;
var twoElectronIntegral = new OrbitalIntegral(twoElectronOrbitalIndices, twoElectronCoefficient);
// This enumerates all two-electron integrals with the same coefficient --
// an array of equivalent `OrbitalIntegral` instances is generated. In
// this case, there are 8 elements.
var twoElectronIntegrals = twoElectronIntegral.EnumerateOrbitalSymmetries();
In addition to enumerating over all orbital integrals that are numerically identical, a list of all spin-orbital indices contained in the Hamiltonian represented by an OrbitalIntegral may be generated as follows.
// Create a `OrbitalIntegral` instance to store a two-electron molecular
// orbital integral data.
var twoElectronIntegral = new OrbitalIntegral(new[] { 0, 1, 2, 3 }, 0.123);
// This enumerates all spin-orbital indices of the `FermionTerm`s in the
// Hamiltonian represented by this integral -- this is an array of array
// of `SpinOrbital` instances.
var twoElectronSpinOrbitalIndices = twoElectronIntegral.EnumerateSpinOrbitals();
Constructing Fermionic Hamiltonians from Molecular Integrals
Rather than constructing a Fermionic Hamiltonian by adding FermionTerms, all terms corresponding to each orbital integral may be added automatically.
For example, the following code automatically enumerates over all permutational symmetries and orders the terms in canonical order:
// The code snippets in this section require the following namespaces.
// Make sure to include these at the top of your file or namespace.
using Microsoft.Quantum.Chemistry;
using Microsoft.Quantum.Chemistry.OrbitalIntegrals;
using Microsoft.Quantum.Chemistry.Fermion;
// We load this namespace for convenience methods for manipulating arrays.
using System.Linq;
// Create a `OrbitalIntegral` instance to store a two-electron molecular
// orbital integral data.
var orbitalIntegral = new OrbitalIntegral(new[] { 0, 1, 2, 3 }, 0.123);
// Create an `OrbitalIntegralHamiltonian` instance to store the orbital integral
// terms.
var orbitalIntegralHamiltonian = new OrbitalIntegralHamiltonian();
orbitalIntegralHamiltonian.Add(orbitalIntegral);
// Convert the orbital integral representation to a fermion
// representation. This also requires choosing a convention for
// mapping spin orbital indices to integer indices.
var fermionHamiltonian = orbitalIntegralHamiltonian.ToFermionHamiltonian(IndexConvention.UpDown);
// Alternatively, one can add orbital integrals directly to a fermion Hamiltonian
// as follows. This automatically enumerates over all symmetries, and then
// orders the `HermitianFermionTerm` instances in canonical order. We will need to
// choose an indexing convention as well.
fermionHamiltonian.AddRange(orbitalIntegral
.ToHermitianFermionTerms(0, IndexConvention.UpDown)
.Select(o => (o.Item1, o.Item2.ToDoubleCoeff())));
Povratne informacije
Pošalјite i prikažite povratne informacije za