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

I got error when I execute "run_on_QPU.py" #14

Open
masaya611 opened this issue Oct 4, 2022 · 4 comments
Open

I got error when I execute "run_on_QPU.py" #14

masaya611 opened this issue Oct 4, 2022 · 4 comments

Comments

@masaya611
Copy link

Hello.

I try to execute "run_on_QPU.py"
I got the error messages below.

Traceback (most recent call last):
File "/home/watabe/quantum-transfer-learning/quantum_processors/run_on_QPU.py", line 62, in
dev = qml.device("qiskit.ibmq", wires=n_qubits, backend="ibmqx4", ibmqx_token=token)
File "/home/watabe/.tql/lib/python3.10/site-packages/pennylane/init.py", line 330, in device
raise DeviceError("Device does not exist. Make sure the required plugin is installed.")
pennylane._device.DeviceError: Device does not exist. Make sure the required plugin is installed.

I only change the token in this code.
Are there what I need to do?

@CatalinaAlbornoz
Copy link

Hi @masaya611!

You will need the pennylane-qiskit plugin. You can install it by using python -m pip install pennylane-qiskit . You can learn more about the plugin in its documentation.

Please let us know if this solves your problem!

@OnePl3
Copy link

OnePl3 commented Nov 22, 2022

After installing pennylane-qiskit, there is no ibmqx4 device.

dev = qml.device("qiskit.ibmq", wires=n_qubits, backend="ibmq_qasm_simulator", ibmqx_token=token, shots=1024)
print("Device capabilities: ", dev.capabilities()["backend"])

Device capabilities: ['ibmq_qasm_simulator', 'ibmq_lima', 'ibmq_belem', 'ibmq_quito', 'simulator_statevector', 'simulator_mps', 'simulator_extended_stabilizer', 'simulator_stabilizer', 'ibmq_manila', 'ibm_nairobi', 'ibm_oslo']

@OnePl3
Copy link

OnePl3 commented Nov 22, 2022

Can you guys give me a new one, using the QPU example? This version is too old, and the IBM piece of equipment seems to be gone. Thank you very much!

@CatalinaAlbornoz
Copy link

Hi @OnePl3 , yes, as you noticed IBM no longer has the ibmqx4 device. However you can use ibmq_lima if you prefer. You just need to change the run_on_QPU.py file which is in folder quantum_processors. You can change the "ibmqx4" in line 62 to "ibmq_lima". It is possible that other parts of the code are still outdated but at least this is an updated device that you can use.

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

3 participants