# Pennylane simulator to Quantum Machines

**URL:** <https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714>\
**Category:** PennyLane Help\
**Created:** [October 7, 2024, 11:00am UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714 "2024-10-07T11:00:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkjha](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rkjha](https://discuss.pennylane.ai/u/rkjha)\
**Post date:** [October 7, 2024, 11:00am UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/1 "2024-10-07T11:00:02Z")

</div>

Hi,

I already have an example running well on the Pennylane simulator. How can I execute the same example on a quantum hardware, preferably IBM-Q (which provides 10 minutes of free runtime)?

Can I run it directly, or do I need to transition the code written in Pennylane to another specific platform? Do suggest me some links, if any!

Many thanks in advance.  
Ravi

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [October 7, 2024, 4:40pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/2 "2024-10-07T16:40:22Z")

</div>

Hi @rkjha!

Nice work getting your example running on simulator. The next step for hardware is to install one of the Pennylane [plugins](https://pennylane.ai/plugins/), e.g., the IBM plugin is [here](https://docs.pennylane.ai/projects/qiskit/en/latest/). If the plugin is successfully installed, you can change the line `qml.device(...)` in your code to target the plugin instead of a simulator.

Note that hardware platforms are more intricate than simulators. You have to get yourself access credentials and you have to make sure your program can “fit” into the hardware constraints. As well, they will provide noisy, imperfect answers. You should consult the docs/platform for any hardware you use, as these are external to PennyLane.

---

<div class="post-metadata">

**Author:** ![rkjha](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rkjha](https://discuss.pennylane.ai/u/rkjha)\
**Post date:** [October 7, 2024, 7:24pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/3 "2024-10-07T19:24:34Z")

</div>

Hi @nathan,

Thanks for the reply. The devices in the PennyLane Qiskit plugin are currently only compatible with versions of Qiskit below 0.46. However, If I go below Qiskit 0.46, I’d face many issues with Qiskit packages itself for using a hardware.

I guess I need to wait for PennyLane Qiskit plugin to be compatible with Qiskit 1.0!

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [October 7, 2024, 9:03pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/4 "2024-10-07T21:03:59Z")

</div>

Hi @rkhja, the plugin should be compatible with Qiskit 1.0. Could you direct us to where you’re encountering issues with non-1.0 compatibility?

---

<div class="post-metadata">

**Author:** ![rkjha](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rkjha](https://discuss.pennylane.ai/u/rkjha)\
**Post date:** [October 7, 2024, 9:49pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/5 "2024-10-07T21:49:01Z")

</div>

![Screenshot 2024-10-07 224625](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/1/1b37f80d80237f2c17682a357eb6ed21c2fc0724.png)

Hi @nathan,

I have attached a screenshot of the problem. Hope it clears the way. I could be doing some error possibly as well!

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [October 7, 2024, 10:07pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/6 "2024-10-07T22:07:18Z")

</div>

Hi @rkjha, it’s likely you could just have an older version of PL itself. It was a recent release that brought things into feature compatibility with Qiskit 1.0

My recommended next step would be to check the output of `qml.about()` and make sure you’re upgraded to latest version.

---

<div class="post-metadata">

**Author:** ![rkjha](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rkjha](https://discuss.pennylane.ai/u/rkjha)\
**Post date:** [October 8, 2024, 11:28am UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/7 "2024-10-08T11:28:40Z")

</div>

Hi @nathan,

Thanks for your replies. I have updated PL now (v0.35 to v0.38), yet still getting the same error. I am attaching a screenshot once again.

I already have Python 3.9.19 and Qiskit 1.0.2, and now PL 0.38. Is there something missing?

 ![Screenshot 2024-10-08 122708](https://canada1.discourse-cdn.com/flex012/uploads/pennylane/original/2X/3/31b7957715febb5ba163ab35c2c8bb2a855341a2.png)

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [October 8, 2024, 12:46pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/8 "2024-10-08T12:46:32Z")

</div>

Hi @rkhja, do you also have the latest version of the PL-Qiskit plugin?

You could check the output of `qml.about()` and compare with latest to confirm

---

<div class="post-metadata">

**Author:** ![rkjha](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rkjha](https://discuss.pennylane.ai/u/rkjha)\
**Post date:** [October 8, 2024, 7:46pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/9 "2024-10-08T19:46:14Z")

</div>

Hi @nathan,

Thanks for the reply. After considering your view on latest versions of the packages, I have installed all latest version of plugin’s in a new environment and it seems working now.

In fact, I also run a tutorial example [Using PennyLane with IBM’s quantum devices and Qiskit | PennyLane Demos](https://pennylane.ai/qml/demos/ibm_pennylane/) and the simulator one has worked using Aer\_Simulator (‘qiskit.aer’) - except ‘from pennylane\_qiskit import qiskit\_session’ which did not work, unsure why!

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [October 8, 2024, 9:25pm UTC](https://discuss.pennylane.ai/t/pennylane-simulator-to-quantum-machines/6714/10 "2024-10-08T21:25:04Z")

</div>

Awesome, glad to hear @rkjha!
