Skip to content
New issue

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

VQE with reference-qvm simulator #183

Open
almullay opened this issue Sep 15, 2018 · 1 comment
Open

VQE with reference-qvm simulator #183

almullay opened this issue Sep 15, 2018 · 1 comment

Comments

@almullay
Copy link

almullay commented Sep 15, 2018

When running the "fast method" of VQE on the referenceqvm (local qvm) with samples = None in
vqe_inst.vqe_run(uccsd, hamiltonian, np.random.random(9)*4, samples=None, qvm=qvm)
command, I get the following error:
'QVM_Wavefunction' object has no attribute 'expectation'
Can someone explain what this means and give a solution?
Thanks!

@peterse
Copy link

peterse commented Nov 12, 2018

what version of pyquil are you using? if before pyquil 2.0.0, you should be initializing your qvm using api.QVMConnection() - does this resolve the issue?

Otherwise if you're using pyquil 2.0.0, i'm guessing this is the same compatibility issue as in #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants