AWS SV1 and Pennylane simulator

Hi there,
I am building quantum machine learning and I would like to convert it into real quantum hardware, I failed to run on X8 because it is difficult to find references to convert all gates I had in the device “default. qubits” to “strawberry. remote” so I am finding about the hybrid job of AWS bracket and penny lane. I found the cheapest simulator SV1 and wonder how it differs from Pennylane Simulator on “default. qubits”.
My main purpose is to see how my QML performs in a noisy environment compared to a perfect environment which is the default qubit. Please help, I read several articles but it is not clearly pointed out what is the difference between them

Hi @Juliaa_Ann , welcome to the forum!
Can you please let us know more about the example you’re trying to run?

I would recommend that you start by using simulated noise. You can follow our demo on noisy circuits to learn how to use the default.mixed device and add error channels.

Once you get this working you can try running it on hardware depending on your exact problem. Note that running very large circuits can be unfeasible or expensive depending on where you want to run it.

I would also strongly recommend studying the Noise module of the Codebook to learn more about this topic.

Let me know if you have any questions about using default.mixed.

I hope this helps!

1 Like

Hey @Juliaa_Ann,

  1. It’s really hard to tell what the issue could be without having something to run and replicate what you’re observing. If you could include something minimal that reproduces what you’re seeing, that would be lovely!

  2. First note here that you’ll need the pennylane-strawberryfields plugin if you want to not solely use Strawberryfields, and that the pennylane-strawberryfields plugin is supported for PennyLane versions 0.29 and lower. Now, X8 is a photonic device, so the gates and operations that are used on it are entirely different than that of a “typical” quantum computer that uses CNOT, PauliX, etc. Please consult the documentation for supported operations with the plugin. Given that the architecture and operations are very different, it’s likely that you can’t simply “convert” your default.qubit code into something that would run on X8.

1 Like

Hi Isaac,
Thank you for your reply. I decided to go with the simulator in Pennylane instead of X8 because I cannot convert the entire code into Strawberryfield for now.
I can use default.mixed for now but the speed seemed to be very slow, I am currently using diff method as 'backprop'. May I ask if is there any way to speed up the time running noisy simulator, please?

Hey @Juliaa_Ann!

If no differentiation method is specified, the default differentiation method is diff_method="best". “best” means that PennyLane will prioritize device-provided gradients, backpropagation, parameter-shift rule, and finally finite differences, in that order.

The adjoint differentiation method is usually the fastest, but for default.mixed it’s not supported. You can try backprop or parameter-shift to see what might end up being faster :slight_smile:.

One last note on default.mixed’s performance: it will be slower than default.qubit in most cases, mostly because it takes more compute to simulate a mixed state. If you feel your code should be much faster though, please share it with us so we can have a look :slight_smile:

Hope this helps!

1 Like

Hi Isaac thank you for your response, I have found the way for my solution. Thank you so much for your response. Wish you have a nice week ahead.