-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #113 Kevin noted that the native gates appear to be the same for all members of each processor family. I've added the gates associated with each family to the Processor types page as well. --------- Co-authored-by: Rebecca Dimock <[email protected]> Co-authored-by: Kevin J. Sung <[email protected]> Co-authored-by: Rebecca Dimock <[email protected]> Co-authored-by: Kevin J. Sung <[email protected]> Co-authored-by: Abby Mitchell <[email protected]>
- Loading branch information
1 parent
f6d67a1
commit 75aaa31
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
title: Native gates and operations | ||
description: Summary of the native gates and operations supported by IBM Quantum systems | ||
|
||
--- | ||
|
||
# Native gates and operations | ||
|
||
Each [processor family](processor-types) has a native gate set. By default, the systems 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 system 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](../transpile/representing_quantum_computers#basis-gates) topic. | ||
</Admonition> | ||
|
||
## Find the native gate set for a system | ||
|
||
<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 system on the [Compute resources](https://quantum.ibm.com/services/resources) tab. The default gates for that system 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 system. | ||
|
||
## 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/qiskit.circuit.library.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/qiskit.circuit.library.Measure) | | | ||
| [delay](/api/qiskit/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/qiskit.circuit.library.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/qiskit.circuit.library.Measure) | | | ||
| [delay](/api/qiskit/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/qiskit.circuit.library.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/qiskit.circuit.library.Measure) | | | ||
| [delay](/api/qiskit/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.ExecutionOptions) 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/qiskit.circuit.library.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](../transpile/representing_quantum_computers#basis-gates) topic. | ||
- Apply your knowledge of basis gates to one of these [workflow example tutorials.](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example) | ||
</Admonition> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters