# DefaultQubitJax class cannot be build

**URL:** <https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631>\
**Category:** PennyLane Help\
**Created:** [February 24, 2023, 10:48am UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631 "2023-02-24T10:48:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![huhnja](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@huhnja](https://discuss.pennylane.ai/u/huhnja)\
**Post date:** [February 24, 2023, 10:48am UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631/1 "2023-02-24T10:48:10Z")

</div>

Hello people,

I want to use the jax interface to speed up my code with jax.jit and jax.vmap. However I am not even able to make a circuit instance with the jax interface. Following the jax tutorial [here](https://pennylane.ai/qml/demos/tutorial_jax_transformations.html)

```auto
from jax.config import config
config.update("jax_enable_x64", True)

import jax
import jax.numpy as jnp
import pennylane as qml

@qml.qnode(dev, interface="jax")
def circuit(param):
    qml.RX(param, wires=0)
    qml.CNOT(wires=[0, 1])
    return qml.expval(qml.PauliZ(0))

```

I get the error message:

> TypeError: Can’t instantiate abstract class DefaultQubitJax with abstract methods \_abs, \_conj, \_dot

I have Installed jax, jaxlib and pennylane and also made sure that they are on the newest version.

Any help would be greatly appriciated.

Best regards!

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [February 25, 2023, 1:52am UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631/2 "2023-02-25T01:52:44Z")

</div>

Hi @huhnja, welcome to the forum!

I think you forgot to create your device.

You can use something like:  
`dev = qml.device("default.qubit.jax", wires=2)`

This should make your code run smoothly 🕶

Let me know if this fixes your issue!

---

<div class="post-metadata">

**Author:** ![huhnja](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@huhnja](https://discuss.pennylane.ai/u/huhnja)\
**Post date:** [February 27, 2023, 12:24pm UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631/3 "2023-02-27T12:24:38Z")

</div>

Hi @CatalinaAlbornoz,

thank you for your quick reply. I tried your sugesstion, but I get the same error. I am running this code on a cloud backend with a jupyter notebook as frontend. Could this explain the error I am getting?

---

<div class="post-metadata">

**Author:** ![Romain\_Moyard](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/romain_moyard/32/567_2.png) [@Romain\_Moyard](https://discuss.pennylane.ai/u/Romain_Moyard)\
**Post date:** [February 27, 2023, 3:49pm UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631/4 "2023-02-27T15:49:37Z")

</div>

Hi @huhnja ! There is an issue with Jax 0.4.4, you should downgrade to 0.4.3. The issue will be solved with 0.4.5.

Let me know if there is anything else.

---

<div class="post-metadata">

**Author:** ![huhnja](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@huhnja](https://discuss.pennylane.ai/u/huhnja)\
**Post date:** [February 28, 2023, 1:47pm UTC](https://discuss.pennylane.ai/t/defaultqubitjax-class-cannot-be-build/2631/5 "2023-02-28T13:47:21Z")

</div>

Thank you @Romain_Moyard,

This solves the problem! And for other people reading this, you also need to downgrade jaxlib to version 0.4.3 🙂
