I trying to run the VQE to find the ground state of the H2 Molecule using the tutorial given here: A brief overview of VQE | PennyLane Demos. After importing Pennylane and Jax, I get the following error: jax.core.Primitive was removed in JAX v0.6.0. Use jax.extend.core.Primitive instead, and see jax.extend module — JAX documentation for details. Does anything know how to fix this?
Hi @quantumlover
Welcome to the forum!
I believe this is related to the JAX version you are using not being compatible with Pennylane yet.
I ran the code myself using JAX v0.4.28 and it works. See this from another previous post.
Let me know if downgrading JAX version works for you.
Hi Daniela, thank you for the reply, I downgraded the JAX version succesfully but now I have the following error: “partially initialized module ‘jax’ has no attribute ‘version’ (most likely due to a circular import)”
Hi,
Mmm, I think that has to do with simultaneous different versions of jax and jaxlib (both of mine match when I do pip freeze
). It is probably related to installation problems and not to Pennylane. I looked it up and found a few things on stackoverflow and so on.
I would try a couple of those alternatives presented in the forums.
Let us know.