I am not able to access default Plugin, (“default.qbit”).
I have created Github issue as well, which is available here.
opened 12:03PM - 12 May 21 UTC
closed 01:36PM - 12 May 21 UTC
--------------------------------------------------------------------------------… -----------------------------
#### Issue description
Description of the issue - I am using default device, "default.qbit" and using Quick-Start Example given below.
```
import pennylane as qml
from pennylane import numpy as np
# create a Quantum-device
dev1 = qml.device("default.qbit",wires=1)
@qml.qnode(dev1)
def circuit(phi1, phi2):
# a Quantum node
qml.RX(phi1,wires=0)
qml.RY(phi2,wires=0)
return qml.expval(qml.PauliZ(0))
def cost(x, y):
return np.sin(np.abs(cicuit(x,y)))-1
# calculate the gradient
dcost = qml.grad(cost, argnum=[0, 1])
print(dcost)
```
* *Expected behavior:* (What you expect to happen)
it is supposed to run circuit.
* *Actual behavior:* (What actually happens)
```
Traceback (most recent call last):
File "test-pennyane.py", line 5, in <module>
dev1 = qml.device("default.qbit",wires=1)
File "/home/khangura/Desktop/pennylane/pennylane/__init__.py", line 255, 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.
```
* *Reproduces how often:* (What percentage of the time does it reproduce?)
everytime
* *System information:* (post the output of `import pennylane as qml; qml.about()`)
```
khangura@metal-machine:~/Desktop/pennylane$ python
Python 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pennylane as qml; qml.about()
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Name: PennyLane
Version: 0.16.0.dev0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: https://github.com/XanaduAI/pennylane
Author: None
Author-email: None
License: Apache License 2.0
Location: /home/khangura/Desktop/pennylane
Requires: numpy, scipy, networkx, autograd, toml, appdirs, semantic-version
Required-by:
Platform info: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
Python version: 3.8.5
Numpy version: 1.19.2
Scipy version: 1.5.2
Installed devices:
- default.gaussian (PennyLane-0.16.0.dev0)
- default.mixed (PennyLane-0.16.0.dev0)
- default.qubit (PennyLane-0.16.0.dev0)
- default.qubit.autograd (PennyLane-0.16.0.dev0)
- default.qubit.jax (PennyLane-0.16.0.dev0)
- default.qubit.tf (PennyLane-0.16.0.dev0)
- default.tensor (PennyLane-0.16.0.dev0)
- default.tensor.tf (PennyLane-0.16.0.dev0)
```
Hi @arshpreetsingh and welcome to the forum!
It seems to me that you would like to use the device default.qubit
. If it is the case, then there is a typo in the term “qbit”. Could you please try default.qubit
and let me know if you see any issues? Thanks!
@sjahangiri Hi, This isresolved using “qubit”.
Thanks!