IONQ Device with Braket

Dear all, I have been working with PennyLane for a few weeks now and I am really excited :slight_smile: Using quantum computers for deep learning could open up new horizons in computer science.

As a platform I use AWS Braket and it works very well. However, I am a bit confused about the device configuration. My goal is to perform computations on an IONQ node. To do this, I use the following code:

device_arn = “arn:aws:braket:::device/qpu/ionq/ionQdevice”

my_bucket = f"amazon-braket-XXX"
my_prefix = “quantum”
s3_folder = (my_bucket, my_prefix)
wires = 2

dev_remote = qml.device(

Does this configuration really connect to an IONQ device, even if the name is “”, or does it connect to a simulator?

Many thanks in advance for your help :slight_smile:

Hi @c4ristian, I’m very glad to hear that you like PennyLane!

I definitely recommend going through our new codebook to keep learning more.

About your question, if you want to connect directly with IonQ it might be easier to use the PennyLane-IonQ plugin. You will need an IonQ API Key but it means you don’t have to go through braket. You can learn how to use it here.

If you still want to use braket then you can use the code you have except for the “f” you have in “my_bucket”. I’m not sure that it will work with that.
In your dev_remote you always specify "". The part that tells you the actual device is the device_arn. In this case you will effectively be using an IonQ device.

I hope this answers your question!

Hi @CatalinaAlbornoz , thank you very much for your advice. I will definitely consider using IONQ directly.

Together with a colleague, I am currently writing an article about the practical use of quantum computers for machine learning. For this purpose, we would like to run code similar to this tutorial on a real quantum machine. However, our attempts so far have not been successful, as we spent very long waiting times in queues. Do you have any ideas about what environment we could use for our test? Our goal is to show our readers that quantum machine learning already works in practice and could be a great opportunity for the future.

@c4ristian Actually, at this point, it looks like the IONQ quantum cloud, which our ionq device uses, is being limited to certain “partner organizations”. They are recommending accessing ionq hardware through one of the major cloud platforms, like AWS.

So we would recommend accessing ionq hardware through AWS.

Dear @christina , thank you for your answer. Using an IONQ node in AWS works fine. A task, however, spends a very long time in the queue before it is processed. Training the neural network from this tutorial would take several days or even weeks in AWS.

We are not specifically interested in IONQ, but are looking for a real quantum device that can be used to train the model in a reasonable time. If possible, we would like to use the example from the tutorial to show readers that QML not only works theoretically, but also in practice. Do you have any ideas on how we can accomplish this? Perhaps we could simplify the model a bit to reduce processing time

Hi @c4ristian.

You could try using IBM’s computers. The smaller ones usually don’t have a very long queue. You can access them using the pennylane-qiskit plugin.

Please let me know how it goes with that option!

That was good advice :slight_smile: It has worked better so far

I’m glad it worked @c4ristian!

Please let us know if you have any other questions :smiley: .