This guide covers how to use IonQ’s native gates in PennyLane. To learn more about what the native gates are and when to use them, refer to our guide on getting started with native gates.
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.This is an advanced-level feature. Using the hardware-native gate interface without a thorough understanding of quantum circuits is likely to result in less-optimal circuit structure and worse algorithmic performance overall than using our abstract gate interface.
Using native gates
Native gates are supported as ofv0.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
pennylane_ionq.ops
:
The parameters in the IonQ native gate specification are always defined in turns, not in radians. One turn is 2π radians.
gateset="native"
:
Each quantum circuit submitted to the IonQ Cloud must use a consistent gateset throughout—you cannot mix and match native gates and abstract gates in the same circuit.
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.