Skip to content

Commit dbd7466

Browse files
authored
Mention the need for the graphviz library on transpile/custom-backend page (#1558)
Closes #1394
1 parent b8ea172 commit dbd7466

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/transpile/custom-backend.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
"\n",
4040
"The `BackendV2` object is an abstract class used for all backend objects created by a provider (either within `qiskit.providers` or another library such as [`qiskit_ibm_runtime.IBMBackend`](../api/qiskit-ibm-runtime/qiskit_ibm_runtime.IBMBackend)). As mentioned above, these objects contain several attributes, including a [`Target`](/api/qiskit/qiskit.transpiler.Target). The `Target` contains information that specifies the backend's attributes - such as the [`Coupling Map`](/api/qiskit/qiskit.transpiler.CouplingMap), list of [`Instructions`](/api/qiskit/qiskit.circuit.Instruction), and others - to the transpiler. In addition to the `Target`, one can also define pulse-level details such as the [`DriveChannel`](/api/qiskit/qiskit.pulse.channels.DriveChannel) or [`ControlChannel`](/api/qiskit/qiskit.pulse.channels.ControlChannel).\n",
4141
"\n",
42-
"The following example demonstrates this customization by creating a simulated multi-chip backend, where each chip possesses a heavy-hex connectivity. The example specifies the backend's two-qubit gate set to be [`CZGates`](../api/qiskit/qiskit.circuit.library.CZGate) within each chip and [`CXGates`](../api/qiskit/qiskit.circuit.library.ECRGate) between chips. First, create your own `BackendV2` and customize its `Target` with single and two-qubit gates according to the previously described constraints."
42+
"The following example demonstrates this customization by creating a simulated multi-chip backend, where each chip possesses a heavy-hex connectivity. The example specifies the backend's two-qubit gate set to be [`CZGates`](../api/qiskit/qiskit.circuit.library.CZGate) within each chip and [`CXGates`](../api/qiskit/qiskit.circuit.library.ECRGate) between chips. First, create your own `BackendV2` and customize its `Target` with single and two-qubit gates according to the previously described constraints.\n",
43+
"\n",
44+
"<Admonition type=\"tip\" title=\"graphviz library\">\n",
45+
"Plotting a coupling map requires the [`graphviz`](https://graphviz.org/) library to be installed.\n",
46+
"</Admonition>"
4347
]
4448
},
4549
{

docs/transpile/custom-transpiler-pass.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
" Background: DAG representation\n",
2121
" </summary>\n",
2222
"\n",
23-
"Before building a pass, it is important to introduce the internal representation of quantum circuits in Qiskit, the [directed acyclic graph (DAG)](../api/qiskit/qiskit.dagcircuit.DAGCircuit) (see [this tutorial](https://qiskit.org/ecosystem/rustworkx/tutorial/dags.html) for an overview). To follow these steps, install the `graphivz` library for the DAG plotting functions. Use a Python package manager (such as `pip` or `conda`) to install `pydot` and your system's native package manager (for example, `apt`, `brew`, `yum`, or `dnf`) for `graphivz`.\n",
23+
"Before building a pass, it is important to introduce the internal representation of quantum circuits in Qiskit, the [directed acyclic graph (DAG)](../api/qiskit/qiskit.dagcircuit.DAGCircuit) (see [this tutorial](https://qiskit.org/ecosystem/rustworkx/tutorial/dags.html) for an overview). To follow these steps, install the [`graphviz` library](https://graphviz.org/download/) for the DAG plotting functions.\n",
2424
"\n",
2525
"In Qiskit, within the transpilation stages, circuits are represented using a DAG. In general, a DAG is composed of *vertices* (also known as \"nodes\") and directed *edges* that connect pairs of vertices in a particular orientation. This representation is stored using `qiskit.dagcircuit.DAGCircuit` objects that are composed of invididual `DagNode` objects. The advantage of this representation over a pure list of gates (that is, a *netlist*) is that the flow of information between operations is explicit, making it easier to make transformation decisions.\n",
2626
"\n",

docs/transpile/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A central component of the Qiskit SDK, the transpiler is designed for modularity
2323

2424
Find more information about the pass manager stages in the [Transpiler stages](transpiler-stages) topic.
2525

26-
### Instruction set architecture
26+
## Instruction set architecture
2727
In addition to reducing the depth and complexity of quantum circuits, the transpiler is designed to transform the instructions contained in a given `QuantumCircuit` to obey the Instruction Set Architecture (ISA) of a particular backend. Circuits obeying the ISA consist only of instructions that are supported by the backend's [`Target`](../api/qiskit/qiskit.transpiler.Target), such as the hardware's available basis gates, measurements, resets, and control flow operations, and comply with the constraints specified by the connectivity of the hardware, that is, the target's [`CouplingMap`](../api/qiskit/qiskit.transpiler.CouplingMap). When submitting a job to an IBM Quantum&trade; backend, the circuits must adhere to the backend's ISA.
2828

2929

0 commit comments

Comments
 (0)