We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the documentation, subchapter "Define VQE cost function" (http://docs.qulacs.org/en/latest/apply/6.2_vqe.html#Define-VQE-cost-function) the return value of the cost function should be np.real(qulacs_hamiltonian.get_expectation_value(state)) instead of qulacs_hamiltonian.get_expectation_value(state). This is because of the scipy.optimize.minimize function in http://docs.qulacs.org/en/latest/apply/6.2_vqe.html#Run-VQE, which expects a cost function returning a float not a complex number.
np.real(qulacs_hamiltonian.get_expectation_value(state))
qulacs_hamiltonian.get_expectation_value(state)
scipy.optimize.minimize
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the documentation, subchapter "Define VQE cost function" (http://docs.qulacs.org/en/latest/apply/6.2_vqe.html#Define-VQE-cost-function) the return value of the cost function should be
np.real(qulacs_hamiltonian.get_expectation_value(state))
instead of
qulacs_hamiltonian.get_expectation_value(state)
.This is because of the
scipy.optimize.minimize
function in http://docs.qulacs.org/en/latest/apply/6.2_vqe.html#Run-VQE, which expects a cost function returning a float not a complex number.The text was updated successfully, but these errors were encountered: