qml.qchem.excitations¶
- excitations(electrons, orbitals, delta_sz=0, fermionic=False)[source]¶
Generate single and double excitations from a Hartree-Fock reference state.
Single and double excitations can be generated by applying the operators ˆT1 and ˆT2 on the Hartree-Fock reference state:
ˆT1=∑r∈occp∈unoccˆc†pˆcrˆT2=∑r>s∈occp>q∈unoccˆc†pˆc†qˆcrˆcs.In the equations above the indices r,s and p,q run over the occupied (occ) and unoccupied (unocc) spin orbitals and ˆc and ˆc† are the electron annihilation and creation operators, respectively.
- Parameters
electrons (int) – Number of electrons. If an active space is defined, this is the number of active electrons.
orbitals (int) – Number of spin orbitals. If an active space is defined, this is the number of active spin-orbitals.
delta_sz (int) – Specifies the selection rules
sz[p] - sz[r] = delta_sz
andsz[p] + sz[p] - sz[r] - sz[s] = delta_sz
for the spin-projectionsz
of the orbitals involved in the single and double excitations, respectively.delta_sz
can take the values 0, ±1 and ±2.fermionic (bool) – Return a list of
FermiWord
objects instead of the list of orbital indices, if set toTrue
. Default isFalse
.
- Returns
lists with the indices of the spin orbitals involved in the single and double excitations. By default, the lists contain integers representing the orbitals, otherwise if
fermionic=True
they containFermiWord
objects.- Return type
tuple(list, list)
Example
>>> electrons = 2 >>> orbitals = 4 >>> singles, doubles = excitations(electrons, orbitals) >>> print(singles) [[0, 2], [1, 3]] >>> print(doubles) [[0, 1, 2, 3]]
>>> singles, doubles = excitations(electrons, orbitals, fermionic=True) >>> print(singles) [FermiWord({(0, 0): '+', (1, 2): '-'}), FermiWord({(0, 1): '+', (1, 3): '-'})] >>> print(doubles) [FermiWord({(0, 0): '+', (1, 1): '+', (2, 2): '-', (3, 3): '-'})]