title: Dyall Hamiltonian
text: # Dyall Hamiltonian
  
  In quantum chemistry, the Dyall Hamiltonian is a modified Hamiltonian with two-electron nature. It can be written as follows:
  
      ${\hat {H}}^{\rm {D}}={\hat {H}}_{i}^{\rm {D}}+{\hat {H}}_{v}^{\rm {D}}+C$
      ${\hat {H}}_{i}^{\rm {D}}=\sum _{i}^{\rm {core}}\varepsilon _{i}E_{ii}+\sum _{r}^{\rm {virt}}\varepsilon _{r}E_{rr}$
      ${\hat {H}}_{v}^{\rm {D}}=\sum _{ab}^{\rm {act}}h_{ab}^{\rm {eff}}E_{ab}+{\frac {1}{2}}\sum _{abcd}^{\rm {act}}\left\langle ab\left.\right|cd\right\rangle \left(E_{ac}E_{bd}-\delta _{bc}E_{ad}\right)$
      $C=2\sum _{i}^{\rm {core}}h_{ii}+\sum _{ij}^{\rm {core}}\left(2\left\langle ij\left.\right|ij\right\rangle -\left\langle ij\left.\right|ji\right\rangle \right)-2\sum _{i}^{\rm {core}}\varepsilon _{i}$
      $h_{ab}^{\rm {eff}}=h_{ab}+\sum _{j}\left(2\left\langle aj\left.\right|bj\right\rangle -\left\langle aj\left.\right|jb\right\rangle \right)$
  
  where labels $i,j,\ldots$, $a,b,\ldots$, $r,s,\ldots$ denote core, active and virtual orbitals (see Complete active space) respectively, $\varepsilon _{i}$ and $\varepsilon _{r}$ are the orbital energies of the involved orbitals, and $E_{mn}$ operators are the spin-traced operators $a_{m\alpha }^{\dagger }a_{n\alpha }+a_{m\beta }^{\dagger }a_{n\beta }$. These operators commute with $S^{2}$ and $S_{z}$, therefore the application of these operators on a spin-pure function produces again a spin-pure function.
  
  The Dyall Hamiltonian behaves like the true Hamiltonian inside the CAS space, having the same eigenvalues and eigenvectors of the true Hamiltonian projected onto the CAS space.
  
  