With \(| \psi (\theta ) \rangle \)  and \(| b \rangle \) , the cost function \(E\)  can be optimized in terms of \(A\)  as [1]}
\(E(r(\theta ), \theta )=-\frac{1}{2} \frac{\left|\langle \psi (\theta )|b\rangle \right|^{2}}{\langle \psi (\theta )|A| \psi (\theta )\rangle },\) 
