Density Matrix Demo Issue

Hello,

I have copy and pasted code from the documentation (qml.density_matrix — PennyLane 0.29.1 documentation) but am getting the error shown in the attached picture.

Does anyone know how to fix this “device does not provide a native method for computing the jacobian” issue please (See attached image)?

Hey @Chris23233! Welcome to the forum! :rocket:

I’m not able to replicate your error — the code executes perfectly fine for me :thinking:. Are you using the most up-to-date version of PennyLane? If you print qml.__version__ it should say 0.29.1 (at the time of writing). If you’re under that, you can upgrade via pip install --upgrade pennylane.

Let me know if that helps!

Thank you for your help Isaac!

It looks like I somehow missed the wires = 2 argument in the dev line. Things work fine now. Thank you!

1 Like

Awesome! Glad everything works now :grin:! Sorry — I missed that you didn’t have wires=2 as well!

1 Like