grove icon indicating copy to clipboard operation
grove copied to clipboard

import error 'get_devices'

Open am610 opened this issue 4 years ago • 1 comments

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

am610 avatar Mar 23 '20 08:03 am610

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

jmbr avatar Mar 23 '20 09:03 jmbr