-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Native Gates page #487
Merged
Merged
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8d15635
Create conditional-reset.ipynb
abbycross 195b304
Initial edits
beckykd 3c8bea6
update multiq for runtime
beckykd b8d6fc1
some code changes
beckykd 68d19fd
Create native-gates.mdx
abbycross ebcfa08
move to run and add to toc
abbycross f530898
New page outline
abbycross 74c06ff
move notes into new file, delete old
abbycross 49973f3
reorg
abbycross 7c7cfcc
notes
abbycross 845a173
add code from Kevin
abbycross 56d2176
add links and processor families
abbycross d207565
clean up notes
abbycross 4ac046e
add text and table
abbycross 58cd885
add info to processor types pg
abbycross 12afef7
link to processor types page
abbycross 3e1076b
clarification
abbycross 1345ac8
link back to native gates pg
abbycross b6ddb6a
gate set not gateset
abbycross d628e7e
address basis gate terminology
abbycross 01beefc
reword
abbycross e358f2f
separate out into three tables, code review
abbycross c0bb287
reorg order of tables
abbycross 8574b94
code review
abbycross 6171774
code review
abbycross db71346
code review
abbycross ad6813d
code review
abbycross 589e948
point to submit transpiled circs tutorial
abbycross f246d3d
update from Abby's suggestion
abbycross 304498f
superfluous quotation marks
abbycross File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. | ||
- Try out the [Submit transpiled circuits](https://learning.quantum.ibm.com/tutorial/submit-transpiled-circuits) tutorial. | ||
abbycross marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Admonition> | ||
abbycross marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of our goals is to have every docs page include a link to a learning platform topic where users can start using these concepts in practice, can you add a link to a sensible learning platform course/tutorial here please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the Submit transpiled circuits tutorial? Or we could do something broader like "Try one of the workflow example tutorials."