|
72 | 72 | "source": [
|
73 | 73 | "## Step 1: Map classical inputs to a quantum problem\n",
|
74 | 74 | "\n",
|
75 |
| - "This tutorial assumes that the classical problem has already been mapped to quantum. Begin by constructing a circuit and observable to measure. While the techniques used in this tutorial apply to many different kinds of circuits, for simplicity this tutorial uses the [`EfficientSU2`](https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.library.EfficientSU2#efficientsu2) circuit included in Qiskit's circuit library.\n", |
| 75 | + "This tutorial assumes that the classical problem has already been mapped to quantum. Begin by constructing a circuit and observable to measure. While the techniques used in this tutorial apply to many different kinds of circuits, for simplicity this tutorial uses the [`EfficientSU2`](/docs/api/qiskit/qiskit.circuit.library.EfficientSU2#efficientsu2) circuit included in Qiskit's circuit library.\n", |
76 | 76 | "\n",
|
77 | 77 | "`EfficientSU2` is a parameterized quantum circuit designed to be efficiently executable on quantum hardware with limited qubit connectivity, while still being expressive enough to solve problems in application domains like optimization and chemistry. It's built by alternating layers of parameterized single-qubit gates with a layer containing a fixed pattern of two-qubit gates, for a chosen number of repetitions. The pattern of two-qubit gates can be specified by the user. Here you can use the built-in `pairwise` pattern because it minimizes the circuit depth by packing the two-qubit gates as densely as possible. This pattern can be executed using only linear qubit connectivity."
|
78 | 78 | ]
|
|
136 | 136 | "\n",
|
137 | 137 | "In the mirror circuit technique, you concatenate the circuit with its inverse circuit, which is formed by inverting each gate of the circuit in reverse order. The resulting circuit implements the identity operator, which can trivially be simulated. Because the structure of the original circuit is preserved in the mirror circuit, executing the mirror circuit still gives an idea of how the quantum device would perform on the original circuit.\n",
|
138 | 138 | "\n",
|
139 |
| - "The following code cell assigns random parameters to your circuit, and then constructs the mirror circuit using the [`UnitaryOverlap`](https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.library.UnitaryOverlap#unitaryoverlap) class. Before mirroring the circuit, append a [barrier](https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.library.Barrier#barrier) instruction to it to prevent the transpiler from merging the two parts of the circuit on either side of the barrier. Without the barrier, the transpiler would merge the original circuit with its inverse, resulting in a transpiled circuit without any gates." |
| 139 | + "The following code cell assigns random parameters to your circuit, and then constructs the mirror circuit using the [`UnitaryOverlap`](/docs/api/qiskit/qiskit.circuit.library.UnitaryOverlap#unitaryoverlap) class. Before mirroring the circuit, append a [barrier](/docs/api/qiskit/circuit#qiskit.circuit.Barrier) instruction to it to prevent the transpiler from merging the two parts of the circuit on either side of the barrier. Without the barrier, the transpiler would merge the original circuit with its inverse, resulting in a transpiled circuit without any gates." |
140 | 140 | ]
|
141 | 141 | },
|
142 | 142 | {
|
|
185 | 185 | "\n",
|
186 | 186 | "- Pick a qubit layout that maps the virtual qubits of your circuit to physical qubits on the hardware.\n",
|
187 | 187 | "- Insert swap gates as needed to route interactions between qubits that are not connected.\n",
|
188 |
| - "- Translate the gates in your circuit to [Instruction Set Architecture (ISA)](https://docs.quantum.ibm.com/transpile#instruction-set-architecture) instructions that can directly be executed on the hardware.\n", |
| 188 | + "- Translate the gates in your circuit to [Instruction Set Architecture (ISA)](/docs/guides/transpile#instruction-set-architecture) instructions that can directly be executed on the hardware.\n", |
189 | 189 | "- Perform circuit optimizations to minimize the circuit depth and gate count.\n",
|
190 | 190 | "\n",
|
191 | 191 | "The transpiler built into Qiskit can perform all of these steps for you. Because this tutorial uses a hardware-efficient circuit, the transpiler should be able to pick a qubit layout that does not require any swap gates to be inserted for routing interactions.\n",
|
|
211 | 211 | "id": "0b607d83-e7a2-4c03-83c9-3b52d23f8772",
|
212 | 212 | "metadata": {},
|
213 | 213 | "source": [
|
214 |
| - "You can transpile your circuit for your chosen backend by creating a pass manager and then running the pass manager on the circuit. An easy way to create a pass manager is to use the [`generate_preset_pass_manager`](https://docs.quantum.ibm.com/api/qiskit/transpiler_preset#qiskit.transpiler.preset_passmanagers.generate_preset_pass_manager) function. See [Transpile with pass managers](https://docs.quantum.ibm.com/transpile/transpile-with-pass-managers) for a more detailed explanation of transpiling with pass managers." |
| 214 | + "You can transpile your circuit for your chosen backend by creating a pass manager and then running the pass manager on the circuit. An easy way to create a pass manager is to use the [`generate_preset_pass_manager`](/docs/api/qiskit/qiskit.transpiler.generate_preset_pass_manager) function. See [Transpile with pass managers](/docs/guides/transpile-with-pass-managers) for a more detailed explanation of transpiling with pass managers." |
215 | 215 | ]
|
216 | 216 | },
|
217 | 217 | {
|
|
246 | 246 | "id": "761595f3-99bd-4a75-b493-e1a89afce6f6",
|
247 | 247 | "metadata": {},
|
248 | 248 | "source": [
|
249 |
| - "The transpiled circuit now contains only ISA instructions. The single-qubit gates have been decomposed in terms of $\\sqrt{X}$ gates and $R_z$ rotations, and the CX gates have been decomposed into [ECR gates](https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.library.ECRGate#ecrgate) and single-qubit rotations.\n", |
| 249 | + "The transpiled circuit now contains only ISA instructions. The single-qubit gates have been decomposed in terms of $\\sqrt{X}$ gates and $R_z$ rotations, and the CX gates have been decomposed into [ECR gates](/docs/api/qiskit/qiskit.circuit.library.ECRGate#ecrgate) and single-qubit rotations.\n", |
250 | 250 | "\n",
|
251 |
| - "The transpilation process has mapped the virtual qubits of the circuit to physical qubits on the hardware. The information about the qubit layout is stored in the `layout` attribute of the transpiled circuit. The observable was also defined in terms of the virtual qubits, so you need to apply this layout to the observable, which you can do with the [`apply_layout`](https://docs.quantum.ibm.com/api/qiskit/qiskit.quantum_info.SparsePauliOp#apply_layout) method of `SparsePauliOp`." |
| 251 | + "The transpilation process has mapped the virtual qubits of the circuit to physical qubits on the hardware. The information about the qubit layout is stored in the `layout` attribute of the transpiled circuit. The observable was also defined in terms of the virtual qubits, so you need to apply this layout to the observable, which you can do with the [`apply_layout`](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp#apply_layout) method of `SparsePauliOp`." |
252 | 252 | ]
|
253 | 253 | },
|
254 | 254 | {
|
|
292 | 292 | "\n",
|
293 | 293 | "Here you will submit five separate jobs, starting with no error suppression or mitigation, and successively enabling various error suppression and mitigation options available in Qiskit Runtime. For information about the options, refer to the following pages:\n",
|
294 | 294 | "\n",
|
295 |
| - "- [Overview of all options](https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/options)\n", |
296 |
| - "- [Dynamical decoupling](https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.options.DynamicalDecouplingOptions)\n", |
297 |
| - "- [Resilience, including measurement error mitigation and zero-noise extrapolation (ZNE)](https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.options.ResilienceOptionsV2)\n", |
298 |
| - "- [Twirling](https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.options.TwirlingOptions)\n", |
| 295 | + "- [Overview of all options](/docs/api/qiskit-ibm-runtime/options)\n", |
| 296 | + "- [Dynamical decoupling](/docs/api/qiskit-ibm-runtime/options-dynamical-decoupling-options)\n", |
| 297 | + "- [Resilience, including measurement error mitigation and zero-noise extrapolation (ZNE)](/docs/api/qiskit-ibm-runtime/options-resilience-options-v2)\n", |
| 298 | + "- [Twirling](/docs/api/qiskit-ibm-runtime/options-twirling-options)\n", |
299 | 299 | "\n",
|
300 |
| - "Because these jobs can run independently of each other, you can use [batch mode](https://docs.quantum.ibm.com/run/run-jobs-batch) to allow Qiskit Runtime to optimize the timing of their execution." |
| 300 | + "Because these jobs can run independently of each other, you can use [batch mode](/docs/guides/run-jobs-batch) to allow Qiskit Runtime to optimize the timing of their execution." |
301 | 301 | ]
|
302 | 302 | },
|
303 | 303 | {
|
|
0 commit comments