qiskit-documentation/docs/guides/native-gates.mdx

106 lines
5.9 KiB
Plaintext

---
title: Native gates and operations
description: Summary of the native gates and operations supported by IBM quantum processing units
---
# Native gates and operations
Each [processor family](processor-types) has a native gate set. By default, the QPUs in each family only support running the gates and operations in the native gate set. Thus, every gate in the circuit must be translated (by the transpiler) to the elements of this set.
You can view the native gates and operations for a QPU either [with Qiskit](#native-gates-with-qiskit) or on the IBM Quantum™ Platform [Compute resources page](#native-gates-on-platform).
<Admonition type="note" title="Basis gates">
The terms native gates and basis gates are often used interchangeably. However, you can specify a different set of basis gates to use, while the native gate set never changes. For information about changing the basis gates, see the [Represent quantum computers](./represent-quantum-computers#basis-gates) topic.
</Admonition>
## Find the native gate set for a QPU
<span id="native-gates-with-qiskit"></span>
### With Qiskit
```python
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum")
for backend in service.backends():
config = backend.configuration()
if "simulator" in config.backend_name:
continue
print(f"Backend: {config.backend_name}")
print(f" Processor type: {config.processor_type}")
print(f" Supported instructions:")
for instruction in config.supported_instructions:
print(f" {instruction}")
print()
```
<span id="native-gates-on-platform"></span>
### On IBM Quantum Platform
Select any QPU on the [Compute resources](https://quantum.ibm.com/services/resources) tab. The default gates for that QPU are listed under Details. Note that the non-unitary operations are not listed here; use the method in Qiskit described above to see all native gates and operations for a QPU.
## Tables of gates and operations, by processor family
### Heron
| Name | Notes |
| :--- | :--- |
| [CZ](/api/qiskit/qiskit.circuit.library.CZGate) | two-qubit gate |
| [RZ](/api/qiskit/qiskit.circuit.library.RZGate) | single-qubit gate |
| [SX](/api/qiskit/qiskit.circuit.library.SXGate) |single-qubit gate |
| [X](/api/qiskit/qiskit.circuit.library.XGate) | single-qubit gate |
| [ID](/api/qiskit/qiskit.circuit.library.IGate) | single-qubit gate wait cycle |
| [reset](/api/qiskit/circuit#qiskit.circuit.Reset) | single-qubit gate, non-unitary; not the same as the initialization done at the start of a circuit to prepare the all 0's state |
| [if_else](/api/qiskit/qiskit.circuit.IfElseOp) | control flow for classical feedforward |
| [for_loop](/api/qiskit/qiskit.circuit.ForLoopOp) | control flow for classical feedforward |
| [switch_case](/api/qiskit/qiskit.circuit.SwitchCaseOp) | control flow for classical feedforward |
| [measure](/api/qiskit/circuit#qiskit.circuit.Measure) | |
| [delay](/api/qiskit/circuit#qiskit.circuit.Delay) | |
### Eagle
| Name | Notes |
| :--- | :--- |
| [ECR](/api/qiskit/qiskit.circuit.library.ECRGate) | two-qubit gate |
| [RZ](/api/qiskit/qiskit.circuit.library.RZGate) | single-qubit gate |
| [SX](/api/qiskit/qiskit.circuit.library.SXGate) |single-qubit gate |
| [X](/api/qiskit/qiskit.circuit.library.XGate) | single-qubit gate |
| [ID](/api/qiskit/qiskit.circuit.library.IGate) | single-qubit gate wait cycle |
| [reset](/api/qiskit/circuit#qiskit.circuit.Reset) | single-qubit gate, non-unitary; not the same as the initialization done at the start of a circuit to prepare the all 0's state |
| [if_else](/api/qiskit/qiskit.circuit.IfElseOp) | control flow for classical feedforward |
| [for_loop](/api/qiskit/qiskit.circuit.ForLoopOp) | control flow for classical feedforward |
| [switch_case](/api/qiskit/qiskit.circuit.SwitchCaseOp) | control flow for classical feedforward |
| [measure](/api/qiskit/circuit#qiskit.circuit.Measure) | |
| [delay](/api/qiskit/circuit#qiskit.circuit.Delay) | |
### Falcon
| Name | Notes |
| :--- | :--- |
| [CX](/api/qiskit/qiskit.circuit.library.CXGate) | two-qubit gate |
| [RZ](/api/qiskit/qiskit.circuit.library.RZGate) | single-qubit gate |
| [ID](/api/qiskit/qiskit.circuit.library.IGate) | single-qubit gate wait cycle |
| [reset](/api/qiskit/circuit#qiskit.circuit.Reset) | single-qubit gate, non-unitary; not the same as the initialization done at the start of a circuit to prepare the all 0's state |
| [if_else](/api/qiskit/qiskit.circuit.IfElseOp) | control flow for classical feedforward |
| [for_loop](/api/qiskit/qiskit.circuit.ForLoopOp) | control flow for classical feedforward |
| [switch_case](/api/qiskit/qiskit.circuit.SwitchCaseOp) | control flow for classical feedforward |
| [measure](/api/qiskit/circuit#qiskit.circuit.Measure) | |
| [delay](/api/qiskit/circuit#qiskit.circuit.Delay) | |
<Admonition type="tip" title="The init_qubits flag">
The `init_qubits` flag, set as a [primitive execution option,](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.options.ExecutionOptionsV2) controls whether qubits are reset to the zero state at the start of each circuit. Its default value is `True`, indicating that the qubits should be reset. If `False`, the qubits will begin in the final state from the previous shot, and you must manually insert [resets](/api/qiskit/circuit#qiskit.circuit.Reset) if you want to reset them to the zero state. If a job consists of multiple circuits, then the shots are executed in a "round-robin" fashion. That is, each circuit will be executed in sequence to obtain one shot from each circuit. This process is then repeated until the requested number of shots has been obtained from all circuits.
</Admonition>
## Next steps
<Admonition type="tip" title="Recommendations">
- Read about basis gates in the [Represent quantum computers](./represent-quantum-computers#basis-gates) topic.
- Apply your knowledge of basis gates to a [tutorial](https://learning.quantum.ibm.com/catalog/tutorials) in IBM Quantum Learning.
</Admonition>