Open jmbr opened 5 years ago
The correct implementation of the function call is result = vqe_inst.vqe_run(small_ansatz, hamiltonian, initial_angle, samples = 1000, qc=noisy_qvm)
I believe the function definition for vqe_run in class VQE was changed at a later date and the documentation wasn't updated to match the changes.
When running the code snippets in grove/docs/vqe.rst the line
result = vqe_inst.vqe_run(small_ansatz, hamiltonian, initial_angle, samples=10000, qvm=noisy_qvm)
Raises the following exception:
TypeError: vqe_run() got an unexpected keyword argument 'qvm'
Similarly, the line
result = vqe_inst.vqe_run(small_ansatz, hamiltonian, initial_angle, samples=10000, qvm=qvm)
yields the error: