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
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'
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:
result = vqe_inst.vqe_run(small_ansatz, hamiltonian, initial_angle, samples=10000, qvm=qvm)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) ~/test_vqe.py in <module> 17 vqe_inst = VQE(minimizer=minimize, 18 minimizer_kwargs={'method': 'nelder-mead', 'options': {'disp': True}}) ---> 19 result = vqe_inst.vqe_run(small_ansatz, hamiltonian, initial_angle) ~/rigetti/grove/grove/pyvqe/vqe.py in vqe_run(self, variational_state_evolve, hamiltonian, initial_params, gate_noise, measurement_noise, jacobian, qc, disp, samples, return_all) 133 qc = QuantumComputer(name=f"{len(qubits)}q-noisy-qvm", 134 qam=QVM(gate_noise=gate_noise, --> 135 measurement_noise=measurement_noise)) 136 else: 137 self.qc = qc ~/rigetti/pyquil/pyquil/api/_error_reporting.py in wrapper(*args, **kwargs) 236 global_error_context.log[key] = pre_entry 237 --> 238 val = func(*args, **kwargs) 239 240 # poke the return value of that call in TypeError: __init__() missing 1 required positional argument: 'connection'```
The text was updated successfully, but these errors were encountered:
Update vqe.rst to fix issue rigetti#212 (VQE documentation is out of …
acce507
…date) qvm argname was changed to qc in a later iteration of the vqe_run() in class VQE
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.
Sorry, something went wrong.
No branches or pull requests
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:The text was updated successfully, but these errors were encountered: