# Non default.qubit simulator errors in a larger model

**URL:** <https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191>\
**Category:** PennyLane Plugins\
**Created:** [July 18, 2023, 5:35pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191 "2023-07-18T17:35:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinkawchak](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/kevinkawchak/32/1801_2.png) [@kevinkawchak](https://discuss.pennylane.ai/u/kevinkawchak)\
**Post date:** [July 18, 2023, 5:35pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/1 "2023-07-18T17:35:31Z")

</div>

Hello,

For a larger model, the only simulator that runs properly is default.qubit. Other devices such as lightning.qubit, SV1 (Pennylane-Braket), and QSIM (PennyLane-Cirq) were implemented according to documentation, but typically experience delays in training updates and sometimes reach correct Epoch 1 training values, but not successful validation. In general, a long delay is experienced when interrupting execution of the run during training, unlike that experienced for default.qubit.

Source:

> **[Plugins and ecosystem — PennyLane](https://pennylane.ai/plugins/)**
>
> See the available PennyLane plugins, allowing access to quantum simulators and hardware from IBM, Rigetti, Google, and more.

> **[Quantum transfer learning](https://pennylane.ai/qml/demos/tutorial_quantum_transfer_learning/)**
>
> Combine PyTorch and PennyLane to train a hybrid quantum-classical image classifier using transfer learning.

Thank you,  
Kevin K.

---

<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:** [July 19, 2023, 1:41pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/2 "2023-07-19T13:41:17Z")

</div>

Hey @kevinkawchak!

Just want to make sure I’m understanding — when you replace `"default.qubit"` with `"lightning.qubit"`, SV1, or QSIM, the transfer learning demo (1) runs slower and (2) is more stochastic (random). Are you able to provide the output of `qml.about()` in the environment where you’re seeing this behaviour?

---

<div class="post-metadata">

**Author:** ![kevinkawchak](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/kevinkawchak/32/1801_2.png) [@kevinkawchak](https://discuss.pennylane.ai/u/kevinkawchak)\
**Post date:** [July 23, 2023, 8:58am UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/3 "2023-07-23T08:58:45Z")

</div>

Hello, yes. The other simulators are slower and more random in nature.  
The qml.about output is \<function pennylane.about.about()\>  
Best regards,  
-Kevin

---

<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:** [July 24, 2023, 1:46pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/4 "2023-07-24T13:46:10Z")

</div>

Thanks! `qml.about` will point you to the _function_, not the output of the function 😅. Can you put brackets after? I.e., `qml.about()`

---

<div class="post-metadata">

**Author:** ![kevinkawchak](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/kevinkawchak/32/1801_2.png) [@kevinkawchak](https://discuss.pennylane.ai/u/kevinkawchak)\
**Post date:** [July 24, 2023, 6:40pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/5 "2023-07-24T18:40:48Z")

</div>

Thank you, for cirq.qsim:

Name: PennyLane  
Version: 0.31.0  
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.  
Home-page: [GitHub - PennyLaneAI/pennylane: PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.](https://github.com/PennyLaneAI/pennylane)  
Author:  
Author-email:  
License: Apache License 2.0  
Location: /usr/local/lib/python3.10/dist-packages  
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml  
Required-by: PennyLane-Cirq, PennyLane-Lightning

Platform info: Linux-5.15.109±x86\_64-with-glibc2.35  
Python version: 3.10.6  
Numpy version: 1.22.4  
Scipy version: 1.10.0  
Installed devices:

---

<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:** [July 25, 2023, 1:28pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/6 "2023-07-25T13:28:00Z")

</div>

Awesome thanks! I was able to verify that the transfer learning demo is slower when using lightning. I’ll reach out to our performance team to see what’s going on here and will get back to you!

---

<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:** [July 25, 2023, 2:33pm UTC](https://discuss.pennylane.ai/t/non-default-qubit-simulator-errors-in-a-larger-model/3191/7 "2023-07-25T14:33:27Z")

</div>

The reason this demo in particular runs much slower with lightning qubit is, oddly enough, because of the smaller qubit count. There is an overhead associated to setting up and running simulations with lightning. For problems with \<10 qubits, it’s probably better to just use default qubit!

As far as the other devices go, it’s a similar story. For SV1 I think they recommend using it for anything with \>25 qubits.

Hope this helps!
