# Mutable option in devices

**URL:** <https://discuss.pennylane.ai/t/mutable-option-in-devices/4397>\
**Category:** PennyLane Help\
**Created:** [April 5, 2024, 9:54am UTC](https://discuss.pennylane.ai/t/mutable-option-in-devices/4397 "2024-04-05T09:54:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nabil\_Anan\_Orka](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nabil_anan_orka/32/2469_2.png) [@Nabil\_Anan\_Orka](https://discuss.pennylane.ai/u/Nabil_Anan_Orka)\
**Post date:** [April 5, 2024, 9:54am UTC](https://discuss.pennylane.ai/t/mutable-option-in-devices/4397/1 "2024-04-05T09:54:55Z")

</div>

Hi!

The structure of my circuit remains unchanged regardless of the input parameters. As a result, I intended to set mutable=False and take advantage of the mutable option from qml.Qnode. But doing so brings with it the following warning:

/usr/local/lib/python3.10/dist-packages/pennylane/workflow/qnode.py:475: UserWarning: Received gradient\_kwarg mutable, which is not included in the list of standard qnode gradient kwargs.  
warnings.warn(

I tried to use version 0.16.0 found [here](https://discuss.pennylane.ai/t/how-can-i-make-variational-learning-faster/1131/3). However, at that time, the “torch” interface was unavailable.

Since modeling my circuit is taking too much time, could someone perhaps point me in the direction of where I may find the mutable option?

---

<div class="post-metadata">

**Author:** ![isaacdevlugt](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/isaacdevlugt/32/1159_2.png) [@isaacdevlugt](https://discuss.pennylane.ai/u/isaacdevlugt)\
**Post date:** [April 5, 2024, 2:20pm UTC](https://discuss.pennylane.ai/t/mutable-option-in-devices/4397/2 "2024-04-05T14:20:33Z")

</div>

Hey @Nabil_Anan_Orka, welcome to the forum! 🕶

The `mutable` argument was removed in v0.20 and it won’t be making a comeback to PennyLane. Are you able to share your code with me so that I can try to replicate the error you’re getting?

---

<div class="post-metadata">

**Author:** ![Nabil\_Anan\_Orka](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nabil_anan_orka/32/2469_2.png) [@Nabil\_Anan\_Orka](https://discuss.pennylane.ai/u/Nabil_Anan_Orka)\
**Post date:** [April 5, 2024, 5:47pm UTC](https://discuss.pennylane.ai/t/mutable-option-in-devices/4397/3 "2024-04-05T17:47:17Z")

</div>

Hi @isaacdevlugt!

Thank you for your quick response. There was no error because the code functioned properly. The mutable option, though, was something I was really looking forward to because the simulation is taking far longer than it should. Since mutable has been removed, is there an alternative to mutable that I can pursue?

---

<div class="post-metadata">

**Author:** ![isaacdevlugt](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/isaacdevlugt/32/1159_2.png) [@isaacdevlugt](https://discuss.pennylane.ai/u/isaacdevlugt)\
**Post date:** [April 5, 2024, 6:28pm UTC](https://discuss.pennylane.ai/t/mutable-option-in-devices/4397/4 "2024-04-05T18:28:47Z")

</div>

For performance, you can look to a number of options:

- PennyLane-Lightning: [Lightning plugins — Lightning 0.35.1 documentation](https://docs.pennylane.ai/projects/lightning/en/stable/index.html)
  - There are several devices there (fast C+±based simulators and GPU options) that would be worth checking out!

- Catalyst: [Catalyst — Catalyst 0.5.0 documentation](https://docs.pennylane.ai/projects/catalyst/en/stable/index.html)
  - This is our quantum JIT compiler, similar to JAX-JIT 🙂.

Let me know if either of these help! If not, then sharing your code here would help me see if there’s something going on that can be ameliorated outside of using a new device / plugin 🙂
