# \`forest.wavefunction\` DeviceError

**URL:** <https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994>\
**Category:** PennyLane Help\
**Created:** [April 22, 2021, 5:06pm UTC](https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994 "2021-04-22T17:06:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanhill1](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/ryanhill1/32/447_2.png) [@ryanhill1](https://discuss.pennylane.ai/u/ryanhill1)\
**Post date:** [April 22, 2021, 5:06pm UTC](https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994/1 "2021-04-22T17:06:50Z")

</div>

Hey there, I’m getting an error trying to use the `forest.wavefunction` device:

```auto
import pennylane as qml

dev_wfun = qml.device('forest.wavefunction', wires=2)
---------------------------------------------------------------------------
DeviceError Traceback (most recent call last)
<ipython-input-1-40259941cb81> in <module>
      1 import pennylane as qml
      2 
----> 3 dev_wfun = qml.device('forest.wavefunction', wires=2)

~/opt/anaconda3/envs/qml/lib/python3.8/site-packages/pennylane/ __init__.py in device(name, *args, **kwargs)
    253 return plugin_device_class(*args, **options)
    254 
--> 255 raise DeviceError("Device does not exist. Make sure the required plugin is installed.")
    256 
    257 

DeviceError: Device does not exist. Make sure the required plugin is installed.

```

However, my `pennylane` installation seems to be working fine. For example, running `dev = qml.device('default.qubit', wires=2)` raises no errors, and `qml.about()` gives

```auto
Name: PennyLane
Version: 0.15.0
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: /Users/ryanhill/opt/anaconda3/envs/qml/lib/python3.8/site-packages
Requires: numpy, scipy, networkx, semantic-version, autograd, appdirs, toml
Required-by: PennyLane-qiskit, PennyLane-Cirq
Platform info: macOS-10.16-x86_64-i386-64bit
Python version: 3.8.5
Numpy version: 1.18.5
Scipy version: 1.5.0
Installed devices:
— default.gaussian (PennyLane-0.15.0)
— default.mixed (PennyLane-0.15.0)
— default.qubit (PennyLane-0.15.0)
— default.qubit.autograd (PennyLane-0.15.0)
— default.qubit.jax (PennyLane-0.15.0)
— default.qubit.tf (PennyLane-0.15.0)
— default.tensor (PennyLane-0.15.0)
— default.tensor.tf (PennyLane-0.15.0)
— qiskit.aer (PennyLane-qiskit-0.16.0.dev0)
— qiskit.basicaer (PennyLane-qiskit-0.16.0.dev0)
— qiskit.ibmq (PennyLane-qiskit-0.16.0.dev0)
— cirq.mixedsimulator (PennyLane-Cirq-0.13.0)
— cirq.pasqal (PennyLane-Cirq-0.13.0)
— cirq.qsim (PennyLane-Cirq-0.13.0)
— cirq.qsimh (PennyLane-Cirq-0.13.0)
— cirq.simulator (PennyLane-Cirq-0.13.0)

```

I tried uninstalling and reinstalling pennylane with the same result. Any ideas as to why the `forest.wavefunction` device isn’t working here?

---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [April 22, 2021, 5:17pm UTC](https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994/2 "2021-04-22T17:17:45Z")

</div>

Hi @ryanhill1!

To have access to the `forest.wavefunction` device, you will need to install [PennyLane-Forest](https://github.com/PennyLaneAI/pennylane-forest):

```python
pip install pennylane-forest

```

Furthermore, you will have to install the Forest QVM. This is quite tricky, and requires using Docker; see the instructions on the README for the QVM: [https://github.com/rigetti/qvm/#running-the-qvm-with-docker](https://github.com/rigetti/qvm/#running-the-qvm-with-docker)

Can I ask what you’re using the `forest.wavefunction` device for?

---

<div class="post-metadata">

**Author:** ![ryanhill1](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/ryanhill1/32/447_2.png) [@ryanhill1](https://discuss.pennylane.ai/u/ryanhill1)\
**Post date:** [April 22, 2021, 6:31pm UTC](https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994/3 "2021-04-22T18:31:05Z")

</div>

Oh, ok great thanks. I was just looking at the docs for [The Wavefunction Device](https://pennylane-forest.readthedocs.io/en/latest/devices/wavefunction.html). I was running the examples in the section on [Usage](https://pennylane-forest.readthedocs.io/en/latest/devices/wavefunction.html#usage) but didn’t realize there were more imports necessary. Thank you!

---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [April 23, 2021, 12:11pm UTC](https://discuss.pennylane.ai/t/forest-wavefunction-deviceerror/994/4 "2021-04-23T12:11:27Z")

</div>

No worries @ryanhill1, let us know if you have any other questions 🙂
