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

import error 'get_devices' #220

Open
am610 opened this issue Mar 23, 2020 · 1 comment
Open

import error 'get_devices' #220

am610 opened this issue Mar 23, 2020 · 1 comment

Comments

@am610
Copy link

am610 commented Mar 23, 2020

HI, I am trying to run this notebook :

https://github.com/rigetti/grove/blob/master/examples/Tomography.ipynb

I get error here

ImportError Traceback (most recent call last)
in
12
13 from pyquil.gates import CZ, RY
---> 14 from pyquil.api import QVMConnection, QPUConnection, get_devices
15 from pyquil.quil import Program
16

ImportError: cannot import name 'get_devices' from 'pyquil.api' (/usr/local/lib/python3.7/site-packages/pyquil/api/init.py)

Any help ? I can't find a possible fix to it yet.

thanks

@jmbr
Copy link

jmbr commented Mar 23, 2020

It looks like Grove is using an obsolete pyQuil API. Perhaps it might help you if you check out https://github.com/rigetti/pyquil/blob/master/docs/source/migration2-qc.ipynb (specifically the examples regarding list_quantum_computers and get_qc) as well as the function list_lattices in https://github.com/rigetti/pyquil/blob/master/pyquil/api/_devices.py#L54. I hope this helps

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