Expectation values

Expectation values are calculated as $\langle \psi_i | O | \psi_j \rangle$. For an $n$ electron wave-function this represents the $3n$ dimensional integral over the position coordinates of all electrons: $$ \begin{align} \langle \psi_i | O | \psi_j \rangle = &\int_{r_1} \int_{r_2} ... \int_{r_n} \psi_i^*(\vec{r}_1, \vec{r}_1, ...\vec{r}_n) \\ \nonumber & O(\vec{r}_1, \vec{r}_1, ...\vec{r}_n)\psi_j(\vec{r}_1, \vec{r}_1, ...\vec{r}_n) dr_1 dr_2 ... dr_n \end{align} $$ In Quanty the complex conjugates of the first wavefunction is automatically assumed and expectation values are implemented as multiplication of wavefunctions and operators.

-- expectation values of operators are 
-- calculated by multiplying a wavefunction times 
-- an operator times a wavefunction
val = psi1 * Opp * psi2