ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
876 stars 271 forks source link

Error using backend #358

Closed monica1131 closed 4 years ago

monica1131 commented 4 years ago

I'm getting an error when trying to use backend

File "/Users/projectq/setups/ibm.py", line 42, in get_engine_list raise DeviceOfflineError('Error when configuring engine list: device ' projectq.setups.ibm.DeviceOfflineError: Error when configuring engine list: device requested for Backend not connected

What does this mean? How to rectify this?

dbretaud commented 4 years ago

The updated backend for IBM needs to connect to an actual device to get its topology. So you need to request a IBM device name in the setup (ex: 'ibmq_london') in addition of providing the IBMQ token:

get_engine_list(token='YourToken', device='ibmq_london')

Good news is that the setup accepts all 5 qubit device topology as well as the 15 qubit device 'ibmq_melbourne'.

If this is not answering your question could you please provide a sample of the code that you wrote?

Takishima commented 4 years ago

If you are not using the version from the develop branch, you will have to wait for release 0.5.0 (which should be out in the next few days) in order to have a working IBM backend.

monica1131 commented 4 years ago

Thank you @dbretaud I can now run my code successfully.