Skip to content

Commit

Permalink
New Native Gates page (#487)
Browse files Browse the repository at this point in the history
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
6 people authored Jan 30, 2024
1 parent f6d67a1 commit 75aaa31
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/run/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
"title": "Get backend information with Qiskit",
"url": "/run/get-backend-information"
},
{
"title": "Native gates and operations",
"url": "/run/native-gates"
},
{
"title": "Retired systems",
"url": "/run/retired-systems"
Expand Down
105 changes: 105 additions & 0 deletions docs/run/native-gates.mdx
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>

6 changes: 6 additions & 0 deletions docs/run/processor-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ At 133 qubits, Heron is an [Eagle](#eagle)-sized upgrade to [Egret](#egret) that

* [View available Heron systems](https://quantum.ibm.com/services/resources?tab=systems&type=Heron)

* [Native gates and operations](native-gates): `cz, id, delay, measure, reset, rz, sx, x, if_else, for_loop, switch_case`

## Osprey

![Osprey processor icon](/images/run/processor-types/osprey.svg)
Expand All @@ -41,6 +43,8 @@ See [this blog post](https://research.ibm.com/blog/127-qubit-quantum-processor-e

* [View available Eagle systems](https://quantum.ibm.com/services/resources?tab=systems&type=Eagle)

* [Native gates and operations](native-gates): `ecr, id, delay, measure, reset, rz, sx, x, if_else, for_loop, switch_case`

<Admonition type="info" title="Revisions">
`r3` (December 2022) Eagle r3 is a version of the 127-qubit processor with enhanced coherence properties but otherwise similar design parameters to Eagle r1.

Expand Down Expand Up @@ -89,6 +93,8 @@ The Falcon family of devices offers a valuable platform for medium-scale circuit

* [View available Falcon systems](https://quantum.ibm.com/services/resources?tab=systems&type=Falcon)

* [Native gates and operations](native-gates): `cx, id, delay, measure, reset, rz, sx, x, if_else, for_loop, switch_case`

<Admonition type="info" title="Revisions">
`r8` (September 2021) In addition to the features of r5.11, Falcon r8 has enhanced coherence properties.

Expand Down

0 comments on commit 75aaa31

Please sign in to comment.