Using native gates with PennyLane
Learn how to use our hardware-native gateset to run a circuit with PennyLane
Introduction
Building and submitting circuits using IonQ’s hardware-native gateset enables you to bypass our compiler and optimizer, providing more control and transparency than the default abstract gateset (though often at the cost of performance and convenience).
Before working with native gates in PennyLane, we recommend reviewing our guides on Getting Started with Native Gates and Getting Started with PennyLane. Native gates are also supported in the IonQ API, Qiskit, and Cirq.
Using native gates
Native gates are supported as of v0.28.0
of the PennyLane IonQ plugin.
Gates are provided as part of the pennylane-ionq
package, including:
GPI(phi)
GPI2(phi)
MS(phi0, phi1, theta=0.25)
for Aria systems
For more details about these gate definitions and parameters, refer to the native gates guide.
The native gates can be imported from pennylane_ionq.ops
:
To use native gates, set up an IonQ device with gateset="native"
:
Native gate circuits can then be built and executed using this device:
The pennylane-ionq
plugin currently does not support automatic transpilation from abstract to native gates, but we may add this capability in the future. For now, we recommend following this general procedure (also described in our main native gates guide) or using a different SDK.
Additional resources
Was this page helpful?