Using native gates with qBraid
Learn how to use our hardware-native gateset to run a circuit with qBraid
This guide covers how to use IonQ’s native gates in qBraid. 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 qBraid, we recommend reviewing our guides on Getting Started with Native Gates and Getting Started with qBraid. Native gates are also supported in the IonQ API, Qiskit, Cirq, and Pennylane.
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
IonQ’s native gates are incorporated as a natural extension of the OpenQASM standard library within the qbraid[ionq]
runtime integration.
qBraid supports the following IonQ native gates:
gpi(phi)
gpi2(phi)
ms(phi0, phi1, theta=0.25)
for Aria systemszz(theta)
for Forte systems
For more details about these gate definitions and parameters, refer to the native gates guide.
The parameters in the IonQ native gate specification are always defined in turns, not in radians. One turn is 2π radians.
Native gate circuits can then be built and executed as follows:
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.
The qbraid[ionq]
runtime integration does not currently 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?